fix(CI): move changes job off self-hosted runner + add workflow concurrency - #1216
Conversation
…rrency Cherry-pick from staging PR #1194 for main. Two changes to relieve macOS arm64 runner saturation: 1. `changes` job: runs on ubuntu-latest instead of [self-hosted, macos, arm64]. This job does a plain `git diff` with zero macOS dependencies — moving it off the runner frees a slot immediately on every workflow trigger. 2. Add workflow-level concurrency: concurrency: group: ci-${{ github.ref }}; cancel-in-progress: true Prevents multiple stale in-flight CI runs from queuing on the same ref when new commits arrive. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Review: PR #1216 — fix(CI): move changes job off self-hosted runner + add workflow concurrency
Approve. This is clean infrastructure work that directly unblocks the PR queue.
What the PR does
-
Adds
concurrencygroup withcancel-in-progress: true— prevents stale CI runs from piling up behind each other when new commits land rapidly. Standard practice, correctly scoped toci-${{ github.ref }}. -
Moves
changesjob from[self-hosted, macos, arm64]toubuntu-latest— thegit diffoperation has no macOS dependency; it only runsgit diff --name-only main...HEAD. Moving it to the free ubuntu runner frees the expensive self-hosted Mac mini for jobs that actually need it.
Assessment
| Change | Assessment |
|---|---|
concurrency: cancel-in-progress: true |
✅ Correct — standard GitHub Actions syntax, prevents redundant runs |
runs-on: ubuntu-latest for changes |
✅ Correct — git diff is arch-agnostic; no reason to burn the macOS runner |
| Net delta: +11 lines, -3 lines | ✅ Small diff, low risk |
No risks. This only touches the CI workflow file. The git diff --name-only main...HEAD command works identically on ubuntu vs macOS. The concurrency block is idempotent and harmless if GitHub Actions doesn't support it (it's widely supported).
Merge readiness
CI partially green — Detect changes succeeded (as expected, since it ran on ubuntu-latest which doesn't have the runner constraint). The queued jobs are waiting on runner availability, which this PR directly improves by freeing the Mac mini from the changes job.
This PR unblocks the queue — once merged, the Mac mini runner is no longer occupied by Detect changes and can pick up the queued jobs immediately.
Recommendation
Approve. Quick merge recommended. Low risk, clear benefit.
|
PM note: CI runner migration — moving changes job off self-hosted runner is operationally important. Approve once CI green. This unblocks reliable CI for all other PRs. |
fix(CI): move changes job off self-hosted runner + add workflow concurrency
Summary
Cherry-pick from staging PR #1194. Two changes to relieve macOS arm64 runner saturation:
changesjob → ubuntu-latest: Thechangesjob holds a runner duringfetch-depth: 0before any real build work. Moving it off the self-hosted macOS arm64 runner
frees a slot immediately on every workflow trigger. This job only runs
git diff— no macOS-specific dependencies.
Workflow-level concurrency:
Cancels in-progress CI runs when a new commit arrives on the same ref.
Prevents stale runs from queuing behind each other on the single runner.
Root cause addressed
The runner had exactly 1 slot. The
changesjob was occupying it on every push/PRwhile doing
fetch-depth: 0(full git history) before any downstream job ran.Every new push queued a new workflow while the old one was still doing the checkout.
Test plan
changesjob occupies macOS arm64 runner on subsequent pushes🤖 Generated with Claude Code