Skip to content

fix(plugins): pick the newest official plugin release the running OpenClaw supports - #167485

Merged
steipete merged 3 commits into
mainfrom
upd/upd-l1505
Oct 8, 2026
Merged

steipete merged 3 commits into
mainfrom
upd/upd-l1505

Conversation

@steipete

@steipete steipete commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #167382

What Problem This Solves

An older stable OpenClaw can select the newest official ClawHub plugin and then refuse its newer plugin-API requirement, even though the matching host-version build remains published. Thanks @charlesBerg-ux for reporting the Perplexity 2026.9.7/2026.9.9 case.

User Impact

Managed stable official ClawHub installs first try the running OpenClaw version. If that build is unpublished, installation warns and falls back to the original catalog candidate. An incompatible fallback names its required version and suggests upgrading or choosing an explicit compatible plugin version.

Default ClawHub update and drift detection retain their existing registry-latest behavior. Explicit operator versions, non-latest tags, and integrity pins retain their targets. No configuration, CLI, dependency, or schema changes are required.

Why This Change Was Made

The existing ClawHub channel resolver owns release selection. Managed installation explicitly opts into the host-version preference and uses the existing availability fallback. Other callers retain the resolver’s prior defaults, and the core-bound helper retains its channel gate. Selection adds no catalog paging or per-version metadata lookups.

This boundary matters because drift detection calls the same selector through resolveClawHubUpdateSpecs. Globally returning a host-version pin stopped drift resolution before its ClawHub latest-version lookup. The install-specific opt-in fixes that regression without changing the drift implementation or its test expectations.

The catalog’s exact candidate retains its digest, including on fallback. A different cohort build uses existing ClawHub artifact verification. The existing recordSpec preserves default intent, and unchanged channel plans retain their original candidate and pin.

Evidence

  • Own CI regression in checks-node-changed-8 on ef460fb52554f0dd695f6f2f6e0b376b9c04bcf8 reproduced locally: 20 failed / 34 passed in plugin-version-drift.test.ts. After the fix, all 54 unchanged drift tests passed three times, including registry-current, newest-release, and npm-only-catalog/recorded-ClawHub-identity cases.
  • Drift plus touched suites passed three times: 164 tests per run (54 drift, 31 channel selection, 18 managed installation, 61 ClawHub). Command: node scripts/run-vitest.mjs src/plugins/plugin-version-drift.test.ts src/plugins/install-channel-specs.test.ts src/plugins/management-service.install.test.ts src/plugins/clawhub.test.ts --maxWorkers=1. Runner wall times: 19.39 / 32.60 / 29.53 s. Per-file test times across the runs: drift 0.622 / 0.149 / 0.132 s; channel selection 0.079 / 0.099 / 0.087 s; managed installation 4.77 / 4.68 / 3.92 s; ClawHub 1.60 / 2.12 / 2.24 s.
  • Importer replay: 524 tests across 23 files passed in 147.51 s. Coverage includes update, drift, Doctor, onboarding, chat installation, consent, rollback, and transport deadlines.
  • node scripts/check-changed.mjs passed end to end with exit 0, including production/test typechecking, lint, dead-export scans, and repository guards. Targeted lint and typechecks also passed before the full run. git diff --check passed.
  • Read-only live ClawHub proof: managed-install selection chooses clawhub:@openclaw/[email protected] for host 2026.9.7; the same selector without the install opt-in retains clawhub:@openclaw/perplexity-plugin for update/drift. ClawHub confirms 9.7 remains published with plugin API >=2026.9.7. No live Gateway or package installation was used.
  • Independent P1 review was attempted and returned HTTP 401 Unauthorized, with no verdict. Proceeding under the explicit review exception for lead review. Hosted CI is not being waited on; auto-merge remains off.
  • Final PR numstat: production +75/-59 (net +16); tests +146/-20; docs +6/-1.

…nClaw supports

Resolve stable official ClawHub defaults through the managed install owner,
prefer the running host build, then select the newest compatible stable release.
Keep operator pins strict, bind catalog digests to their original artifacts,
and preserve default install intent when replacing a hosted catalog candidate.

Fixes #167382. Thanks @charlesBerg-ux for the report.
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M labels Oct 8, 2026
@steipete
steipete marked this pull request as ready for review October 8, 2026 22:17
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Oct 8, 2026
@clawsweeper

clawsweeper Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

Stable official ClawHub installs prefer the running OpenClaw version, fall back visibly to the catalog candidate when unavailable, and preserve explicit selectors and artifact integrity.

Example: Install the official Perplexity plugin on OpenClaw 2026.9.7

  • Before: The catalog selects @openclaw/[email protected], which requires plugin API >=2026.9.9 and is rejected.
  • After: The installer first selects @openclaw/[email protected] when that release is published.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The repair has clear product value and useful boundary coverage, but two concrete regressions and limited runtime evidence constrain confidence.
Proof confidence 🦐 gold shrimp (3/6) The maintainer-authored PR is exempt from the external-contributor proof gate; its managed-install tests mock artifact installation, and the live metadata lookup confirms release availability without demonstrating installation. Existing records retain their supported format and are not rewritten, so no data migration is required.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: An older supported OpenClaw cannot install an official plugin even though a compatible release remains published.
Reason: The reported 2026.9.7 installation should work without discovering a package-specific workaround. The existing installation owner’s contributor proposes a small repair without new configuration or public API.

Merge readiness

⛔ Needs changes before merge - 3 items remain

This PR addresses a real installation defect that remains on current main, but two actionable regressions prevent approval. The earlier extracted-wrapper dependency finding is resolved.

Priority: P2
Reviewed head: ef460fb52554f0dd695f6f2f6e0b376b9c04bcf8

Before merge

  • Preserve stable availability results for declared source fallback (P2) - When a stable official entry declares ClawHub first and npm second, and both the host cohort and original ClawHub candidate return package_not_found or version_not_found, this conversion returns RELEASE_COHORT_UNAVAILABLE. isUnavailablePluginSource recognizes that code only for npm, so the outer installWithSourceFallback stops without attempting the available npm secondary. The earlier unavailable-package concern remains through this replacement path. Preserve a retryable stable availability result after exhausting the catalog fallback while retaining terminal beta and compatibility refusals.
  • Adapt drift diagnostics to the new exact stable targets (P2) - This condition changes every official stable default into an exact host-version target, including calls through resolveClawHubUpdateSpecs. For a 2026.9.4 host with @openclaw/[email protected] installed, resolveClawHubTarget now rejects the selected @2026.9.4 before querying the registry. Doctor loses both its registry-lag explanation and confirmed correction-update commands. Exact-head CI reports these failures in plugin-version-drift.test.ts. Update the diagnostic consumer to confirm the selected target and handle unavailable cohorts rather than treating every exact stable target as unresolvable.
  • Explain or restore the original intent of src/plugins/plugin-version-drift.ts through the shared channel resolver - fix(doctor): resolve ClawHub plugin drift targets from ClawHub #145103: Use registry-confirmed ClawHub targets, preserve correction versions, and explain registry lag instead of prescribing unavailable host-version builds.

Findings

  • [P2] Preserve stable availability results for declared source fallback — src/plugins/management-install.ts:311-317
  • [P2] Adapt drift diagnostics to the new exact stable targets — src/plugins/install-channel-specs.ts:206-209

Provenance

  • src/plugins/plugin-version-drift.ts through the shared channel resolver changes intended behavior without addressing why it exists (fix(doctor): resolve ClawHub plugin drift targets from ClawHub #145103: Use registry-confirmed ClawHub targets, preserve correction versions, and explain registry lag instead of prescribing unavailable host-version builds.)

Tests

  • Missing end-to-end proof: No real plugins.install or CLI installation demonstrates the 2026.9.7 selection and fallback, and no stable-to-head run exercises existing ClawHub records through Doctor.
Agent review details

How this fits together

The shared plugin installer receives requests from the CLI and Gateway, selects a declared package source, and installs a reviewed artifact. The release-channel resolver also supplies targets to plugin updates and Doctor diagnostics.

flowchart TD
  A[CLI or Gateway install request] --> B[Official plugin catalog]
  B --> C[Shared release selection]
  C --> D[Running OpenClaw cohort]
  D --> E{Release available?}
  E -->|Yes| G[Artifact verification and installation]
  E -->|No| F[Catalog candidate and declared fallback]
  F --> G
  C --> H[Update and Doctor targets]
Loading

Technical review

Best possible solution:

Keep cohort selection in the shared owner while preserving stable declared-source fallback and teaching drift diagnostics to confirm exact cohort targets and explain unavailable releases.

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

Yes: the reported plugins.install request on 2026.9.7 with a 2026.9.9 catalog candidate reaches the incompatible-release refusal in current-main source; this review did not run that setup.

Is this the best way to solve the issue?

The shared-owner approach is appropriate, but the current implementation is incomplete because its fallback classification and existing diagnostic consumers do not support the new stable targets.

Full review comments:

  • [P2] Preserve stable availability results for declared source fallback — src/plugins/management-install.ts:311-317
    When a stable official entry declares ClawHub first and npm second, and both the host cohort and original ClawHub candidate return package_not_found or version_not_found, this conversion returns RELEASE_COHORT_UNAVAILABLE. isUnavailablePluginSource recognizes that code only for npm, so the outer installWithSourceFallback stops without attempting the available npm secondary. The earlier unavailable-package concern remains through this replacement path. Preserve a retryable stable availability result after exhausting the catalog fallback while retaining terminal beta and compatibility refusals.
    Confidence: 0.99
  • [P2] Adapt drift diagnostics to the new exact stable targets — src/plugins/install-channel-specs.ts:206-209
    This condition changes every official stable default into an exact host-version target, including calls through resolveClawHubUpdateSpecs. For a 2026.9.4 host with @openclaw/[email protected] installed, resolveClawHubTarget now rejects the selected @2026.9.4 before querying the registry. Doctor loses both its registry-lag explanation and confirmed correction-update commands. Exact-head CI reports these failures in plugin-version-drift.test.ts. Update the diagnostic consumer to confirm the selected target and handle unavailable cohorts rather than treating every exact stable target as unresolvable.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 98292f1cfa3a.

Provenance checked

  • src/plugins/management-install.ts release selection and fallback changes intended behavior with a stated reason (fix: installing an official plugin on a beta gateway lands the stable release #127791: Apply release-channel policy at the shared managed-install boundary, preserve operator selectors, and keep unavailable fresh beta cohorts terminal.)
  • src/plugins/install-channel-specs.ts shared stable selection changes intended behavior with a stated reason (9d2d517: Bind eligible extended-stable defaults to the core release while preserving explicit pins and other release policies.)
  • src/plugins/install-source-plan.ts recorded default intent keeps the original intent (feat: apply supported plugin installs without restarting the Gateway #145710: All supported installation sources share source planning, persistence, and runtime application.)
  • src/plugins/clawhub.ts compatibility refusals keeps the original intent (ffbbb64: Preserve distinct invalid, unknown-host, and incompatible outcomes while checking full release-version compatibility.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test src/plugins/management-service.install.test.ts src/plugins/install-channel-specs.test.ts src/plugins/clawhub.test.ts src/plugins/plugin-version-drift.test.ts --maxWorkers=1
  • pnpm test src/commands/doctor-post-upgrade.test.ts src/commands/doctor-workspace-status.plugin-version-drift.test.ts --maxWorkers=1
  • git diff --check
  • node scripts/check-changed.mjs

What I checked:

PR surface

Source +5, Tests +124, Docs +5. Total +134 across 8 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 78 73 +5
Tests 3 139 15 +124
Docs 1 6 1 +5
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 223 89 +134

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #167382
Summary: This PR is the candidate repair for the reported stable official Perplexity installation failure.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Labels

Label changes:

  • remove merge-risk: 🚨 automation: Current PR review merge-risk labels are merge-risk: 🚨 compatibility.

Label justifications:

  • P2: This repairs a bounded official-plugin installation failure with an explicit-version workaround.
  • merge-risk: 🚨 compatibility: The new shared stable policy breaks existing Doctor target resolution and can prevent declared npm fallback.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (2 earlier review cycles)
  • reviewed 2026-10-08T22:24:25.583Z sha 6cf95a1 :: needs changes before merge. :: [P2] Preserve unavailable-package results during compatibility lookup
  • reviewed 2026-10-08T22:30:49.687Z sha 6cf95a1 :: needs changes before merge. :: [P2] Preserve unavailable-package results during compatibility lookup | [P2] Include the new dependency in the extracted PR wrapper

Reviewed October 8, 2026, 7:17 PM ET / 23:17 UTC (Revision 3).

@clawsweeper clawsweeper Bot added the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Oct 8, 2026
Select the running host version through the existing ClawHub channel owner,
and reuse its availability fallback instead of walking published versions.
Preserve catalog digests on matching and fallback candidates, operator pins,
and unchanged channel plans. Keep the existing artifact verification for a
different cohort build and make incompatible-release guidance actionable.

Refs #167382. Thanks @charlesBerg-ux for the report.
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. label Oct 8, 2026
Keep default ClawHub update and drift targets on their existing registry
selection. Only managed installation opts into the host-version preference
and unavailable-cohort fallback through the shared channel owner.

Restore the core-bound helper channel gate. This fixes the drift regression
introduced in ef460fb without changing drift code or test expectations.

Refs #167382.
@steipete
steipete merged commit 5ac5bfe into main Oct 8, 2026
126 checks passed
@steipete
steipete deleted the upd/upd-l1505 branch October 8, 2026 23:40
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 9, 2026
…OpenClaw on stable (openclaw#167485)

Stable official ClawHub installs (catalog and plugins.install source=official) resolved ClawHub's newest release, so after 2026.9.9 shipped a 2026.9.7 host received @openclaw/[email protected] (pluginApiRange >=2026.9.9) and refused it. Managed installs now opt into the existing release-channel resolver's same-version selection for official stable installs and fall back to the default spec only when that build is not published; plugin updates and drift detection keep their registry target. Incompatible refusals now tell the operator to upgrade OpenClaw or choose an explicit plugin version. Beta and extended-stable behavior unchanged; operator pins stay strict. Closes openclaw#167382. Reported by @charlesBerg-ux.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: On 2026.9.7, plugins.install from the official catalog picks @openclaw/[email protected], which the same runtime then refuses

1 participant