Skip to content

fix(update): retain core Doctor warnings in finalization - #142091

Merged
steipete merged 1 commit into
mainfrom
codex/fix-doctor-contribution-warnings
Sep 8, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-doctor-contribution-warnings

Conversation

@steipete

@steipete steipete commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Related: #141995.

What Problem This Solves

Fixes an issue where operators running openclaw update finalize --json could see Doctor report ok even 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 status warning and 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.

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.
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Sep 8, 2026
@steipete
steipete marked this pull request as ready for review September 8, 2026 09:52
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 8, 2026
@clawsweeper

clawsweeper Bot commented Sep 8, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 8, 2026, 6:12 AM ET / 10:12 UTC.

ClawSweeper review

What this changes

Preserves 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
Reviewed head: 5010a232b1620aa1d072a256d9685f597f3897b1

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused producer-side repair with meaningful regression coverage and no identified correctness or compatibility blocker.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR is exempt from the external-contributor live-proof gate; inspected coverage exercises contribution-to-result propagation with synthetic fixtures, and the body explicitly disclaims a real operator update run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR is exempt from the external-contributor live-proof gate; inspected coverage exercises contribution-to-result propagation with synthetic fixtures, and the body explicitly disclaims a real operator update run.
Evidence reviewed 8 items Introduced warning collection: The shared recorder preserves earlier warnings, selects warning-severity findings, and applies the existing normalizer. Core repair, structured contribution, finding-only, and optional-failure paths call it; repaired findings remain excluded from outstanding repair warnings.
Previous compatibility blocker resolved: The earlier review requested migration or upgrade proof. Comparing the pinned merge base with this head produced no changes in the result contract, repair runner, Doctor result assembly, finalizer, or migration-refusal tests. The PR adds callers to the existing optional warnings field; it introduces no stored-format migration.
Existing consumer and failure policy: Doctor assembles collected warnings into its existing result; the fresh-process consumer forwards them to finalization, which reports warning status without turning nonfatal diagnostics into failure. Required contribution failures and migration refusals still throw before the new optional-failure recorder.
Findings None None.
Security None None.

How this fits together

Doctor 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]
Loading

Before merge

  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Source +23, Tests +54. Total +77 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 3 49 26 +23
Tests 2 73 19 +54
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 122 45 +77

Review metrics

None.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/flows/doctor-health-contribution-core.ts, migration/backfill/repair: src/flows/doctor-health-contribution.ts, migration/backfill/repair: src/flows/doctor-health-contributions.ts, unknown-data-model-change: src/flows/doctor-health-contribution-core.ts. Confirm migration or upgrade compatibility proof before merge.

Technical review

Best 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.

Labels

Label justifications:

  • P2: Repairs misleading update diagnostics without changing update execution or failure policy.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR is exempt from the external-contributor live-proof gate; inspected coverage exercises contribution-to-result propagation with synthetic fixtures, and the body explicitly disclaims a real operator update run.

Evidence

What I checked:

  • Introduced warning collection: The shared recorder preserves earlier warnings, selects warning-severity findings, and applies the existing normalizer. Core repair, structured contribution, finding-only, and optional-failure paths call it; repaired findings remain excluded from outstanding repair warnings. (src/flows/doctor-health-contribution.ts:111, 5010a232b162)
  • Previous compatibility blocker resolved: The earlier review requested migration or upgrade proof. Comparing the pinned merge base with this head produced no changes in the result contract, repair runner, Doctor result assembly, finalizer, or migration-refusal tests. The PR adds callers to the existing optional warnings field; it introduces no stored-format migration. (src/infra/update-doctor-result.ts:27, 5010a232b162)
  • Existing consumer and failure policy: Doctor assembles collected warnings into its existing result; the fresh-process consumer forwards them to finalization, which reports warning status without turning nonfatal diagnostics into failure. Required contribution failures and migration refusals still throw before the new optional-failure recorder. (src/cli/update-cli/update-command-finalize.ts:192, 5010a232b162)
  • Current main still needs the repair: At the supplied current-main revision, extension repair warnings are collected, but core repair and finding-only paths only display their diagnostics. The documented contract says nonfatal Doctor warnings appear in postUpdate.doctor.warnings. (src/flows/doctor-health-contribution-core.ts:100, 335e87235d14)
  • Related merged work is partial: GitHub confirms fix(update): skip opt-in probes and preserve Doctor warnings #141995 merged at 2026-09-08T08:48:36Z. It established the warning transport and extension collection that this PR completes for core contributions; it does not supersede this repair. (4e3d22e6f6cc)
  • Latest release boundary: The v2026.9.2 result contract predates the general warnings array and supports the deferred-plugin advisory result. The newer transport is main-branch work; this PR's missing core collection is not already supplied by that release. (src/infra/update-doctor-result.ts:26, 3928bad9badf)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-08T09:59:22.921Z sha 5010a23 :: blocked before merge. :: none

@steipete
steipete merged commit 5cf0199 into main Sep 8, 2026
252 checks passed
@steipete
steipete deleted the codex/fix-doctor-contribution-warnings branch September 8, 2026 10:20
@steipete

steipete commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 9, 2026
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant