Skip to content

Fail clearly when pnpm patch hashes are missing - #214

Merged
0x80 merged 4 commits into
mainfrom
0x80/212-fail-clearly-when-pnpm-9-10-patch-hashes
Aug 29, 2026
Merged

0x80 merged 4 commits into
mainfrom
0x80/212-fail-clearly-when-pnpm-9-10-patch-hashes

Conversation

@0x80

@0x80 0x80 commented Aug 29, 2026

Copy link
Copy Markdown
Owner

A reachable patch without a matching pnpm lockfile hash used to produce hash: "" under pnpm 9 and 10. pnpm rejected the isolate later, during install.

copyPatches now aborts before copying a patch if any supported pnpm reader cannot supply its hash. Tests cover pnpm 8's object entries, pnpm 9 and 10's string entries, and unreadable lockfiles across pnpm 8 through 11. The test setup restores default reader mocks for each case.

Decisions:

  • Fail all supported pnpm versions rather than omit an invalid patch. Omitting it would make the isolate install while silently dropping the intended patch.

Closes #212

Scope: packages (isolate-package)
Visibility: user-facing
Implementer: codex:gpt-5.6-terra:xhigh

Copilot AI balanced review requested due to automatic review settings August 29, 2026 12:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The fail-fast behavior is correctly implemented with comprehensive regression coverage.

Pull request overview

Adds fail-fast pnpm patch-hash validation to prevent invalid isolated lockfiles, resolving #212.

Changes:

  • Rejects missing or unreadable patch hashes across supported pnpm versions.
  • Adds pnpm 8–11 coverage and resets reader mocks between tests.
File summaries
File Description
src/lib/patches/copy-patches.ts Validates hashes before copying patch files.
src/lib/patches/copy-patches.test.ts Covers reader formats and failure paths.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@0x80
0x80 merged commit 9cdd565 into main Aug 29, 2026
5 checks passed
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.

Fail clearly when pnpm 9/10 patch hashes are missing

2 participants