Skip to content

fix(plugins): show upgrade command for stale official plugin pins - #105374

Closed
pandaAIGC wants to merge 2 commits into
openclaw:mainfrom
pandaAIGC:fix/official-plugin-core-version-hint
Closed

pandaAIGC wants to merge 2 commits into
openclaw:mainfrom
pandaAIGC:fix/official-plugin-core-version-hint

Conversation

@pandaAIGC

@pandaAIGC pandaAIGC commented Jul 12, 2026 •

Copy link
Copy Markdown

What Problem This Solves

Fixes an issue where users running an older exact-pinned lockstep official plugin would be told that the plugin was "up to date" even when its installed version lagged behind the current OpenClaw release line.

This is especially confusing when a newer core exposes a model or capability that requires the matching official plugin runtime. In the motivating case, OpenClaw 2026.7.1-beta.5 listed openai/gpt-5.6-sol as available while the exact-pinned @openclaw/[email protected] runtime rejected the request with a 400 error requiring a newer Codex version. openclaw plugins update codex --dry-run still reported the old pin as up to date.

Why This Change Was Made

Exact pins remain exact and are never updated implicitly. When an unchanged exact pin is older than the current OpenClaw version, the update path now prints the exact opt-in alignment command only if the trusted official catalog declares that package as lockstep-versioned.

The implementation reuses the catalog contract already used by plugin version-drift detection:

  • Official catalog npm specs without an exact catalog version are lockstep.
  • Official catalog npm specs with an exact catalog version are independently versioned and keep the existing message.
  • Matching and newer exact pins keep the existing message, so this change never recommends a downgrade.
  • Explicit spec overrides, official synchronization flows, third-party plugins, tags, and ranges keep their existing behavior.

User Impact

Operators with a stale lockstep pin can distinguish an intentionally unchanged pin from a healthy version match and receive an actionable command such as:

openclaw plugins update @openclaw/[email protected]

This does not change model defaults, provider routing, fallback order, dependency versions, or automatic update policy.

Evidence

Focused coverage now exercises both normal and dry-run paths for:

  • stale lockstep exact pins: emits the alignment command;
  • independently versioned official catalog pins: keeps the normal up-to-date message;
  • newer lockstep exact pins: keeps the normal up-to-date message and does not suggest a downgrade.

Real behavior proof

The current PR head was built from a clean checkout, copied into an isolated runtime, and run with isolated HOME, OPENCLAW_HOME, OPENCLAW_STATE_DIR, and OPENCLAW_CONFIG_PATH. No auth profiles, provider credentials, user config, or Gateway state were copied.

Current main identifies itself as development version 2026.7.2, for which matching official plugin packages are not yet published. For the executable proof only, the isolated runtime's package metadata was set to the published lockstep version 2026.7.1-beta.5; the executable code and build stamp remained the exact PR head:

$ openclaw --version
OpenClaw 2026.7.1-beta.5 (446ce98)

Installed a real older lockstep official package into the isolated state:

$ openclaw plugins install npm:@openclaw/[email protected] --force --pin
Pinned npm install record to @openclaw/[email protected].
Installed plugin: deepseek

The current branch generated the new dry-run diagnostic:

$ openclaw plugins update deepseek --dry-run
deepseek is pinned to @openclaw/[email protected] (installed 2026.6.11), which differs from OpenClaw 2026.7.1-beta.5. Pass `openclaw plugins update @openclaw/[email protected]` to match this OpenClaw version.

Executed the exact command printed by that diagnostic:

$ openclaw plugins update @openclaw/[email protected]
Updated deepseek: 2026.6.11 -> 2026.7.1-beta.5.

The same dry-run then confirmed convergence:

$ openclaw plugins update deepseek --dry-run
deepseek is up to date (2026.7.1-beta.5).

All four commands exited 0. This proof exercises real npm package installation and replacement through the current branch's production CLI; it does not exercise model inference or use provider credentials.

End-to-end motivating-case verification

The original gpt-5.6-sol incident was also re-verified after aligning OpenClaw core and @openclaw/codex at 2026.7.1-beta.5:

  • the Control UI model picker displayed both GPT-5.5 and GPT-5.6 Sol;
  • selecting GPT-5.5 in the UI and sending a turn without a CLI model override produced provider=openai, model=gpt-5.5, and agentHarnessId=codex;
  • selecting GPT-5.6 Sol in the same UI and sending another turn without a CLI model override produced provider=openai, model=gpt-5.6-sol, and agentHarnessId=codex;
  • restarting the Gateway preserved the selection, and a guard smoke turn again used openai/gpt-5.6-sol through the Codex harness.

The released beta also exposed a separate legacy model-catalog availability issue that could mark the working Codex-routed gpt-5.6-sol entry unavailable in chat.metadata. The target main branch already contains the route-aware catalog implementation that evaluates both the platform and ChatGPT subscription routes, so this PR does not duplicate that already-landed fix. The UI/inference transcript is included here as end-to-end validation of the motivating stale-plugin scenario, not as an additional code surface in this patch.

No credential values, auth database contents, account identifiers, or Gateway tokens were captured in this verification.

Current-head verification

node scripts/run-vitest.mjs run src/plugins/update.test.ts src/plugins/plugin-version-drift.test.ts
  2 files passed, 144 tests passed

pnpm check
  passed (typecheck, lint, formatting, policy guards)

pnpm build
  passed, exit 0

git diff --check origin/main...HEAD
  passed

The branch was rebased onto current origin/main before the verification above. The focused tests, full repository checks, build, and isolated production CLI proof were all rerun against the rebased head.

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 12, 2026
@clawsweeper

clawsweeper Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

Thanks for the context here. I did a careful shell check against current main, and this is already implemented.

Close as implemented: current main already detects stale active official plugin pins and gives the exact opt-in package update command through Gateway status and Doctor, making this branch’s second update-time diagnostic unnecessary.

So I’m closing this as already implemented rather than keeping a duplicate issue open.

Review details

Best possible solution:

Keep Gateway status and Doctor as the single canonical drift-detection and recovery surface, with exact package update commands for pinned official plugins.

Do we have a high-confidence way to reproduce the issue?

No; current main’s status and Doctor paths detect the stale official pin and emit the exact update command, with focused coverage for the Codex pin scenario.

Is this the best way to solve the issue?

Yes; the current status/Doctor flow is the better canonical solution because it compares records against the actual running Gateway rather than adding a second message to one update attempt.

Security review:

Security review cleared: The proposed diff adds no dependency, workflow, secret, permission, or supply-chain surface; its trusted-catalog use stays within existing plugin metadata handling.

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • ooiuuii: Authored the merged canonical pinned-plugin drift command fix. (role: canonical fix author; confidence: high; commits: 2ea0e8807a78; files: src/plugins/plugin-version-drift.ts, src/cli/daemon-cli/status.print.ts)
  • vincentkoc: The canonical fix commit records Vincent Koc as co-author and reviewer for the plugin-drift recovery path. (role: canonical fix co-author and reviewer; confidence: medium; commits: 2ea0e8807a78; files: src/plugins/plugin-version-drift.ts, src/commands/doctor-workspace-status.ts)

Codex review notes: model internal, reasoning high; reviewed against 6f418b93c632; fix evidence: release v2026.7.1-2, commit 2ea0e8807a78.

@pandaAIGC
pandaAIGC force-pushed the fix/official-plugin-core-version-hint branch from d7e29f6 to 69e4ab0 Compare July 12, 2026 15:54
@pandaAIGC

Copy link
Copy Markdown
Author

@clawsweeper re-review

Addressed the blocking feedback in head 69e4ab0:

  • reused the official catalog lockstep predicate;
  • limited the diagnostic to exact pins older than the core target;
  • added normal and dry-run coverage for independent and newer pins;
  • added current-head isolated CLI proof showing the generated command succeeding and convergence afterward.

@clawsweeper

clawsweeper Bot commented Jul 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@pandaAIGC

Copy link
Copy Markdown
Author

Additional end-to-end verification for the motivating gpt-5.6-sol case (local runtime, redacted):

  • OpenClaw core: 2026.7.1-beta.5
  • Official Codex plugin: 2026.7.1-beta.5, enabled and loaded
  • Fresh Gateway agent turn with --model openai/gpt-5.6-sol: status=ok, provider=openai, model=gpt-5.6-sol, agentHarnessId=codex
  • A two-turn continuity check on the same session passed with the same provider/model/harness metadata
  • After openclaw daemon restart, the forced-model agent turn passed again with the exact expected response marker

The primary model and fallback order were not changed. This verifies that aligning the stale official plugin pin resolves the real model-runtime failure and remains effective after Gateway restart.

@pandaAIGC

Copy link
Copy Markdown
Author

@clawsweeper re-review

@pandaAIGC
pandaAIGC force-pushed the fix/official-plugin-core-version-hint branch from 69e4ab0 to 446ce98 Compare July 12, 2026 23:57
@pandaAIGC

Copy link
Copy Markdown
Author

Current-head verification update for 446ce98e:

  • Rebased cleanly onto current origin/main
  • Focused plugin tests: 144/144 passed
  • pnpm check: passed
  • pnpm build: passed
  • git diff --check origin/main...HEAD: passed
  • Rebuilt the exact PR head in an isolated runtime
  • Installed @openclaw/[email protected], observed the branch-generated alignment command, executed that exact command, and confirmed 2026.7.1-beta.5 afterward; all commands exited 0
  • Re-verified the motivating Codex case through the real Control UI: selecting GPT-5.5 produced an OpenAI/Codex GPT-5.5 turn, then selecting GPT-5.6 Sol produced an OpenAI/Codex GPT-5.6 Sol turn without CLI model overrides
  • Gateway restart and the final Codex guard smoke preserved GPT-5.6 Sol

The released beta's separate legacy model-catalog availability issue is already covered by the route-aware implementation on the target main branch; no duplicate catalog patch was added to this PR. The PR body now documents that boundary and the redacted end-to-end evidence.

@pandaAIGC

Copy link
Copy Markdown
Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 13, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Jul 28, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Jul 31, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the stale Marked as stale due to inactivity label Aug 1, 2026
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Aug 5, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 15, 2026
@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

@clawsweeper clawsweeper Bot closed this Aug 16, 2026
@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper could not autoclose this item.

Reason: structured ClawSweeper close marker: close-required (sha=446ce98ec9aa2b1bb8441ff19289d1a3faa16a8c)

Usage: /autoclose <maintainer close reason>. I will close this item and any open same-repo items explicitly referenced in the command text.

steipete added a commit that referenced this pull request Sep 3, 2026
…7578)

Use the existing exact-pin diagnostic for unchanged official bulk updates
and dry runs. Preserve the recorded selector until the operator explicitly
changes it, including ambiguous pins created by older official syncs.
Remove no-op record-spec transformations from the canonical update owner.

Regression: four official cases fail before the repair while four third-party
controls pass. All 272 owner/sibling tests, full build, changed gate and
independent review pass. A fresh Linux baseline/candidate CLI proof preserves
both pins, reports the official newer release only after the fix, and executes
the printed selector-change command without changing the other plugin.

Production LOC: +15/-37 (net -22). Tests: +71/-35. Docs: +3/-1.
Related: #105374
Original automatic-pin producer already repaired by #134490.
github-actions Bot pushed a commit to zobdansleculzobdanslecul5562/openclaw that referenced this pull request Sep 3, 2026
…7578)

Use the existing exact-pin diagnostic for unchanged official bulk updates
and dry runs. Preserve the recorded selector until the operator explicitly
changes it, including ambiguous pins created by older official syncs.
Remove no-op record-spec transformations from the canonical update owner.

Regression: four official cases fail before the repair while four third-party
controls pass. All 272 owner/sibling tests, full build, changed gate and
independent review pass. A fresh Linux baseline/candidate CLI proof preserves
both pins, reports the official newer release only after the fix, and executes
the printed selector-change command without changing the other plugin.

Production LOC: +15/-37 (net -22). Tests: +71/-35. Docs: +3/-1.
Related: openclaw/openclaw#105374
Original automatic-pin producer already repaired by #134490.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 4, 2026
…nclaw#137578)

Use the existing exact-pin diagnostic for unchanged official bulk updates
and dry runs. Preserve the recorded selector until the operator explicitly
changes it, including ambiguous pins created by older official syncs.
Remove no-op record-spec transformations from the canonical update owner.

Regression: four official cases fail before the repair while four third-party
controls pass. All 272 owner/sibling tests, full build, changed gate and
independent review pass. A fresh Linux baseline/candidate CLI proof preserves
both pins, reports the official newer release only after the fix, and executes
the printed selector-change command without changing the other plugin.

Production LOC: +15/-37 (net -22). Tests: +71/-35. Docs: +3/-1.
Related: openclaw#105374
Original automatic-pin producer already repaired by openclaw#134490.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant