How do I fix a failing CI check?

Table of Contents

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

  1. Identify the failing check. compass pr checks shows the overall status; gh run list drills into the runs for the branch:

    ./compass.sh pr checks
    gh run list --branch "$(git branch --show-current)"
    
  2. Read the failure log. The --log-failed flag prints only the failing step's output:

    gh run view <run-id> --log-failed
    
  3. 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.
  4. Apply the fix as a new commit:

    git add <modified-files>
    git commit -m "[component] Fix CI failure: <brief description>"
    git push
    

    Never amend — preserves review history.

  5. 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

Emacs 29.1 (Org mode 9.6.6)