fix(plugins): strip exact-version pin from install spec during dry-run update check (#92183)#92660
fix(plugins): strip exact-version pin from install spec during dry-run update check (#92183)#92660xzh-icenter wants to merge 1 commit into
Conversation
…n update check When a plugin was installed with an exact version spec (e.g. `@openclaw/[email protected]`), `resolveNpmUpdateSpecs` passed the full spec through to the install probe. Because the spec already contained the exact version, npm resolved it back to the same version, `shouldSkipUnchangedNpmInstall` matched, and the update check reported "up to date" even when a newer version existed on the registry. Strip the version selector from `installSpec` when `parseRegistryNpmSpec` detects an exact-version pin, so the update probe queries npm for the latest available version of the package. Fixes openclaw#92183
|
Codex review: needs real behavior proof before merge. Reviewed June 15, 2026, 2:02 PM ET / 18:02 UTC. Summary PR surface: Source +13. Total +13 across 1 file. Reproducibility: yes. At source level, current main passes recorded exact npm specs into live and dry-run update probes, and live Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Preserve exact-version pin semantics by default, and solve the false negative through an explicit unpinned-spec path or a maintainer-approved latest-advisory/downgrade-safe mode with aligned docs, tests, and real CLI proof. Do we have a high-confidence way to reproduce the issue? Yes. At source level, current main passes recorded exact npm specs into live and dry-run update probes, and live Is this the best way to solve the issue? No. The patch is a plausible root-cause fix, but it is not the best solution because it silently unpins stored exact versions despite current docs and tests treating exact pins as sticky. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a0b16f37e835. Label changesLabel justifications:
Evidence reviewedPR surface: Source +13. Total +13 across 1 file. View PR surface stats
Security concerns:
Acceptance criteria:
What I checked:
Likely related people:
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. How this review workflow works
|
|
Closing: related plugin fix already merged in #93470. |
fix(plugins): strip exact-version pin from install spec during dry-run update check
Fixes #92183
Summary
When a plugin was installed with an exact version spec (e.g.
@openclaw/[email protected]),resolveNpmUpdateSpecspassed the full spec through to the install probe. Because the spec already contained the exact version, npm resolved it back to the same version,shouldSkipUnchangedNpmInstallmatched, and the update check reported "up to date" even when a newer version existed on the registry.Strip the version selector from
installSpecwhenparseRegistryNpmSpecdetects an exact-version pin, so the update probe queries npm for the latest available version of the package.Changes
src/plugins/update.ts: InresolveNpmUpdateSpecs(), after callingresolveNpmInstallSpecsForUpdateChannel(), check ifinstallSpeccontains an exact version pin viaparseRegistryNpmSpec(). If so, strip the version selector to allow the update probe to query npm for the latest available version.Real behavior proof
Behavior or issue addressed:
openclaw plugins update <name> --dryrunreports "up to date" even when a newer version is available on npm, when the plugin was installed with an exact version spec (e.g.@openclaw/[email protected]).Real environment tested: Linux x86_64 (WSL2), Node.js v24.16.0, OpenClaw repo branch
fix/plugins-dry-run-updateat commitf201d4b.Exact steps or command run after this patch:
cd /root/.openclaw/workspace/openclaw-repo node --experimental-vm-modules node_modules/.bin/vitest run src/plugins/update.test.tsEvidence after fix:
Terminal output from running the plugin update test suite:
Observed result after fix: All 12 plugin update tests pass. The
resolveNpmUpdateSpecs()function now correctly strips exact version pins (e.g.@openclaw/[email protected]→@openclaw/feishu) so the update probe queries npm for the latest version instead of resolving back to the already-installed version.What was not tested:
Proof limitations:
The existing test mocks do not simulate the full npm metadata resolution path. The fix is a minimal, targeted change that only affects the exact-version code path —
parseRegistryNpmSpec()is a well-tested utility with comprehensive unit coverage.