Repository navigation
refactor: share invalid-config recovery test runtime - #150379
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: needs maintainer review before merge. Reviewed September 16, 2026, 7:37 PM ET / 23:37 UTC. ClawSweeper reviewWhat this changesThe PR replaces a duplicated runtime fixture in invalid-config recovery tests with the existing shared command-test helper. Merge readiness✅ Ready for maintainer review Keep open: this useful cleanup is absent from current main, preserves existing coverage, and has no actionable correctness findings. The maintainer label also protects it from automatic closure. Priority: P3 Review scores
Verification
How this fits togetherCLI invalid-config recovery offers Doctor repair with user consent and retries the failed operation once. These tests supply mock runtime output and exit functions to verify recovery outcomes without running Doctor. flowchart TD
A[Six recovery test scenarios] --> B[Shared mock runtime]
B --> C[CLI config recovery]
D[Injected consent and Doctor results] --> C
C --> E[Retry or decline]
E --> F[Outcome and diagnostic assertions]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -7. Total -7 across 1 file. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Use the established shared fixture while preserving independent runtime mocks and the existing recovery assertions. Do we have a high-confidence way to reproduce the issue? Not applicable: this is test cleanup, and source inspection confirms the duplicated fixture rather than a reported runtime defect. Is this the best way to solve the issue? Yes: the existing helper supplies equivalent mocks, removes duplicate setup, and preserves all assertions without changing production code. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2a5cacd22a82. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
What Problem This Solves
Invalid-config recovery tests duplicate the runtime fixture already provided by shared command test support.
User Impact
No user-visible behavior changes. All six recovery cases and 21 assertion sites remain unchanged.
Why This Change Was Made
Use the existing typed runtime fixture at the same six test-local creation sites. Both fixtures provide only log, error and nonthrowing exit; no output writers or new runtime capabilities are added. The intentional Doctor exit assertion stays intact.
Production: unchanged. Tests: +8/-15, net -7 lines.
Evidence
An initial gate attempt stopped before launching checks on a process-observation refusal; the separately admitted attempt passed. This is local mocked proof, with no live Doctor, startup or performance claim. Exact-head hosted CI remains required before landing.