Skip to content

fix(sea): prevent sentinel duplication when pkg is in dependencies#243

Merged
robertsLando merged 2 commits into
mainfrom
fix/sea-sentinel-duplication
Apr 16, 2026
Merged

fix(sea): prevent sentinel duplication when pkg is in dependencies#243
robertsLando merged 2 commits into
mainfrom
fix/sea-sentinel-duplication

Conversation

@robertsLando

Copy link
Copy Markdown
Member

Summary

  • Fix: When a user lists @yao-pkg/pkg in dependencies (instead of devDependencies), the walker includes sea.js in the SEA archive. The verbatim sentinel string NODE_SEA_FUSE_fce680ab2cc467b6e072b8b5df1996b2 ends up inside the injected blob, causing postject to find it twice and fail with "Multiple occurences of sentinel found in the binary". Fixed by splitting the sentinel via string concatenation so the literal never appears in compiled output.
  • Skill: Add /pkg-debug Claude Code skill for interactive troubleshooting — covers build failures, runtime crashes, missing assets, binary bloat, cross-compile, native addons, SEA issues, patches/dictionaries, and contributing fixes back to pkg.
  • Docs: Add Claude Code skill install/usage instructions to the troubleshooting page + cross-reference from the debug VFS page.

Repro: https://github.com/julianpoemp/yao-pkg-nestjs-sea-example

Test plan

  • All 7 SEA tests pass (test-00-sea, test-85 through test-92)
  • Verified grep -c shows 0 occurrences of the sentinel literal in compiled lib-es5/sea.js
  • Reproduced the bug with the NestJS example repo (3-target build fails before fix)
  • Verified the fix: 3-target build succeeds, Linux binary boots NestJS correctly
  • yarn lint passes clean

🤖 Generated with Claude Code

robertsLando and others added 2 commits April 16, 2026 09:30
When a user lists @yao-pkg/pkg in `dependencies` (instead of
`devDependencies`), the walker includes sea.js in the SEA archive.
The verbatim sentinel string ends up in the injected blob, causing
postject to find it twice and fail with "Multiple occurences of
sentinel found in the binary".

Split the sentinel via string concatenation so the literal never
appears in compiled output.

Closes https://github.com/julianpoemp/yao-pkg-nestjs-sea-example

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a user-invocable skill that guides through build failures, runtime
crashes, missing assets, binary bloat, cross-compile regressions,
native addons, SEA issues, patches, and dictionaries.

Also add a section to the troubleshooting docs with install and usage
instructions and a cross-reference from the debug VFS page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@robertsLando robertsLando force-pushed the fix/sea-sentinel-duplication branch from 1f61e13 to bb5f7dc Compare April 16, 2026 07:37
@robertsLando robertsLando merged commit 79f3f2d into main Apr 16, 2026
27 checks passed
@robertsLando robertsLando deleted the fix/sea-sentinel-duplication branch April 16, 2026 07:38
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.

1 participant