fix: bypass npm freshness for managed installs#83761
Conversation
|
Codex review: needs changes before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: yes. from source and the npm 11 contract. npm exits when PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. PR egg What is this egg doing here?
Real behavior proof Risk before merge
Maintainer options:
Copy recommended automerge instructionNext step before merge Security Review findings
Review detailsBest possible solution: Compute one freshness-bypass mode per npm command/env pair, thread the same config scope through both env and argv, and add staged global-update coverage for real user/global freshness config. Do we have a high-confidence way to reproduce the issue? Yes, from source and the npm 11 contract. npm exits when Is this the best way to solve the issue? No. The fix should compute or carry one scoped bypass decision through both the npm environment and command args instead of recomputing them from different config roots. Label justifications:
Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against d124c5aa2005. |
891349a to
84b5731
Compare
|
Additional stable-runtime validation from I hit a related plugin-update path today on stable Environment, redacted:
Reproduction on stable openclaw plugins update codex --dry-run
openclaw plugins update discord --dry-runBoth failed before registry/package resolution with: The local npm config exposed an effective Control check: When I reran the dry-run with both user and global npm config isolated to empty temporary npmrc files, the same command got past the config conflict. With network access: So the local failure was not package availability; it was inherited npm freshness config reaching the managed plugin-update Local workaround used: I installed the exact plugin versions directly and pinned them: Post-update validation: Interpretation:
|
* fix: bypass npm freshness for managed installs * test: tolerate npm config json differences * test: align npm freshness bypass expectation * fix: resolve npm config path expansions * test: tolerate npm zero config encoding --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix: bypass npm freshness for managed installs * test: tolerate npm config json differences * test: align npm freshness bypass expectation * fix: resolve npm config path expansions * test: tolerate npm zero config encoding --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix: bypass npm freshness for managed installs * test: tolerate npm config json differences * test: align npm freshness bypass expectation * fix: resolve npm config path expansions * test: tolerate npm zero config encoding --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix: bypass npm freshness for managed installs * test: tolerate npm config json differences * test: align npm freshness bypass expectation * fix: resolve npm config path expansions * test: tolerate npm zero config encoding --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix: bypass npm freshness for managed installs * test: tolerate npm config json differences * test: align npm freshness bypass expectation * fix: resolve npm config path expansions * test: tolerate npm zero config encoding --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix: bypass npm freshness for managed installs * test: tolerate npm config json differences * test: align npm freshness bypass expectation * fix: resolve npm config path expansions * test: tolerate npm zero config encoding --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix: bypass npm freshness for managed installs * test: tolerate npm config json differences * test: align npm freshness bypass expectation * fix: resolve npm config path expansions * test: tolerate npm zero config encoding --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix: bypass npm freshness for managed installs * test: tolerate npm config json differences * test: align npm freshness bypass expectation * fix: resolve npm config path expansions * test: tolerate npm zero config encoding --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix: bypass npm freshness for managed installs * test: tolerate npm config json differences * test: align npm freshness bypass expectation * fix: resolve npm config path expansions * test: tolerate npm zero config encoding --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix: bypass npm freshness for managed installs * test: tolerate npm config json differences * test: align npm freshness bypass expectation * fix: resolve npm config path expansions * test: tolerate npm zero config encoding --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
* fix: bypass npm freshness for managed installs * test: tolerate npm config json differences * test: align npm freshness bypass expectation * fix: resolve npm config path expansions * test: tolerate npm zero config encoding --------- Co-authored-by: Peter Steinberger <steipete@gmail.com>
Summary
Verification
Real behavior proof
Behavior addressed: OpenClaw-managed npm installs bypass user npm freshness filters without triggering npm's before/min-release-age conflict.
Real environment tested: macOS local checkout, Node 26.0.0, npm 11.14.1, pnpm 11.1.0.
Exact steps or command run after this patch: pnpm test src/infra/npm-install-env.test.ts -- --reporter=verbose
Evidence after fix: npm-install-env covered before policy, min-release-age policy, project/global/userconfig scanning, and expanded ~/.npmrc/${HOME}/.npmrc userconfig paths.
Observed result after fix: 15 tests passed; npm reports effective min-release-age as 0 for the release-age bypass case.
What was not tested: full release install/update flow against the public npm registry; CI covers the changed lanes before merge.