Skip to content

RAL-185: rally wait-green <PR or sha>, one command that waits for every check at a pinned head - #272

Merged
Castor-o7 merged 1 commit into
mainfrom
ral-185/wait-green
Nov 14, 2026
Merged

Castor-o7 merged 1 commit into
mainfrom
ral-185/wait-green

Conversation

@Castor-o7

Copy link
Copy Markdown
Owner

RAL-185, from the watchman, after my home-made jq waiters never exited all night and the merge queue waited on green pull requests. Their [...]|length,(.statuses|length) applied .statuses to the array, so their test could never pass.

  • rally wait-green <PR | full sha> --repo owner/repo: observed, recording nothing. It waits until every check has finished at the head, then prints what each ended as. Exits:
    • 0 green;
    • 1 red, naming the check that didn't pass;
    • 3 when the pull request's head moved off the pinned commit (or --head);
    • 4 at the timeout, saying what was pending and what hadn't appeared yet;
    • 2 on a usage error.
  • Which checks it waits for: every check that ran on the base's tip and its first parent, both GitHub's check runs and the commit statuses, so ci-local's local/* too, unless --check names them. A head whose GitHub checks finished before ci-local posted is still waiting, not green. The first parent covers a tip that was just merged and has no local statuses yet.
  • Failed reads: a read that fails is tried again until the timeout, and the last failure is said.
  • Docs: the Rally block (src/init.rs and CLAUDE.md) tells teams to use it; docs/wait-green.md; the roadmap.
  • Tests:
    • unit tests for check parsing (newest re-run wins), judging (missing vs pending vs red), and the wait (green, red, moved, timed out, retried reads);
    • a CLI test against a stand-in gh whose checks progress, including a just-merged tip without its local status;
    • a live read-only run on RAL-183: browser tests forward only real crash lines, marked as real #270 returned green with the five expected checks in 2.4 s.

🤖 Generated with Claude Code

…ry check at a pinned head

From the watchman, after my home-made jq waiters never exited all night. Observed, recording
nothing: it waits for every check on the base's tip and its first parent (check runs and commit
statuses, so ci-local's too), pins a pull request's head, and exits 0 green, 1 red, 3 moved,
4 timed out, 2 on a usage error. The Rally block tells teams to use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Castor-o7
Castor-o7 merged commit de27b43 into main Nov 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant