Skip to content

fix(update): stage global-style so dependencies land inside the package - #2087

Merged
lidge-jun merged 1 commit into
devfrom
codex/fix-staging-hoist
Aug 19, 2026
Merged

fix(update): stage global-style so dependencies land inside the package#2087
lidge-jun merged 1 commit into
devfrom
codex/fix-staging-hoist

Conversation

@lidge-jun

Copy link
Copy Markdown
Owner

Summary

Release-regression-audit blocker for the 2.26.0 train: transactionalNpmUpdate (#2079) staged with a local-style npm install --prefix, which hoists the package's dependencies (bun, zod, ...) to stageRoot/node_modules — siblings of the package. The swap then moved only the package directory, shipping a dependency-less live tree, so every post-upgrade ocx update failed 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 (POSIX lib/node_modules/<pkg>, Windows node_modules/<pkg>).

Verification

  • Real-registry end-to-end: seeded a live tree from @bitkyc08/opencodex@2.25.0, ran transactionalNpmUpdate against the actual npm registry — { ok: true, phase: "done" }, post-swap live verifies, node_modules/zod present inside the package.
  • bun test tests/update-transactional.test.ts — 9 pass / 0 fail (stub updated to the global layout).

Checklist

  • Root cause (hoisting) reproduced and closed with a real-registry proof
  • Both platform layouts handled

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.
@lidge-jun
lidge-jun merged commit f2e5e76 into dev Aug 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Aug 19, 2026
@lidge-jun
lidge-jun deleted the codex/fix-staging-hoist branch August 19, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant