ci(runners): priority-based runner orchestration via P0–P9 labels #265

Merged
JMR-dev merged 3 commits from ci-priority-runner-orchestration into main 2026-07-03 21:16:34 +00:00
3 Commits
Author SHA1 Message Date
Jason Ross 29e22042cb Merge main into ci-priority-runner-orchestration 2026-07-03 16:09:13 -05:00
Jason Ross 4fb9db2a51 Merge main into ci-priority-runner-orchestration 2026-07-03 16:04:33 -05:00
JMR-devandClaude Opus 4.8 0e3ffd58ef ci(runners): priority-based runner orchestration via P0–P9 labels
Add a lightweight `traffic-control` job that runs first (the heavy
build/E2E jobs `needs:` it) and preempts contended runners by PR
priority. It reads the triggering PR's P0–P9 label (P0 = highest,
P9 = lowest; default P5 when unlabeled) and cancels the in-progress /
queued CI runs of strictly-lower-priority OTHER open PRs, freeing their
runners for the higher-priority PR.

Safety: never cancels main/push runs, the PR's own run, or an
equal-or-higher-priority PR — only strictly-lower-priority OTHER open
PRs' active CI runs. The job is best-effort (every gh call guarded,
always exits 0, step is continue-on-error) and is NOT part of the
`CI passed` merge gate. `ci-passed` now also treats a `skipped` heavy
job as a gate failure, so a (should-never-happen) traffic-control
failure blocks the merge fail-safe rather than passing it untested.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 16:02:45 -05:00