[codex] harden worktree setup scripts#4450
Merged
ScriptedAlchemy merged 2 commits intomainfrom Feb 15, 2026
Merged
Conversation
|
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@module-federation/devtools
@module-federation/cli
create-module-federation
@module-federation/data-prefetch
@module-federation/dts-plugin
@module-federation/enhanced
@module-federation/error-codes
@module-federation/managers
@module-federation/manifest
@module-federation/metro
@module-federation/metro-plugin-rnc-cli
@module-federation/metro-plugin-rnef
@module-federation/modern-js-v3
@module-federation/retry-plugin
@module-federation/rsbuild-plugin
@module-federation/rspack
@module-federation/rspress-plugin
@module-federation/runtime
@module-federation/runtime-core
@module-federation/runtime-tools
@module-federation/sdk
@module-federation/third-party-dts-extractor
@module-federation/treeshake-frontend
@module-federation/treeshake-server
@module-federation/webpack-bundler-runtime
@module-federation/bridge-react
@module-federation/bridge-react-webpack-plugin
@module-federation/bridge-shared
@module-federation/bridge-vue3
@module-federation/inject-external-runtime-core-plugin
commit: |
Contributor
Bundle Size ReportNo bundle size changes detected. Total dist: 6.87 MB (no change) |
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
This PR hardens the worktree-safe wrapper scripts used by local setup and Nx execution.
Problem
Worktree commands were failing in two practical cases:
pnpm run nx:safe -- run <project>:<target>forwarded a literal--intonx, so Nx treated it as argument separator and dropped the command payload. This resulted in errors like "Not enough non-option arguments".pnpm installwith transient virtual-storeENOENTerrors (for example missingnode_modules/.pnpm/.../package.jsonduring first install), causing worktree initialization to abort.Root Cause
scripts/nx-worktree.shforwarded raw"$@"directly topnpm exec nxand did not normalize a leading--token.scripts/codex-setup.shalso passed raw install arguments and had no targeted recovery path for transient pnpm virtual-storeENOENTfailures.Fix
scripts/nx-worktree.shto normalize forwarded args:--when presentscripts/codex-setup.shto:--forpnpm run setup:codex -- ...usagenode_modules/.pnpm/.../package.jsonENOENTsignatureNX_DAEMON=false+ graph priming)User Impact
pnpm run nx:safe -- run ...pnpm run nx:safe run ...Validation
Executed locally:
bash -n scripts/codex-setup.sh scripts/nx-worktree.sh./scripts/codex-setup.sh -- --frozen-lockfilepnpm run nx:safe -- run runtime-core:build --helppnpm run nx:safe run runtime-core:build --helpnpx nx format:check