Repository navigation
fix(update): retain core Doctor warnings in finalization - #142091
Conversation
Record unresolved core contribution warnings and caught optional failures in Doctor's existing bounded update result. Share core/plugin repair reporting while preserving display, repair, required-failure and exit semantics. Related: #141995 Validation: 273 focused cases, 29 changed checks, independent P2 review.
|
🦞👀 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 8, 2026, 6:12 AM ET / 10:12 UTC. ClawSweeper reviewWhat this changesPreserves unresolved core Doctor warnings and optional-check failures in the JSON result returned by update finalization. Merge readiness⛔ Blocked before merge - 1 item remains The PR remains useful and has no blocking findings. The earlier migration-proof blocker is unsupported: the introduced changes populate an existing diagnostic field without changing storage, migration, or authorization semantics. Priority: P2 Review scores
Verification
How this fits togetherDoctor runs health checks and repairs during OpenClaw updates. Its bounded diagnostic result feeds update finalization, which reports warnings to operators and supervisors. flowchart LR
A[Core health checks] --> C[Doctor contribution runner]
B[Optional check failures] --> C
C --> D[Collect unresolved warnings]
D --> E[Bounded Doctor result]
E --> F[Update finalization JSON]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +23, Tests +54. Total +77 across 5 files. View PR surface stats
Review metricsNone. Stored data modelPersistent data-model change detected: Technical reviewBest possible solution: Keep warning collection at the contribution boundary and reuse the existing bounded result channel while preserving repair and required-failure behavior. Do we have a high-confidence way to reproduce the issue? Yes, from source: current-main core contributions display warnings without recording them for finalization. The supplied regression cases target that omission; this review did not execute them. Is this the best way to solve the issue? Yes. Sharing the existing warning recorder repairs the producer boundary without introducing a parallel result format or altering migration behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 335e87235d14. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…2091) Record unresolved core contribution warnings and caught optional failures in Doctor's existing bounded update result. Share core/plugin repair reporting while preserving display, repair, required-failure and exit semantics. Related: openclaw#141995 Validation: 273 focused cases, 29 changed checks, independent P2 review.
Related: #141995.
What Problem This Solves
Fixes an issue where operators running
openclaw update finalize --jsoncould see Doctor reportokeven though a core health contribution had printed a nonfatal warning. The existing result collection covered plugin repairs but missed core repairs, default structured checks, finding-only checks, and caught optional-contribution failures.Why This Change Was Made
One shared recorder carries warning findings and repair warnings into the existing bounded Doctor result. Core and plugin repair panels share their result plumbing. Finalization receives unresolved warnings; repaired findings remain available in the original diagnostic display without becoming outstanding warnings. Required failures retain their existing failure policy.
The stored data model is unchanged: this PR does not add or alter a schema, migration, repair effect, persisted identifier, or result format. The existing Doctor result type, bounds, writer and parser are byte-identical to the base, as are the repair runner, finalizer, Doctor result assembly and migration-refusal owner. The new callers fill the existing optional warning array. Existing ordinary/advisory result tests and all three migration-refusal cases pass; no data migration or compatibility adapter is required.
User Impact
Supervisors receive these nonfatal diagnostics in
postUpdate.doctor.warnings, with Doctor statuswarningand a successful exit when no step fails. Repair decisions, configuration, human-readable output, and the existing 32-message/500-character bounds remain unchanged.Evidence
Controlled regressions reproduced five missing-warning failures across the three contribution paths and ordinary/advisory result payloads, then passed after the repair. The existing optional-contribution test separately failed on its missing warning and passed with the same scrubbed message retained; its required-failure control remained unchanged.
Final validation: 273 focused cases across contribution, migration-refusal, Doctor flow, repair, result-normalization and finalization tests; all 29 stages of
node scripts/check-changed.mjs;git diff --check; independent P0–P2 review with no findings. The shared recorder and reporting consolidation add 23 production lines while covering the previously missing result paths.Tests use isolated synthetic fixtures. No operator Doctor/update command, browser archive, live Gateway, native service, or credential probe was run. The repair covers structured contribution warnings and caught optional failures; it does not reinterpret arbitrary informational panels.