Repository navigation
fix(plugins): explain SDK incompatibilities after core updates - #139458
Conversation
|
🦞👀 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. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: blocked before merge. Reviewed September 5, 2026, 8:20 PM ET / September 6, 2026, 00:20 UTC. ClawSweeper reviewWhat this changesThe PR adds actionable plugin SDK import diagnostics and makes Doctor detect outdated runtime plugins against the newly installed core version. Merge readiness⛔ Blocked before merge - 1 item remains The PR remains useful: current main lacks both repairs, and no introduced correctness defect was found. Source inspection and the maintainer clarification resolve the previous migration concern. Priority: P2 Review scores
Verification
How this fits togetherThe plugin loader turns module failures into diagnostics consumed by inspection, status, and Doctor. Post-update Doctor compares installed plugin metadata with the core version and selects repairs through the existing installer. flowchart TD
A[Plugin module import] --> B[Loader error recorder]
B --> C[Inspection and Doctor diagnostics]
D[Installed plugin metadata] --> E[Compare with updated core]
F[Compatibility host version] --> E
E --> G[Existing consent and installation flow]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -1, Tests +149, Docs +16. Total +164 across 13 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep SDK repair guidance in the shared diagnostic recorder and use one compatibility-host version for Doctor's detection and installation decisions. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main compares installed runtime plugins with the old process VERSION even when post-update convergence supplies a newer compatibility host. The focused regression captures that mismatch; this review did not execute it. Is this the best way to solve the issue? Yes. The patch repairs the version input at candidate selection and extends the existing error recorder without adding a competing repair flow or changing SDK exports. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 75c7f919326d. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (4 earlier review cycles)
|
|
Maintainer verification of the data-model note: this diff adds no SQLite schema, storage format, retention, indexing, concurrency, or recovery changes. The Doctor change corrects the version input used to select an existing package repair; the installation, consent, selector-preservation, and record-commit flows are unchanged. The optional SDK information is attached to the existing runtime diagnostic channel. Upgrade compatibility is covered by the 111 passing configured-plugin repair tests, including the new old-process/new-core case, explicit and floating selector behavior, beta convergence, preservation of newer installed packages, and capability-consent behavior. The new regression failed before the detection fix and passes afterward. I consider the automated persistent-data-model classification inapplicable to this patch. The current merge blocker is CI run 33998298926. Its merge checkout includes a main-branch test regression in Holding the merge until that separate main repair and fresh exact-head CI are available. |
Post-update repair now uses the newly installed compatibility host version for both candidate detection and installation, so an updater still running old code refreshes stale configured runtime plugins. Preserve existing selector, consent, and newer-package behavior.
Annotate native SDK import failures through the existing registry diagnostic channel with the imported seam, core/build versions, and repair guidance. Preserve channel health classifications and raw-error suppression in model responses. Consolidate validation error recording and redundant formatting wrappers to keep production code net-negative across the repair.
e5cb283 to
85002ef
Compare
|
Final head: 85002ef. #139519 merged, and native preparation confirmed the failed old-head CI gate before W2 was rebased onto repaired main. The rebase had no conflicts; all three commits are patch-identical. The unrelated assertion file was not changed. Rebased proof: 410 focused tests passed, full The remaining automated data-model compatibility checkbox is inapplicable: candidate selection uses the same compatibility-host resolver as the existing installer; no schema, stored record, migration, or installer commit semantics changed. All 111 Doctor repair tests pass, including the regression where the loaded process version is older than the new core. The current ClawSweeper technical review confirms that contract and reports no actionable correctness or security findings. Production +90/-91 (net -1); tests +168/-19 (net +149); docs +16/-0. No additional PRs. |
|
Merged via squash.
|
* origin/main: (302 commits) test(gateway): preserve held-work close failures (#139593) refactor(exec): share package argument scanning (#139560) fix(audit): preserve sequence range validation before numeric decoding (#139587) fix(transcripts): retain capture ownership through failed cleanup (#139572) refactor(models): share selector reference traversal (#139571) perf(agents): classify allowlists without intermediate sets (#138392) chore(release): update appcast for 2026.9.2 (#139575) fix(ci): synchronize cloud retries and board widget input (#139506) fix(plugins): explain SDK incompatibilities after core updates (#139458) fix(voice-call): retain installed WebSocket behavior under Bun (#139567) test(text): consolidate literal sanitizer cases (#139579) test(gateway): observe native drain without a lint exception (#139576) test(memory): consolidate visibility fixtures without policy defaults (#139569) fix(ui): show shimmer skeletons while loading Control UI (#139525) test(qa): make cleanup child logging deterministic (#139566) test(cli): keep Unix socket fixtures within path limits (#139565) fix: avoid slow incognito key checks in large session stores (#139528) feat(macos): open Gateway windows from the Gateways menu (#139522) test(workshop): isolate marker casing fixture identities (#139554) fix(process): require cleanup evidence before releasing owned work (#139517) ... # Conflicts: # scripts/release-check.ts
* commit '047587a542ce205ee78354fbd88ba8ec05c07844': (45 commits) chore(ui): refresh control ui locales (#139481) fix(slack): keep prototype-named emoji shortcodes intact (#136374) fix(gateway): deliver upgrade rejection responses under Bun (#139516) refactor(test): simplify catalog guards and fix native report fixture (#139496) fix(macos): prevent dashboard fixture loopback timeouts (#139556) fix(matrix): preserve selected reply targets inside threads (#139479) test(gateway): preserve held-work close failures (#139593) refactor(exec): share package argument scanning (#139560) fix(audit): preserve sequence range validation before numeric decoding (#139587) fix(transcripts): retain capture ownership through failed cleanup (#139572) refactor(models): share selector reference traversal (#139571) perf(agents): classify allowlists without intermediate sets (#138392) chore(release): update appcast for 2026.9.2 (#139575) fix(ci): synchronize cloud retries and board widget input (#139506) fix(plugins): explain SDK incompatibilities after core updates (#139458) fix(voice-call): retain installed WebSocket behavior under Bun (#139567) test(text): consolidate literal sanitizer cases (#139579) test(gateway): observe native drain without a lint exception (#139576) test(memory): consolidate visibility fixtures without policy defaults (#139569) fix(ui): show shimmer skeletons while loading Control UI (#139525) ...
* commit 'refs/openclaw/tasks/pr-135167-main': (2467 commits) refactor(ios): reuse shared integer conversion (#139581) fix(sessions): prevent database lock failures during reclamation (#139469) perf(test): reuse transforms within owned scheduler slots (#139553) test(agents): share sparse transcript input fixtures (#139589) chore(ui): refresh control ui locales (#139481) fix(slack): keep prototype-named emoji shortcodes intact (#136374) fix(gateway): deliver upgrade rejection responses under Bun (#139516) refactor(test): simplify catalog guards and fix native report fixture (#139496) fix(macos): prevent dashboard fixture loopback timeouts (#139556) fix(matrix): preserve selected reply targets inside threads (#139479) test(gateway): preserve held-work close failures (#139593) refactor(exec): share package argument scanning (#139560) fix(audit): preserve sequence range validation before numeric decoding (#139587) fix(transcripts): retain capture ownership through failed cleanup (#139572) refactor(models): share selector reference traversal (#139571) perf(agents): classify allowlists without intermediate sets (#138392) chore(release): update appcast for 2026.9.2 (#139575) fix(ci): synchronize cloud retries and board widget input (#139506) fix(plugins): explain SDK incompatibilities after core updates (#139458) fix(voice-call): retain installed WebSocket behavior under Bun (#139567) ...
…law#139458) * fix(doctor): detect stale runtime plugins against updated core Post-update repair now uses the newly installed compatibility host version for both candidate detection and installation, so an updater still running old code refreshes stale configured runtime plugins. Preserve existing selector, consent, and newer-package behavior. * fix(plugins): explain incompatible SDK imports Annotate native SDK import failures through the existing registry diagnostic channel with the imported seam, core/build versions, and repair guidance. Preserve channel health classifications and raw-error suppression in model responses. Consolidate validation error recording and redundant formatting wrappers to keep production code net-negative across the repair. * test(doctor): keep version-skew fixture ahead of the running core
What Problem This Solves
Fixes an issue where plugin SDK import failures after a core update produced raw native errors without identifying the repair. Community reports described missing named SDK exports and plugins resolving an incompatible nested OpenClaw SDK. Post-update Doctor could also miss a stale configured runtime plugin because it compared against the updater process's previous version.
Related: #137777, which already repaired failed-plugin generation admission and keeps model-facing errors pointed at runtime inspection.
Why This Change Was Made
src/plugins/loader-records.tsnow recognizes native SDK import failures, including wrapped causes, through the existing error recorder. An optionalsdkCompatibilitydiagnostic carries the imported seam, running core, build version when known, and nested-SDK attribution. Existing log lines, plugin errors, inspection output, and Doctor diagnostics receive the same repair message. Existing classifications such aschannel-setup-failureremain intact because status health checks depend on them.Doctor now uses the same compatibility host version for stale-runtime detection and installation (
src/commands/doctor/shared/missing-configured-plugin-install.candidates.ts). Validation errors share the existing recorder while preserving silent validation reporting. Redundant identity arguments and a one-call diagnostic append wrapper are removed. Plugin ids that require quoting receive plain update/author guidance instead of an unquoted command. No Plugin SDK exports are removed or renamed, and existing diagnostics require no new fields.Forwarding raw loader failures into model responses and adding a second error channel were rejected. The existing model error names the failed owner and directs the operator to
openclaw plugins inspect <id> --runtime --json; that path is retained. This PR covers diagnostics and the configured-runtime Doctor repair; broader registry-source selection and post-update failure policy are outside this continuation.The data-model classifier was checked against the diff: no SQLite schema, storage format, retention, indexing, concurrency, or recovery semantics change. Doctor selects an existing repair using the corrected version input; the existing installer and record-commit contracts remain intact. The 111 passing repair tests cover upgrade/selector compatibility.
User Impact
Operators can identify which plugin imported which SDK seam, see the running core/build versions, and follow the update instruction. Nested-SDK failures explicitly tell the operator to update the plugin or contact its author. Configured runtime repair no longer treats an old plugin as current merely because the updater process still runs old code.
Evidence
Head: 85002ef
node scripts/run-vitest.mjs src/plugins/loader-records.sdk-compatibility.test.ts src/plugins/loader-records.test.ts src/plugins/loader.cli-metadata.test.ts src/plugins/loader.test.ts: passed (231 tests before the additional classification case).node scripts/run-vitest.mjs src/plugins/loader-records.sdk-compatibility.test.ts src/plugins/loader-records.test.ts src/agents/harness/runtime-plugin.test.ts src/agents/prepared-model-runtime.reply-fallback.test.ts src/commands/doctor-workspace-status.test.ts: passed (80 tests before the additional classification case).node scripts/run-vitest.mjs src/plugins/loader-records.sdk-compatibility.test.ts src/plugins/loader-records.test.ts src/status/status-plugin-health.test.ts: passed (35 tests), including the final classification correction.node scripts/run-vitest.mjs src/commands/doctor/shared/missing-configured-plugin-install.test.ts: passed again (111 tests), with the newer-core fixture derived from VERSION so it stays valid across releases; the new post-core case failed on the original production code because no install was attempted.pnpm openclaw plugins inspect whatsapp --runtime --jsondisplayed the SDK diagnostic and update command. No live Gateway or user state was changed.node scripts/run-vitest.mjs src/plugins/loader-records.sdk-compatibility.test.ts src/plugins/loader-records.test.ts src/plugins/loader.test.ts src/status/status-plugin-health.test.ts: passed (233 tests), including the id-formatting regression; the final recorder-only rerun passed all 16 tests.pnpm build: passed, including Plugin SDK export verification; the subsequent formatter-only correction changes no imports or public types and is covered by focused tests.pnpm check:changed: passed on the final source.pnpm docs:list, formatting, andgit diff --check: passed.git range-diffconfirms all three commits remain patch-identical. Fresh exact-head CI is green: run 34000725024. One unrelated tooling test reported process-group cleanup failure; all seven cases passed locally, then one failed-job rerun passed on the unchanged head. Neither unrelated test was modified.pnpm check:changedpassed in full using a task-local copy of the repository-pinned pnpm after the shared executable disappeared.git diff --checkis clean; native Testbox preparation is complete.Cumulative LOC: production +90/-91 (net -1); tests +168/-19 (net +149); docs +16/-0. All changes are maintainer-authored from the reported symptoms; no external contributor patch was incorporated.