Repository navigation
refactor(doctor): route plugin config repairs through one executor - #162641
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 October 1, 2026, 8:05 AM ET / 12:05 UTC (Revision 2). ClawSweeper reviewWhat this changesDoctor, OpenClaw’s repair command, routes plugin config repairs through one executor that isolates failed hooks, preserves warnings, and continues subsequent repairs. Merge readiness⛔ Blocked before merge - 3 items remain The PR remains useful: current main and the latest release lack its isolation and warning-preservation fixes. No actionable patch defect was found, but the previously identified upgrade-proof gap remains. Priority: P2 Review scores
Verification
How this fits togetherDoctor combines existing operator configuration with plugin-owned repair hooks to prepare corrected configuration. Its existing validation, backup, and publication owners decide whether that configuration can be saved or activated during an update. flowchart TD
A[Operator configuration] --> B[Caller selects repair hooks]
B --> C[Shared repair executor]
C --> D[Private config candidate]
D --> E{Hook reports changes?}
E -->|Yes| F[Advance repaired configuration]
E -->|No or failure| G[Preserve previous configuration]
F --> H[Existing validation and backup write flow]
G --> H
Before merge
Agent review detailsSecurityNone. PR surfaceSource -23, Tests +165, Docs +5, Other -1. Total +146 across 13 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the shared executor with verified preservation of existing settings, backup ownership, and recovery behavior during published-updater upgrades. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main’s setup loop allows a hook to mutate the active candidate before returning null or throwing, and its compatibility executor drops warning-only output. No runtime reproduction was executed. Is this the best way to solve the issue? Yes: extending the existing compatibility executor preserves caller-owned selection and ordering while removing competing execution loops; update compatibility still needs the required boundary evidence. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 3ad238cc0696. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
…penclaw#162641) Run registered setup migrations, Doctor contracts, legacy channel previews and interactive channel compatibility hooks through one executor. Preserve migration phases, public registration and adapter receivers while isolating failed candidates and retaining warning-only results. Regression failures were reproduced on the base; focused and plugin-contract tests, changed checks, both cycle checks, SDK API comparison and independent reviews completed successfully.
What Problem This Solves
Plugin config repairs used separate execution loops in setup registration, Doctor contracts, legacy channel preview, and interactive channel repair. Those loops disagreed on failed-hook isolation and warning-only results.
User Impact
Repairs now preserve the last successful config when a plugin hook mutates then returns no changes or throws, keep warnings visible, and continue with remaining repairs. Public
registerConfigMigration, setup-before-Talk/model ordering, disabled/unavailable selection, state-free previews, and the existing backup/write owner remain intact. No configuration shape, schema, protocol, or SDK surface changes.Why This Change Was Made
All four paths execute through the existing Doctor compatibility owner. Selection and phase adapters remain because they carry existing contracts. Interactive channel hooks keep their merged-adapter receiver. The six bundled setup registrations remain in their established phase.
Measured reduction: 23 production lines. New isolation regressions live in a focused sibling. During conflict resolution, main's simplified registry suite and intentional retirement of old cases were preserved.
Fixes found along the way
Evidence
Final reviewed head:
d1dbec8adc92b8c5cbc9ea4e5d0133a0491eeea9, integrating main0689d93557e1. The only conflict was in registry tests; production merged cleanly. Fresh independent review was scoped-clean. A source-tree-verified AWS recheck passed 1,190 tests (including 1,132 current plugin contracts) in 177.97 seconds wall including runtime preparation. Both cycle checks again report zero. Hosted CI for this new head is pending.347b627f9c0c; the receiver regression also failed on the unbound intermediate candidate.347b627f9c0c→e4f49bdc0685: no changes.cbx_31e7faf5ddadthrough Crabbox's pinned SSH command after broker/sync failures. The approved bootstrap verified no instance-role credentials, pinned Node/pnpm, and installed frozen dependencies. Git bundles and the final source tree were verified before proof. Final focused wall time: 27.91s.Production coverage (baseline sizes)
Also read the legacy bridge/core entry points, compatibility base, executor, artifact loader, bootstrap adapters, and all six named bundled setup registrations. Removing the registrations would alter phase order or introduce a new phase policy, so they remain.