Skip to content

fix(postinstall): update pi-ai patch for 0.45.6 - #871

Closed
sebslight wants to merge 1 commit into
mainfrom
fix/861-npm-postinstall-patch-mismatch
Closed

sebslight wants to merge 1 commit into
mainfrom
fix/861-npm-postinstall-patch-mismatch

Conversation

@sebslight

@sebslight sebslight commented Jan 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes #861 - npm/bun installs were failing with "context mismatch" errors during postinstall patch application.

Root cause: package.json declared "@mariozechner/pi-ai": "^0.45.3" but the patch was written for exactly 0.45.3. npm resolved the caret range to 0.45.6, where the code had shifted by a few lines, causing patch context mismatches.

Fix:

  • Pin @mariozechner/pi-ai to exact version 0.45.6 (no caret)
  • Create new patch file targeting 0.45.6 line numbers (all 3 original files + timeout fix)
  • Remove old 0.45.3 patch

Test plan

  • Reproduced original error with npm install simulation
  • Verified patch applies with pnpm (pnpm install)
  • Verified patch applies with npm postinstall.js fallback
  • E2E test: npm pack → npm install succeeds with all patches applied
  • Verified all 4 patch changes present in node_modules
  • Build passes
  • Existing tests pass (3 pre-existing failures unrelated to this change)

@lirantal

lirantal commented Jan 13, 2026 •

Copy link
Copy Markdown

You beat me to it, nice job @sebslight.
Fixes #872

@sebslight
sebslight marked this pull request as draft January 13, 2026 23:05
@sebslight
sebslight force-pushed the fix/861-npm-postinstall-patch-mismatch branch from b77e286 to 161ce6d Compare January 13, 2026 23:17
@sebslight
sebslight force-pushed the fix/861-npm-postinstall-patch-mismatch branch from 161ce6d to e9d47fb Compare January 13, 2026 23:22
@sebslight
sebslight marked this pull request as ready for review January 13, 2026 23:23
@steipete

Copy link
Copy Markdown
Contributor

Thanks! Please ping me on Discord for PRs like this. I value the effort; hovever It takes me longer to review and reply than typing fix in codex. And esp a build-breaking one.

@steipete steipete closed this Jan 14, 2026
@sebslight
sebslight deleted the fix/861-npm-postinstall-patch-mismatch branch January 14, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: clawdbot: not found

3 participants