fix(cli): show working commands for pinned plugin drift#95541
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 21, 2026, 2:32 PM ET / 18:32 UTC. Summary PR surface: Source +36, Tests +143. Total +179 across 6 files. Reproducibility: yes. Current main source prints id/generic drift hints, and the documented update contract says id updates preserve exact pins while explicit npm specs change the tracked target. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land a maintainer-approved recovery story where doctor/status provide copy-paste-safe exact-pin commands and the bulk updater remains the fleet-wide convergence path, or revise the hints to the single approved workflow. Do we have a high-confidence way to reproduce the issue? Yes. Current main source prints id/generic drift hints, and the documented update contract says id updates preserve exact pins while explicit npm specs change the tracked target. Is this the best way to solve the issue? Yes for the narrow per-plugin hint path, pending maintainer acceptance of the operator guidance. Deriving the target from the parsed exact install spec is the maintainable fix; the alternative is to use only the bulk update path once that path is approved. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6fa944e80f22. Label changesLabel justifications:
Evidence reviewedPR surface: Source +36, Tests +143. Total +179 across 6 files. View PR surface stats
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
|
|
@clawsweeper re-review Updated for the first review on head
Related #94084 remains the bulk |
|
🦞🧹 I asked ClawSweeper to review this item again. |
855dd29 to
d41b9b5
Compare
|
Merged via squash.
Thanks @ooiuuii! |
Merged via squash. Prepared head SHA: d41b9b5 Co-authored-by: ooiuuii <[email protected]> Co-authored-by: vincentkoc <[email protected]> Reviewed-by: @vincentkoc
What Problem This Solves
Fixes an issue where operators who saw official managed plugin version drift after an upgrade could be given a repair command that did not actually advance exact npm pins.
During a Windows upgrade to
2026.6.10-beta.1,doctor/status --deepreported active official plugins such asbrave,discord,qqbot, andwhatsappstill on2026.6.9. The suggestedopenclaw plugins update <plugin-id>command was not sufficient for those records because their install records were exact npm pins like@openclaw/[email protected]; an id-only update preserves that pin and reports the stale version as up to date.Why This Change Was Made
This keeps the existing plugin update semantics intact and fixes the operator guidance instead. Plugin drift now resolves the update command for each drift entry: floating installs still use
openclaw plugins update <plugin-id>, while exact npm pins use an explicitopenclaw plugins update <package>@<gatewayVersion>target derived from the parsed exact npm spec.Related: #94084 owns the bulk
openclaw plugins update --allofficial-sync path. This PR is intentionally narrower: it makes the per-plugin repair command printed bydoctor/gateway status --deepactionable without changing targeted id updates or--allbehavior.Out of scope: changing manual
plugins update <id>behavior, unpinning installs automatically, changing bulk update semantics, or changing how version drift is detected.User Impact
Operators can copy the drift repair command from
openclaw doctororopenclaw gateway status --deepand get the plugin onto the gateway version. For the beta upgrade case above, the advice becomes:instead of an id-only command that can preserve
@openclaw/[email protected].Evidence
Before evidence from the real upgrade:
Observed symptom during that upgrade:
openclaw plugins update brave,discord,qqbot, andwhatsappeach reported the2026.6.9install as up to date while the gateway was already on2026.6.10-beta.1; manually installing@openclaw/<package>@2026.6.10-beta.1 --force --pinrepaired the drift.After-fix real CLI proof from this PR head:
623e3dfcd6, OpenClaw source version2026.6.9.OPENCLAW_STATE_DIRandOPENCLAW_CONFIG_PATH; seeded the temporary SQLiteinstalled_plugin_indexwith a stale exact npm recordbrave/@openclaw/[email protected].gateway status --deepCLI path printed an exact package update command derived from the pinned npm spec, notopenclaw plugins update braveor the generic<plugin-id>placeholder.doctorshares the same formatter helper and has focused coverage, but the real CLI proof above usesgateway status --deep --no-probeto avoid this machine's unrelated live gateway/device-identity state.Local validation:
ClawSweeper follow-up addressed:
entry.specafter verifying it is an exact npm version.packageNamemetadata so the command still targets the pinned spec package.