Repository navigation
fix(doctor): name the cause of an ownership-unknown native-main fence - #8988
Conversation
When native-main admission is fenced for ownership-unknown or foreign-ownership, doctor printed only the category. The inspection that produced it already knows the cause, for example a service wrapper that does not match the generated one, but the admission route deliberately carries no paths. Doctor now repeats the same read-only inspection locally and prints its verdict and reason under the fence line. A failing inspection is reported instead of aborting doctor. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request has been marked Ready for Review. Hygiene✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Maintainer integration into
|
Summary
When native-main admission is fenced for
ownership-unknownorforeign-ownership,ocx doctorprints only the category. The service-manager inspection behind the fence returns a specific reason, but the admission route carries only the category, by design, so it does not expose paths. On my machine the fence stayed up for several days: Claude and Codex only showed "native-main profile maintenance is active; retry", and doctor showedreason: ownership-unknown. The cause was a service wrapper that had been edited by hand, so the probe no longer recognized it as generated.For those two fence reasons only, doctor now repeats the same read-only
inspectNativeCodexOwnership()locally and prints one more line under the fence:The admission route and the proxy are unchanged. The re-check runs in the doctor process with doctor's own environment, so it can disagree with the running proxy if their homes differ; that is why the line says "Local re-check". An inspection that throws is printed as
inspection failed: ...and does not stop doctor.Verification
On Windows 11 (26200), Bun 1.4.4, at
d61cca122:bun test tests/codex-integration/doctor.test.ts: 87 pass, 7 fail. Before the change: 85 pass and the same 7 fail. All 7 arerunDoctorend-to-end tests that hit the 5 s timeout on this machine (reclaim wiring, spill report wiring, unclean prior exit). The 2 new tests pass: formatting and fence selection, and a throwing re-check. The existingrunDoctor reports a separate fenced service processtest now also checks that theLocal re-check (line is printed.inspectNativeCodexOwnership()returned on 2.100.0 and 2.100.1 for that wrapper (a--preloadargument added to the launch line).bun run typecheckpasses.bun run test, because a full run takes longer than 15 minutes on this machine. The rest is left to CI.Checklist
🤖 Generated with Claude Code
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit