Repository navigation
fix: point doctor to the config file when validation fails - #202070
roboclaw-bot merged 2 commits into
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. What this changesDoctor now directs users to locate and correct the active config file when automatic repair cannot resolve validation errors. Example: The active profile contains gateway.port set to "invalid".
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 1 item remains Keep open: this PR fixes a real recovery loop with a minimal change, and the prior regression-test finding is resolved. Priority: P2 Before merge
FindingsNone. Agent review detailsHow this fits togetherDoctor converts configuration validation errors into shared repair and lint findings; the CLI renders their recovery hints to operators. flowchart TD
A[Invalid active config] --> B[Doctor validation]
B --> C[Shared health findings]
C --> D[Profile aware recovery hint]
D --> E[Config file path lookup]
E --> F[Manual correction and validation]
Technical reviewBest possible solution: Use the existing shared finding converter to provide a working config-file recovery path while preserving config-write validation. Do we have a high-confidence way to reproduce the issue? Current-main source establishes the Doctor/config-unset loop, and the contributor supplies built-CLI recovery output; no target code was executed during this review. Is this the best way to solve the issue? This is the smallest complete repair: correct the shared recovery hint using the existing path lookup instead of widening mutation admission for invalid config. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 1fbcec108f4e. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +1, Tests 0. Total +1 across 2 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed November 19, 2026, 5:05 PM ET / 22:05 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Closes #202032
What Problem This Solves
When Doctor encounters an invalid setting it cannot migrate, its recovery hint sends users to
config unset. That command also requires a valid config, so users get stuck when they follow the hint.User Impact
Doctor now shows how to locate the active config and tells users to correct the reported setting there. The command includes the selected profile when one is active.
Why This Change Was Made
config filecan resolve the path while the config still fails validation. The fallback uses that read-only command and preserves any more specific repair hint supplied by the check.Thanks to @anmol0b for reporting the recovery loop and to the ClawSweeper review for the invalid
gateway.porttest case.Evidence
On Windows I ran the built CLI with an isolated profile and set
gateway.portto a string. On the base, Doctor recommendedconfig unset, which exited 1 and left the invalid value in place. On this branch, Doctor gives the active-profile lookup command. I used the returned path to correct the port, and the same final-validation check then passed.Terminal excerpts show the actual output. I redacted the fixture directory and kept only the relevant fields in the final JSON.
I updated the existing final-validation regression to check the new hint and removed the separate converter test. The existing case failed on the prior PR head and passed after the test update.
pnpm test src/flows/doctor-health-contributions.test.ts --maxWorkers=1passed 94 tests in 496s locally.pnpm test src/flows/doctor-lint-flow.test.ts --maxWorkers=1passed 5 tests in 34s locally.git diff --checkpassed. The follow-up changes tests only. It reuses the Windows runtime build from the preceding commit, which has identical production sources. The required hosted CI gate passed ona581cc465b29.Independent Linux check on the published
[email protected]: with a string ingateway.port, Doctor recommendedconfig unset, but that command exited 1 without changing the profile.config filelocated the same file, and final validation passed after correcting the port there. This confirms the bug on stable. It does not verify upgrading that profile to the PR build; the published-driver update job was skipped.