Repository navigation
fix: keep unavailable configured plugins from rolling back updates - #150016
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. |
|
Codex review: blocked before merge. Reviewed September 16, 2026, 2:18 PM ET / 18:18 UTC (Revision 6). ClawSweeper reviewWhat this changesMakes unavailable configured plugins produce Doctor warnings and degraded Gateway readiness while preserving pending migrations and repair guidance. Merge readiness⛔ Blocked before merge - 1 item remains This PR remains useful: current main still contains the lint and readiness blockers it addresses. The earlier documentation concern is resolved, the integration preserves the intended repair, and no actionable introduced defect was found. Priority: P1 Review scores
Verification
How this fits togetherDoctor checks configuration and installed plugins before updates and Gateway startup. Its findings determine whether an update proceeds, while plugin quarantine lets the Gateway serve available capabilities and report unavailable ones. flowchart TD
A[Configuration and installed plugins] --> B[Doctor verification]
B --> C{Plugin available?}
C -->|Yes| D[Registered health checks]
C -->|No| E[Warning and plugin quarantine]
D --> F[Update and startup gates]
E --> F
F --> G[Gateway readiness and repair guidance]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +7, Tests +415, Docs +31. Total +453 across 22 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep plugin availability advisory through the existing Doctor and quarantine owners while preserving import trust, real health errors, and pending migration inputs. Do we have a high-confidence way to reproduce the issue? Yes: current-main source exposes the missing-plugin lint exception and blocking startup warning path, supported by the supplied failing-before regressions and published-driver comparison; this review did not execute them. Is this the best way to solve the issue? Yes: the patch extends existing availability and warning owners, preserves actual health-check errors and import trust, and explicitly bounds the unchanged discovery limitation. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bf9a9ac70e77. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
Merged via squash.
|
…150312) * fix: preserve unavailable plugin paths during updates Record a typed preserve disposition at discovery and retain it through the plugin index. Keep uninspected settings intact across validation, cleanup, migration, and automatic activation; carry the warning into Doctor and update readiness reports. Refs #150016 and #149960. * test: activate missing-path upgrade fixture at startup * fix(doctor): preserve unavailable bundled path aliases * test(update): keep base upgrade install on native storage * test(update): verify retained migration sources for unavailable plugins * fix(plugins): retain filesystem inspection failures during updates * test(doctor): require the inspection diagnostic before projection checks * style(doctor): avoid mapped spreads in inspection findings * test(update): follow survivor runtime and artifact paths * fix(doctor): preserve availability warnings through startup repair * test(e2e): share upgrade survivor installation paths
…penclaw#150016) * fix(gateway): start degraded when a configured plugin cannot be verified * fix(doctor): warn when configured plugins are unavailable * fix(doctor): satisfy line caps and clarify discovery limits
…penclaw#150312) * fix: preserve unavailable plugin paths during updates Record a typed preserve disposition at discovery and retain it through the plugin index. Keep uninspected settings intact across validation, cleanup, migration, and automatic activation; carry the warning into Doctor and update readiness reports. Refs openclaw#150016 and openclaw#149960. * test: activate missing-path upgrade fixture at startup * fix(doctor): preserve unavailable bundled path aliases * test(update): keep base upgrade install on native storage * test(update): verify retained migration sources for unavailable plugins * fix(plugins): retain filesystem inspection failures during updates * test(doctor): require the inspection diagnostic before projection checks * style(doctor): avoid mapped spreads in inspection findings * test(update): follow survivor runtime and artifact paths * fix(doctor): preserve availability warnings through startup repair * test(e2e): share upgrade survivor installation paths
Refs #149960
What Problem This Solves
A missing or unverifiable configured plugin could roll an update back at candidate Doctor lint or Gateway startup, even when the core configuration remained valid.
User Impact
The repaired Doctor availability and payload-verification paths record warnings at the updater’s error threshold, and the Gateway starts degraded when a tracked plugin payload is unavailable. Update results,
openclaw update status --json, and Doctor identify the plugin and its next repair action. Authored configuration and pending migration inputs remain preserved.Ordinary lint severity selection still applies. Structural config errors, data-integrity refusals, ingress protection, and maintenance ownership keep their existing contracts. No schemas, dependencies, or product options change.
Why This Change Was Made
Startup verification and Doctor lint now use one plugin-availability policy. Startup sends convergence warnings through its existing collector. Health registration returns invocation-local findings for missing/untrusted owners and unavailable advertised APIs; it does not import untrusted artifacts. The health registry preserves check selection while preventing stale detect/repair callbacks from an unavailable owner, and restores the registered checks on a later healthy invocation. Errors reported by registered lint checks retain their existing handling.
Thanks to @Olli0103 and @holny for diagnosing the ClawHub source-selection failure. That source fix is already on main in #148518, although released 2026.9.4 lacks it. This PR adds catalog-backed cohort-repair coverage and repairs the remaining lint/readiness gates; source-resolution production changes are zero.
Known gaps: Missing configured
plugins.load.pathsand other unattributed discovery errors still block update candidates (src/plugins/discovery.ts:1171,src/gateway/server-startup-post-attach.ts:1345). Restore or correct the path before retrying. A severity-only change would remove the incomplete-discovery signal that protects authored plugin/channel config from stale auto-removal (src/commands/doctor/shared/stale-plugin-config.ts:94); config warnings also discard diagnostic classification before lint. A complete fix needs coordinated discovery, config-preservation, and typed warning/report transport changes. This PR uses the explicitly authorized scope escape hatch and qualifies both documentation pages; discovery runtime is unchanged.Evidence
Line-cap ratchet OK: 20 changed source files; no new violations or over-cap growth.No cap, suppression, baseline, dependency, or schema changes. The changed-file checks passed; fresh local and branch P1 reviews are scoped-clean for follow-up head12042fe8d84c82db05323e78c3365f5a824a8a14.OpenClaw plugin verification failed; refusing to report the gateway ready.Both now pass.node scripts/check-changed.mjspassed. One standalone lint wrapper hit the nested-checkout declaration guard; the approved directoxlintcheck passed and its deliberate no-map-spread canary failed. No suppressions or baseline changes were added.pnpm buildon1976265b235passed in 9m04s with zeroINEFFECTIVE_DYNAMIC_IMPORTwarnings. Canonical package inventory, integrity, and import-graph validation passed. Local and branch-mode Codex review (--mode branch --base origin/main, P1) were scoped-clean.1976265b235)ready:trueready:trueready:truestatus:ok, 9.4 retained; no rollbackready:true; Codexconfigured-unavailableopenclaw doctor --fixThe final tarball’s SHA-256 is
022b62f1c604175f51fda905d151968cf3aa83b6964bcf0f84b75df8edc3db00; its embedded build commit is1976265b235c3bc3d6469a8e5d4c197106eb169f. The harness verified installed bytes against that frozen artifact. Admission had 28.65 GiB free with no competing OpenClaw containers; minimum observed free space was 26.68 GiB. Owned containers, images, and runtime/install trees were removed after proof; summaries, phases, diagnostics, and logs remain.The cells use the repository upgrade-survivor lifecycle with a task-local fixture: real published Codex 9.3 installed through ClawHub, its actual tracked record retained, then only its isolated payload removed and Codex replacement requests denied. The published updater runs with
--no-restart, still exercises its private candidate Gateway canary, and is followed by an independently started Gateway. This proves the update and readiness path, not model inference or a system-service handoff.Two preliminary runs of the same final artifact completed the update but stopped in task-local proof checks: an assumption of one Codex failure record instead of several repair/verification stages, then a maintenance attempt while the owned Gateway was running. The adapter now recognizes fixture-bound availability outcomes and the shipped typed Doctor exit-86 advisory; 12 negative canaries still reject unrelated failures, consent/integrity errors, invalid nonzero exits, and missing guidance. The final row stops its Gateway before
doctor --fixand passes end to end. The advisory exit 86 is recorded, not hidden or treated as a core failure.The published-before row failed at Doctor health API resolution before the original issue’s two exact messages appeared. Its rollback and the readiness-only row are retained as observed plugin-health blockers, not exact-string live reproductions.
The schema-17 refusal was secondary: it disabled optional old-driver repair after lint had already failed. It was not a universal rejection of newer-schema candidates; the successful final row confirms that. Schema code is unchanged.
Published 9.3 schema refusal trace
After lint failed, the already-loaded 9.3 parent bound its repair environment to the private rehearsal and called
getRuntimeConfig()inprepareUpdateRepairInference. The exact database refusal was:assertSupportedStateSchemaVersionthrows that refusal viacreateNewerSqliteSchemaVersionError; config loading logs it and repair inference catches it, returningThe target configuration could not provide a usable inference route. Check model setup.It disabled repair of the already-failed candidate. The final reason remaineddoctor-failed. The normal driver path validates in candidate subprocesses and uses a fresh candidate finalizer after migration.Main really carries
OPENCLAW_STATE_SCHEMA_VERSION = 17insrc/state/openclaw-state-db-contract.ts:20. Commit 411ea27d9af (#143227) bumped 16→17 and is an ancestor of released 9.4 and this branch. No schema code changed here.The follow-up retains the Docker evidence from
1976265b235: the follow-up changes move the existing read-only-worker scope, relocate tests, and qualify documentation. The published ClawHub fixture has no configuredplugins.load.pathsand does not exercise the deferred discovery branch, so that row was not rerun for this follow-up.Current main
58bda85ea74af2648437c48bcfc3f90d400321f6was integrated to resolve one overlapping preflight extraction. Its checkpoint/persistence owner and schema-preparation work are retained unchanged. The final committed tree passes the nativepnpm check:line-cap-ratchet --base 58bda85ea74af2648437c48bcfc3f90d400321f6command. No ratchet, dependency, schema, or baseline changes are part of the PR diff against that base.