Repository navigation
Description
Found by a defect-hotspot pass over the 90 days to 2026-10-26.
Property
When any check says "up to date" (the install fast path, the frozen-tree check, the run/exec check from verifyDepsBeforeRun), a full install of the same selection would change nothing. When a check refuses, that install would change something.
Fixes in the loop
pnpm/pnpm#16324, pnpm/pnpm#16211, pnpm/pnpm#16268, pnpm/pnpm#16404, pnpm/pnpm#16992, pnpm/pnpm#16996, pnpm/pnpm#17019, pnpm/pnpm#17017, pnpm/pnpm#17030, pnpm/pnpm#17034, pnpm/pnpm#17025, pnpm/pnpm#17150, pnpm/pnpm#17174, pnpm/pnpm#17179, pnpm/pnpm#17325, pnpm/pnpm#17373, pnpm/pnpm#17328, pnpm/pnpm#16558.
Issues: pnpm/pnpm#17324, pnpm/pnpm#17322, pnpm/pnpm#17127, pnpm/pnpm#17011, pnpm/pnpm#17007, pnpm/pnpm#16705. Related: #45.
Design flaw
- One decision, several deciders. Freshness is decided in about 8 places:
- v12:
optimistic_repeat_install.rscheck_optimistic_repeat_install_in,optimistic_repeat_install/deps_status.rscheck_deps_status_before_run,install/workspace_state/nothing_to_install.rs,install/lockfile_freshness.rscheck_lockfile_freshnessandwanted_lockfile_satisfies_workspace,install/prepare_modules_state/up_to_date.rsfrozen_tree_up_to_date. - v11:
deps/status/src/checkDepsStatus.ts,lockfile/verification/src/allProjectsAreUpToDate.ts.
- v12:
- A settings matrix without a test matrix. Each setting reaches each decider by hand. The run check hard-coded
dedupe_peers: false(verifyDepsBeforeRun reinstalls before every run when dedupePeers is true and a pnpmfile is active (12.15.0 regression) pnpm#17322).pruneDirectDependencies, registry routes, bins and overrides/hooks were each missing from one decider until a user hit it. - Parity kept by hand. fix(package-manager): record which projects each install proved installed pnpm#17030 and fix(deps.status): record which projects each install proved installed pnpm#17034 are the same design written twice. fix: finish repeat-install and verifyDepsBeforeRun unification across v11 and v12 pnpm#17150 was a catch-up across 64 files.
Proposed change (3–4 PRs)
-
One input set,
InstallInputs, holding:- digests of the hooked manifests;
- a snapshot of the settings that affect the lockfile;
- patch, pnpmfile and bin digests;
- registry routes.
The full install records it per importer in the workspace state.
-
One
decide(scope, GatePolicy). The checks differ only by a small policy table. -
Port to v11 with shared golden vectors that pin identical digests in both stacks.
-
Oracle extensions (below).
Tests that would have caught the loop
pnpm/crates/cli/tests/suite/repeat_install_oracle.rs already compares the checks with a full install. Its Layout varies only hoisted × sharedWorkspaceLockfile × injectWorkspacePackages. Its snapshot leaves out .bin and re-imports, and its scenarios are written by hand.
- Add pnpmfile,
dedupePeers, overrides,patchedDependencies, a workspacebinand a scoped registry route as oracle axes. Add edits that touch the lockfile, change a bin and move a route. - Every setting classified: each
Configfield is either inInstallInputsor on an ignore list with a reason. This catches fix: require workspace root install after filtered install with pruneDirectDependencies pnpm#17179 and verifyDepsBeforeRun reinstalls before every run when dedupePeers is true and a pnpmfile is active (12.15.0 regression) pnpm#17322. - Generated sequences of filtered install, edit, deleting a per-project lockfile and filtered or unfiltered exec, checked against the oracle.
- Add
.binand re-import detection to the snapshot. Assert the run check agrees with the install fast path, apart from the policy table.
Fixes the change makes redundant
These are replaced by recorded inputs:
- The current-lockfile and closure reasoning in fix: accept a touched lockfile in verifyDepsBeforeRun after a filtered install pnpm#16324, fix(package-manager): hold selected projects to the wanted lockfile after a filtered install pnpm#17019 and fix: require current-lockfile proof for filtered installs without a wanted lockfile pnpm#17174.
- fix: verify patch contents before scripts pnpm#16992, fix(install): relink changed workspace bins on repeat installs pnpm#17325, the route record from fix(install): re-resolve plain-keyed packages when their scope moves to another registry pnpm#17373, the re-applied hooks in the checker from the v11:
verifyDepsBeforeRunand optimistic repeat install ignore versionoverrides, so a touched package.json looks outdated pnpm#17127 fix, and fix(verify-deps): compare dedupePeers in the pre-run lockfile check pnpm#17328. - The injection special cases in fix(install): keep the repeat-install fast path for injected workspace deps pnpm#16404 and fix(package-manager): read injected dependencies from the lockfile in the repeat-install check pnpm#17025.
Written by an agent (Claude Code, claude-opus-5-5).
Activity
zkochan commentedon Oct 26, 2026
pnpm/pnpm#17383 covers the first part of this task, the "every setting classified" test, for v12. It also removes the
dedupe_peerspass-through that let one gate hard-code the value (the pnpm/pnpm#17322 shape). It does not coverInstallInputs, the singledecide(), the v11 port, or the oracle axes.The classification found three confirmed gaps where the fast path reports up to date and a full install changes the tree:
virtualStoreDirMaxLength,globalVirtualStoreDir, and turning ondangerouslyAllowAllBuilds. For six more (symlink,enableModulesDir,extendNodePath,hoistingLimits,externalDependencies,nodePackageMap), only an install into an emptynode_modulesapplies the change. The PR description lists them all. v11 has not been checked for any of them.Written by an agent (Claude Code, claude-opus-5-5).
test(package-manager): classify every Config field by how it reaches …
zkochan commentedon Oct 26, 2026
pnpm/pnpm#17391 fixes the five fast-path gaps from pnpm/pnpm#17383 by recording them in the workspace state.
virtualStoreDirMaxLength,dangerouslyAllowAllBuildsandtrustLockfileare fixed in both CLIs.globalVirtualStoreDirandskipRuntimesare fixed in v12 only, because v11 does not have these settings. The six settings that neither the fast path nor a full install applies are still open, along withInstallInputs,decide(), the v11 port and the oracle axes.Written by an agent (Claude Code, claude-opus-5-5).
zkochan commentedon Oct 26, 2026
Correction to my last comment: pnpm/pnpm#17391 no longer records
skipRuntimes.fresh_install_with_no_runtime_resolves_but_does_not_fetch_the_runtimepins that a plain install after--no-runtimekeeps the runtime absent, which matches v11. Recording the setting would change that, so it stays a known gap until someone decides which behavior is intended.Written by an agent (Claude Code, claude-opus-5-5).
fix(install): record the settings the repeat-install fast path missed (…
zkochan commentedon Oct 26, 2026
pnpm/pnpm#17398 adds oracle axes to
repeat_install_oracle.rs:overrides, a pnpmfile hook,patchedDependencies,dedupePeers, a workspace bin, and a scoped registry route. Each is edited after an install and checked against a full install, in every layout and with both CLIs. The snapshot now records.binentries and the files of each registry dependency. A selection's view includes the lockfile snapshots it reaches.The new axes found two gate bugs, both fixed in that PR:
patchedDependenciespaths in different forms, so each CLI took the other's record for a changed setting.They also found install bugs, now filed as #224: a renamed workspace command is not relinked with dedicated lockfiles in v12, and both CLIs keep the old command.
Still open here:
InstallInputswould remove it.InstallInputs,decide()and the v11 port.Written by an agent (Claude Code, claude-opus-5-5).
test(install): add input axes to the repeat-install oracle and fix th…
zkochan commentedon Nov 3, 2026
Another concrete case for the "every setting classified" test:
extendNodePath.It changes the
NODE_PATHwritten into bin shims, but neither CLI records it in the workspace state (it is not inWorkspaceStateSettingsin v12 or in the settings key list inpnpm11/workspace/state/src/types.ts). If onlyPNPM_CONFIG_EXTEND_NODE_PATHchanges between installs, with no manifest, lockfile orpnpm-workspace.yamlchange, the fast path can leave the shims as they were. Changing it inpnpm-workspace.yamlrelinks them (bins_in_a_custom_modules_dir_are_relinked_when_extend_node_path_changes).pnpm v11 already behaves this way. pnpm/pnpm#17315 makes v12 read the variable, so v12 now matches it. Found by a review bot on that PR.
Written by an agent (Claude Code, claude-opus-5-5).
kairosci commentedon Nov 3, 2026
I opened pnpm/pnpm#17623 to record
extendNodePathin workspace state and relink command shims when the environment value changes. This covers only theextendNodePathgap; the remaining design and oracle work in this tracking issue is still open.Written by an agent (Codex, GPT-6).
fix(install): rewrite the bin shims after extendNodePath changes (#17622
test(install): cover extendNodePath env changes in a v11 repeat install
test(install): cover extendNodePath env changes in a v11 repeat insta…
zkochan commentedon Nov 8, 2026
Status check against main (2026-11-08).
Shipped since the body was written, without the core of this issue: pnpm/pnpm#17383, pnpm/pnpm#17391, pnpm/pnpm#17398, pnpm/pnpm#17622, pnpm/pnpm#17623 (
extendNodePath), pnpm/pnpm#17686 (the newinstall_state/module) and pnpm/pnpm#17702.install/workspace_state/nothing_to_install.rs, which the body cites, no longer exists.Left: there is still no
InstallInputsand no singledecide().Written by an agent (Claude Code, claude-opus-5-5).
docs(electron): delete a hoisted node_modules before adding hoistingL…
docs: add a recipe for packaging Electron apps (#18461)
fix(package-manager): treat a missing lockfile as outdated before run (…