How do I fix a failing CI check?
This is one branch of the PR monitoring loop. The other branch is addressing review comments.
Question
A check on my PR has gone red. How do I find what failed, fix it, and push the fix?
Answer
Identify the failing check.
compass pr checksshows the overall status;gh run listdrills into the runs for the branch:./compass.sh pr checks gh run list --branch "$(git branch --show-current)"
Read the failure log. The
--log-failedflag prints only the failing step's output:gh run view <run-id> --log-failed
- Diagnose by category:
- Compilation error → fix the source file.
- Test failure → fix or update the failing test.
- Linting / formatting → apply the required formatting.
- Schema or doc validation → run the local validator
(
projects/ores.codegen/validate_docs.sh) and fix what it flags.
Apply the fix as a new commit:
git add <modified-files> git commit -m "[component] Fix CI failure: <brief description>" git pushNever amend — preserves review history.
- Wait for the rerun. CI re-triggers on push; return to monitor until green.
Script
Bare gh CLI plus the language-specific local validators that
mirror what CI runs.
Tested by
Manual. Validators that ship with the repo are exercised in CI; running them locally is the fastest way to reproduce.
See also
- How do I monitor a PR until green? — the surrounding loop.
- How do I address PR review comments? — sibling branch.
PR Shepherd.