Repository navigation
fix(plugins): pick the newest official plugin release the running OpenClaw supports - #167485
Conversation
…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.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs changes before merge. What this changesStable 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
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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 Before merge
Findings
Provenance
Tests
Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 98292f1cfa3a. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceAcceptance criteria:
What I checked:
PR surfaceSource +5, Tests +124, Docs +5. Total +134 across 8 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (2 earlier review cycles)
Reviewed October 8, 2026, 7:17 PM ET / 23:17 UTC (Revision 3). |
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.
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.
…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.
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
recordSpecpreserves default intent, and unchanged channel plans retain their original candidate and pin.Evidence
ef460fb52554f0dd695f6f2f6e0b376b9c04bcf8reproduced locally: 20 failed / 34 passed inplugin-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.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.node scripts/check-changed.mjspassed 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 --checkpassed.clawhub:@openclaw/[email protected]for host 2026.9.7; the same selector without the install opt-in retainsclawhub:@openclaw/perplexity-pluginfor update/drift. ClawHub confirms 9.7 remains published with plugin API>=2026.9.7. No live Gateway or package installation was used.