Skip to content

npm: real copies instead of symlinks in the macOS engine packages - #128

Merged
jmmana merged 3 commits into
mainfrom
fix/npm-macos-symlinks
Nov 27, 2026
Merged

jmmana merged 3 commits into
mainfrom
fix/npm-macos-symlinks

Conversation

@jmmana

@jmmana jmmana commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Installing 0.5.0-alpha.6 from npm on macOS failed with engine_digest_mismatch: npm does not keep symlinks and the PyInstaller macOS engine has four (Python.framework). The client's integrity check did its job and refused the engine.

  • npm/build.mjs: copyResolved turns symlinks into real copies (fs.cpSync dereference still kept them in Node 24). Real engine tested: it starts and answers hello; 23 → 45 MB on disk, 15.9 MB tarball.
  • npm/verify-packed.mjs + a step in npm-pack.yml: unpack each tarball like npm install and compare the engine digest with the built-in one; the fake macOS engine now has symlinks so a regression fails on every PR.
  • Linux and Windows were not affected.

🤖 Generated with Claude Code

npm drops symlinks, so the installed macOS engine lost the four
Python.framework links and its digest no longer matched: the client refused
to run it. Found by installing 0.5.0-alpha.6 from the registry in a clean
folder. The builder now resolves symlinks into copies, and the pack job
unpacks every tarball and checks the installed engine digest.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 27, 2026 13:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

jmmana and others added 2 commits November 27, 2026 08:57
The leak check read the whole event line, which includes SHA-256 hex digests;
'7772' can appear in one by chance (failed Python 3.10 on #128). It now checks
only the fields that could carry data.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jmmana
jmmana merged commit 1602aab into main Nov 27, 2026
16 checks passed
@jmmana
jmmana deleted the fix/npm-macos-symlinks branch November 27, 2026 13:59
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.

2 participants