Repository navigation
fix(sandbox): keep pnpm's virtual store in the project, create its home - #2232
Merged
Merged
Conversation
apache#2223 turned on pnpm's global virtual store so the .idea/codeStyles files some packages ship stayed out of the project, where Claude Code refuses them. In Airflow's UI that broke type-checking: TypeScript resolves a package's types by walking up from the package's real path to the project's node_modules, where the project's own @types packages are linked, and from a virtual store outside the project the walk never reaches them. tsc went from 0 errors on a plain install to 148, the type-aware lint from 0 to 455, and the lint's autofix stripped correct casts. A per-project virtual store moved into the sandbox home fails the same way; apache#2223's test-plan line that the hook passed came from a stale node_modules. The global virtual store is no longer required, and the docs and skills say not to turn it on; verify reports it as a warning and update as drift. The per-project home stays for .tools, the cache and the content store, which fixes the ~/Library/pnpm EPERM and does not affect type resolution. A dependency that ships .idea/codeStyles (iconv-lite 0.6.3; 0.7.0 and later do not) still fails a sandboxed install in the project: the troubleshooting entry gives the project-side override. A sandbox grant also takes effect only on a directory that exists, and a sandboxed command cannot create ~/.local/share/pnpm-sandbox/<project>, since ~/.local/share is not writable: the first sandboxed install in Airflow failed with EPERM on the home's .tools. The install skill now proposes `mkdir -p` for it, to run outside the sandbox, verify reports a home that does not exist, and the docs and spec say so. Generated-by: Claude Opus 5
potiuk
enabled auto-merge (squash)
November 22, 2026 10:19
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
Follow-up to #2223, after an end-to-end run in Airflow with the merged settings.
npm_config_enable_global_virtual_storeso the.idea/codeStylesfiles some packages ship stay out of the project, where Claude Code refuses them. But TypeScript resolves a package's types by walking up from the package's real path to the project'snode_modules, where the project's own@types/*are linked; from a virtual store outside the project that walk never reaches them. Airflow's UI went from 0tscerrors on a plain install to 148, and the type-aware lint from 0 to 455, with its autofix stripping correct casts. A per-project virtual store moved into the sandbox home fails the same way (148 / 461). fix(sandbox): give sandboxed pnpm its own home and store #2223's test-plan line that the hook passed came from a stalenode_modules.sandbox-lintno longer requires the flag (it is not a sandbox matter); the docs and the install skill say not to turn it on; verify reports it as ⚠ and update as drift to remove. The per-project home stays for.tools, the cache and the content store: it fixes the original~/Library/pnpmEPERM and does not affect type resolution. The dispatcher still drops the flag for host-run hooks if an older setup sets it..idea/codeStylesis the project's to fix. A dependency that ships it fails a sandboxed install inside the project. The troubleshooting entry gives the project-side override (iconv-lite0.6.3 ships.idea/; 0.7.0 and later do not, and 0.7.0 is a bug-fix release), how to find the package, and that an oldnode_modulesholding such a package must be deleted once outside the sandbox (the sandbox can neither create nor unlink those files).~/.local/shareis not writable, so a sandboxed command cannot create~/.local/share/pnpm-sandbox/<project>; the first install failed with EPERM on the home's.tools. The install skill proposesmkdir -pto run outside the sandbox, verify reports a missing home, and the docs and spec say so.Type of change
.claude/skills/<name>/) — eval fixtures updated belowtools/*/withpyproject.toml)docs/,README.md,CONTRIBUTING.md)Test plan
prek run(all hooks but the tests) passessandbox-linttests: no pnpm error with the flag unset,"true"or"false"; the rest of fix(sandbox): give sandboxed pnpm its own home and store #2223's checks unchangedsetup-preflighttests (fingerprint restamped)case-9-whole-user-hooks-unreadable, unrelated to pnpm, passes re-run alone)tsc0 errors, oxlint 0tsc148, oxlint 455tsc148, oxlint 461iconv-liteoverridden to^0.7.0(resolved 0.7.3): sandboxed install passes with no bypass,tsc0, oxlint 0, no.ideaanywhere undernode_modules/.pnpmEPERM ... mkdir '~/.local/share/pnpm-sandbox/airflow/.tools/...'; created withmkdir -poutside the sandbox, the install passes with no restartRFC-AI-0004 compliance
Notes for reviewers (optional)
iconv-liteoverride belongs in the adopting project (Airflow'sui/package.json), not here: it changes a production dependency path (mermaid → d3 → d3-dsv).npm_config_enable_global_virtual_storeand restart their sessions;setup-isolated-setup-updatewill report it.🤖 Generated with Claude Code