pnpm: disable package-manager self-switch in sandbox (entrypoint) #33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "glen/pnpm-entrypoint-selfswitch"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
pnpm/entrypoint.toml— two env additions:PNPM_CONFIG_MANAGE_PACKAGE_MANAGER_VERSIONS = "false"— pnpm ≥ 12 self-installs the version a project pins underpackageManager(e.g. 360-polymer'spnpm@12.5.1) into its store and re-execs into it before any command. Inside the sandbox that self-install died with:failing every pnpm invocation in the project (
pnpm/crates/cli/src/engine_pm/install.rs:154—create_dir_all(<store>/tmp/pnpm-engine-<ver>-…)resolving onto the read-only scratch root). With the switch off, the sandboxed 12.6.0 is the single deterministic package manager — upstream fidelity: we don't run unverified upstream pnpm builds by design. Per-invocation escape hatch:npm_config_manage_package_manager_versions=true.XDG_STATE_HOME = "/persist/state"— pnpm's state dir (env lockfiles, managed-runtime materializations) defaults to~/.local/state; redirect to the writable/persistbind per the repo's persist pattern, alongside the existing DATA/CACHE redirects.Evidence
tools/verify.sh pnpmon bee (isolated store/config, release engine):Behavioral check in a project pinning
pnpm@12.5.1(the polymer case):(bee's sandbox has no DNS, so the suppressed-download path can't be exercised there; the suppression env is the same mechanism Chad verified live on the thinkpad via the
npm_config_…=falseenv var — polymer'spnpm secrets:setthen worked.)No pin/Containerfile changes — entrypoint only.