fix(plugins): clear hidden npm lock during peer repair#78265
fix(plugins): clear hidden npm lock during peer repair#78265Patrick-Erichsen wants to merge 2 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Summary Reproducibility: Do we have a high-confidence way to reproduce the issue? No: source inspection and npm's hidden-lockfile contract make the stale-cache failure plausible, but there is no live current-branch managed npm install trace showing the hidden lock preserving stale peer state. Real behavior proof Next step before merge Security Review detailsBest possible solution: Land or fold this hidden-lock cleanup with the managed-root peer repair stack once #78251 is ready, with real managed npm install or repair proof attached. Do we have a high-confidence way to reproduce the issue? Do we have a high-confidence way to reproduce the issue? No: source inspection and npm's hidden-lockfile contract make the stale-cache failure plausible, but there is no live current-branch managed npm install trace showing the hidden lock preserving stale peer state. Is this the best way to solve the issue? Is this the best way to solve the issue? Yes as a code direction: using npm cleanup first and deleting the hidden lockfile after direct What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against be1c99b76a59. |
f12b261 to
ff10c47
Compare
97c6830 to
a47973d
Compare
|
Superseded by #78291, which is now merged on The merged canonical fix includes the hidden-lock/root-poison cleanup plus the broader managed npm peer repair and regression coverage, so this narrower PR is no longer needed. Closing to avoid duplicate review paths. |
Summary
openclawpeer state with npm-owned cleanup first:npm uninstall openclawwhen the root manifest still lists it, otherwisenpm prunefor lock/disk residuenode_modules/.package-lock.jsonVerification
pnpm test src/infra/npm-managed-root.test.ts src/plugins/install.npm-spec.test.tspnpm exec oxfmt --check --threads=1 src/infra/npm-managed-root.ts src/infra/npm-managed-root.test.ts src/plugins/install.ts src/plugins/install.npm-spec.test.tspnpm test src/infra/npm-managed-root.test.ts src/plugins/install.npm-spec.test.ts(tbx_01kqxs1ahp3ggp95mwrqnh5eb0, exit 0)Stacks on #78251.