[WRONG BRANCH] fix(doctor): tolerate malformed $CODEX_HOME/agents path - #242
[WRONG BRANCH] fix(doctor): tolerate malformed $CODEX_HOME/agents path#242luvs01 wants to merge 1 commit into
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe Codex agent-role scanner now reports directory-listing errors through an optional callback. ChangesCodex agent scan handling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
⏳ DRAFT
What to do
Its title has been prefixed with |
Motivation
ocx doctoradded a scan of$CODEX_HOME/agents/*.tomlthat could throw when theagentspath exists but is not a readable directory, causing the diagnostic command to abort instead of degrading to a warning.Description
scanCodexAgentRolesWithTomlModelFallbackto accept an optionalonListErrorcallback, catch enumeration errors, invoke the callback with the cause, and return an empty list on failure instead of throwing.runDoctor) to call the scanner with an error callback and emit a[WARN] unable to scan $CODEX_HOME/agents/*.toml: ...message when scanning fails.tests/subagent-model-fallback.test.tsthat creates a malformedagentspath (a regular file) and asserts the scanner returns[]and reports anErrorto the callback.agentsdirectory is valid and readable.Testing
tests/subagent-model-fallback.test.tsvia the repository test harness and the new test passed (52 tests in that file passed).bun run typecheckand it passed.bun run testin this environment; the focused regression passed but the full suite exposed unrelated environment-dependent failures in other tests (these failures are pre-existing and not caused by this change).Codex Task
Summary by CodeRabbit
ocx doctornow warns when Codex agent scanning fails, rather than incorrectly reporting no agent roles.