fix(learn): surface Codex analysis failures - #3016
Open
JerrettDavis wants to merge 2 commits into
Open
Conversation
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
PR governanceThis PR follows the template and is marked ready for human review. |
JerrettDavis
marked this pull request as ready for review
August 14, 2026 04:52
JerrettDavis
requested review from
DevanshiVyas and
chopratejas
as code owners
August 14, 2026 04:52
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
headroom learncould invoke Codex CLI from a non-Git working directory without Codex’s required bypass flag. The resulting backend error was then swallowed by the analyzer and rendered as “No actionable patterns found” with exit code 0. This fixes both coupled defects so Codex can run from discovered project locations and genuine analysis failures remain visible and machine-detectable.Closes #3008
Type of Change
Changes Made
--skip-git-repo-checkto the Codex CLI analysis backend command.analysis_errorresult field instead of conflating backend failure with an empty recommendation set.Testing
pytest)ruff check .)mypy headroom)Test Output
Real Behavior Proof
mainincluding fix(ci): prevent native detector from hanging test shards #2996.codex exec --help; exercised_call_cli_llmwith a captured subprocess command; invoked the Click command with a simulated Codex nonzero backend result.codex exec --skip-git-repo-check; backend failure text is printed asAnalysis failed, the misleading no-pattern message is absent, and the CLI exits 1.Runtime Rollout Safety
HEADROOM_LEARN_CLIor--modelif Codex CLI is unavailable.Review Readiness
Checklist
CHANGELOG.md— it is generated by release-please from my Conventional Commit PR title (a CI guard enforces this)Screenshots (if applicable)
Not applicable; command-line backend and exit semantics only.
Additional Notes
Human review only. No merge or auto-merge is configured. This corrects the root failure and exit semantics without extending any timeout.