fix(update): stage global-style so dependencies land inside the package - #2087
Merged
Conversation
Release-audit blocker: local-style npm install hoists bun/zod to stageRoot/node_modules, so the swapped-in package directory shipped without its dependencies and every post-upgrade 'ocx update' failed verification. Stage with npm install -g --prefix instead — the global layout nests dependencies inside the package exactly like the live tree — and resolve the staged path across the POSIX lib/node_modules and Windows node_modules shapes. Proven against the real registry: staging @bitkyc08/opencodex@2.25.0 verifies and swaps end-to-end with dependencies inside the package.
Contributor
|
✅ Deterministic PR hygiene checks passed. |
This was referenced Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Release-regression-audit blocker for the 2.26.0 train:
transactionalNpmUpdate(#2079) staged with a local-stylenpm install --prefix, which hoists the package's dependencies (bun,zod, ...) tostageRoot/node_modules— siblings of the package. The swap then moved only the package directory, shipping a dependency-less live tree, so every post-upgradeocx updatefailed manifest verification (sentinel dependency missing).Staging now uses global-style
npm install -g --prefix: npm nests dependencies inside the package exactly like the live global tree this stage replaces. The staged path is resolved across both layouts (POSIXlib/node_modules/<pkg>, Windowsnode_modules/<pkg>).Verification
@bitkyc08/opencodex@2.25.0, rantransactionalNpmUpdateagainst the actual npm registry —{ ok: true, phase: "done" }, post-swap live verifies,node_modules/zodpresent inside the package.bun test tests/update-transactional.test.ts— 9 pass / 0 fail (stub updated to the global layout).Checklist