name: 01-wait-checks description: Watches GitHub PR checks until they pass or fail. kind: leaf executor: script model: claude-haiku-4-5-20251001
Wait Checks
Runs gh pr checks <pr_number> --watch and exits 0 only when every check passes.
Inputs
pipeline.py get pr_number→ the PR number from phase 16.
Plan
- Resolve the PR number via
pipeline.py get pr_number→ verify: integer captured. - Run
gh pr checks <NUM> --watch→ verify: command exits. - Capture exit code → verify: integer captured.
- Propagate exit code → verify: non-zero falls through to fix-bot-comments.
Assumptions:
ghis authenticated.--watchblocks until terminal state.
If any assumption fails, refuse — do not guess.
Steps
- Run:
NUM=$(python3 .claude/skills/feature-pipeline-preview/scripts/pipeline.py get pr_number). - If
NUMis empty, refuse. - Run:
gh pr checks "$NUM" --watch. - Capture the exit code.
- If exit is zero, exit 0.
- If exit is non-zero, exit non-zero so the caller falls through to bot-comments handling.
Output
Exit code reflects CI state.
Refusals
pr_numbernot set → refuse: "no pr_number in pipeline state".ghnot on PATH → refuse: "gh not found".