Doctor: convert read-only health checks#83198
Conversation
38830c2 to
7c68a14
Compare
|
Codex review: needs maintainer review before merge. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
Summary Reproducibility: not applicable. as a feature PR rather than a bug report. The changed behavior is demonstrated by linked live CLI output and by source inspection of the PR head. PR rating Rank-up moves:
What the crustacean ranks mean
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. PR egg Rarity: 🥚 common. What is this egg doing here?
Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land only after maintainers accept the expanded lint semantics and current head checks finish cleanly, while keeping planned-only conversion targets out of the runtime registry until real detectors exist. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature PR rather than a bug report. The changed behavior is demonstrated by linked live CLI output and by source inspection of the PR head. Is this the best way to solve the issue? Yes, with maintainer acceptance of the lint-surface expansion. The latest head uses real detectors for registered checks, leaves planned-only work in the conversion inventory, and adds coverage for unknown Label justifications:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 1fb09069c342. |
7c68a14 to
a1003da
Compare
|
Addressed the two P1s from ClawSweeper:
Verification:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
84211f3 to
84a7dd0
Compare
|
Updated 83198 against latest What changed in this refresh:
Verification:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
549459a to
3c33110
Compare
* feat(doctor): convert read-only health checks * fix(doctor): keep read-only conversion gates green * fix(doctor): preserve health repair preview contract * fix(doctor): defer session snapshot lint target * fix(doctor): avoid false-clean lint placeholders * test(doctor): type conversion target registry check
* feat(doctor): convert read-only health checks * fix(doctor): keep read-only conversion gates green * fix(doctor): preserve health repair preview contract * fix(doctor): defer session snapshot lint target * fix(doctor): avoid false-clean lint placeholders * test(doctor): type conversion target registry check
* feat(doctor): convert read-only health checks * fix(doctor): keep read-only conversion gates green * fix(doctor): preserve health repair preview contract * fix(doctor): defer session snapshot lint target * fix(doctor): avoid false-clean lint placeholders * test(doctor): type conversion target registry check
* feat(doctor): convert read-only health checks * fix(doctor): keep read-only conversion gates green * fix(doctor): preserve health repair preview contract * fix(doctor): defer session snapshot lint target * fix(doctor): avoid false-clean lint placeholders * test(doctor): type conversion target registry check
* feat(doctor): convert read-only health checks * fix(doctor): keep read-only conversion gates green * fix(doctor): preserve health repair preview contract * fix(doctor): defer session snapshot lint target * fix(doctor): avoid false-clean lint placeholders * test(doctor): type conversion target registry check
* feat(doctor): convert read-only health checks * fix(doctor): keep read-only conversion gates green * fix(doctor): preserve health repair preview contract * fix(doctor): defer session snapshot lint target * fix(doctor): avoid false-clean lint placeholders * test(doctor): type conversion target registry check
* feat(doctor): convert read-only health checks * fix(doctor): keep read-only conversion gates green * fix(doctor): preserve health repair preview contract * fix(doctor): defer session snapshot lint target * fix(doctor): avoid false-clean lint placeholders * test(doctor): type conversion target registry check
* feat(doctor): convert read-only health checks * fix(doctor): keep read-only conversion gates green * fix(doctor): preserve health repair preview contract * fix(doctor): defer session snapshot lint target * fix(doctor): avoid false-clean lint placeholders * test(doctor): type conversion target registry check
* feat(doctor): convert read-only health checks * fix(doctor): keep read-only conversion gates green * fix(doctor): preserve health repair preview contract * fix(doctor): defer session snapshot lint target * fix(doctor): avoid false-clean lint placeholders * test(doctor): type conversion target registry check
* feat(doctor): convert read-only health checks * fix(doctor): keep read-only conversion gates green * fix(doctor): preserve health repair preview contract * fix(doctor): defer session snapshot lint target * fix(doctor): avoid false-clean lint placeholders * test(doctor): type conversion target registry check
* feat(doctor): convert read-only health checks * fix(doctor): keep read-only conversion gates green * fix(doctor): preserve health repair preview contract * fix(doctor): defer session snapshot lint target * fix(doctor): avoid false-clean lint placeholders * test(doctor): type conversion target registry check
Summary
This is the first focused follow-up to #80055. It keeps the conversion deliberately low-risk by moving read-only doctor checks into health-check
detect()findings while preserving legacydoctor --fixbehavior until each repair area has a real modernrepair()owner.This PR adds:
Behavior addressed
Doctor follow-up conversions are easier to review when each area moves from
run(ctx)todetect()independently. This PR converts read-only checks first, sodoctor --lintcan report these findings through structured health output without changing repair behavior.Migration rule
This PR treats the first slice as a reporting conversion, not a repair takeover.
doctor --lintuses the newdetect()findings for converted checks.doctor --fixkeeps the existing legacyrun()/maybeRepair*()behavior unless a specific check has a complete modernrepair()implementation. Placeholder health checks are inventory targets only; they do not suppress legacy notes or repairs yet. Checks that do not yet have a structured detector are deliberately left off the lint registry to avoid false-clean results.That means later area-specific PRs can safely move one check at a time: first add structured detection, then add scoped repair, then remove or skip the legacy path only when the modern path fully owns the behavior.
Staging note
This PR is stacked on current
mainafter #80055 landed. The full conversion branch is intentionally not included here; future follow-ups should be opened area by area after this first read-only slice.Real behavior proof
Fresh deterministic proof artifacts:
Behavior addressed: This PR converts read-only doctor checks to structured health
detect()findings sodoctor --lintcan report them without repair-mode execution.Real environment tested: WSL Ubuntu source checkout, branch
doctor-detection-conversion-plan, based onupstream/mainafter #80055.Exact steps or command run after this patch:
Evidence after fix: The real OpenClaw CLI ran one converted read-only doctor check and emitted a structured lint finding without entering repair mode.
Observed result after fix:
doctor --lintexecuted the selected converted check in read-only mode, reportedcore/doctor/workspace-suggestionsas a structured finding, skipped the other 44 checks because of--only, and returned the expected lint-failure exit when a finding was present.Supplemental verification:
Supplemental result: Focused Vitest proof passed: 6 files, 43 tests. Core typecheck passed.
git diff --checkpassed with no whitespace/conflict-marker findings.What was not tested: Full repository CI and broad Crabbox/Testbox validation were not run locally for this draft; this branch is intended as a narrow follow-up behind #80055.