Skip to content

ci: route pull-request macOS jobs to Blacksmith, keep overflow for the rest - #13658

Merged
teamleaderleo merged 1 commit into
mainfrom
ci/pr-macos-jobs-off-warp
Sep 22, 2026
Merged

teamleaderleo merged 1 commit into
mainfrom
ci/pr-macos-jobs-off-warp

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

What

Routes the pull_request event to Blacksmith for the macOS 15 jobs that carry the overflow spend. Every other event keeps following the repository variable exactly as today.

runs-on: ${{ github.event_name == 'pull_request'
             && (vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15')
             || vars.MACOS_RUNNER_15 || 'blacksmith-6vcpu-macos-15' }}

Jobs moved: macos-compile-admission, app-host-unit-tests, tests-build-and-lag, cli-pipe-regressions, and both terminal-hang-diagnostics jobs.

Untouched: merge group, push, schedule, release, manual dispatch — the overflow provider stays available for the fan-out case it is kept for.

Why this lane

From a 24h measurement (618 runs → 1,973 jobs, weighted to full run volume; method in #13652), overflow macOS minutes by triggering event:

Event min/day Share
pull_request 6,535 56.5%
workflow_dispatch 2,782 24.0%
push 1,922 16.6%
schedule 330 2.8%

This PR covers roughly 5,900 min/day, about 51% of all paid macOS minutes, without touching a repository variable.

Pull requests are the right lane to move first for three reasons:

  1. It is where the spend is — more than half of it.
  2. It is the least latency-critical. PR runs are cancelled on supersession by design; ~25% of all macOS minutes in the window were spent on runs that were cancelled mid-flight.
  3. It is the burst-prone lane, and bursts are why overflow exists. Expected concurrent macOS jobs run at ~11.6 mean but spike to ~61 at peak (p95 ~31). Moving the burstiest lane onto sponsored capacity is what reduces the need to reach for paid fan-out in the first place.

Rollback is a variable edit, not a revert

MACOS_RUNNER_PR is new and unset. Unset gives Blacksmith. Setting it to an overflow label restores the previous behaviour for pull requests without reverting this commit:

gh variable set MACOS_RUNNER_PR --repo manaflow-ai/cmux --body '<overflow-label>'

That is deliberate: if PR queue depth on Blacksmith turns out to be worse than expected, the fix is one command and takes effect on the next run, with no code change and no CI restart.

Scope notes

swift-package-tests is deliberately excluded. Its runs-on line is pinned by an exact-string assertion in tests/test_ci_self_hosted_guard.sh because of the dual-SDK sequence (build the Release Ghostty helper under SDK 15, then select Xcode 26 for package tests). Loosening a safety guard for ~574 min/day was not a good trade, and docs/ci-runners.md already documents MACOS_RUNNER_DUAL_XCODE as a Blacksmith label — the variable fix in #13652 covers it.

Fork PRs are unchanged in behaviour. Repository variables are not exposed to fork pull requests, so vars.MACOS_RUNNER_PR is empty for them and they land on the same Blacksmith fallback they already use.

release-build is untouched — it is macOS 26 and gated on full_suite, so it is not part of the compile-only PR lane.

Test

All pass locally:

  • tests/test_ci_self_hosted_guard.sh (includes no workflow falls back to a Warp runner)
  • tests/test_ci_workload_profiles.py
  • tests/test_ci_persistent_mac_compile.py
  • tests/test_ci_app_host_guard_structure.py
  • tests/test_ci_release_guard_structure.py
  • tests/test_ci_merge_queue_required_checks.py
  • tests/test_ci_reusable_workflow_permissions.py
  • tests/test_ci_release_sdk_lane.sh

Because a pull request's CI runs from its own head ref, this PR's own macOS jobs are the first test of the change — they should land on blacksmith-6vcpu-macos-15.

Related

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Routes pull-request macOS jobs to Blacksmith to cut paid overflow usage, covering roughly 51% of overflow minutes. All other events keep following the repository variable exactly as before.

Rollback

  • New unset MACOS_RUNNER_PR variable: unset means Blacksmith; set to an overflow label restores previous behavior without reverting.
  • Reverts to old behavior with one command and applies on the next run.

Scope

  • Moved jobs: macos-compile-admission, app-host-unit-tests, tests-build-and-lag, cli-pipe-regressions, and both terminal-hang-diagnostics jobs.
  • Excluded swift-package-tests (pinned runner-line guard) and release-build (macOS 26, gate).
  • Fork pull requests are unaffected; repository variables aren't exposed, so they still use the Blacksmith fallback.

Written for commit e4ffd06. Summary will update on new commits.

Review in cubic

…e rest

Pull requests are 56.5% of macOS runner minutes on the paid overflow provider
(~6,500 of 11,600 min/day measured over 24h). They are also the most
burst-prone and the least latency-critical lane: a superseded PR run is
cancelled anyway, and ~25% of macOS minutes are already spent on runs that get
cancelled mid-flight.

Route the `pull_request` event to Blacksmith for the macOS 15 jobs that carry
that spend, and leave every other event following the repository variable
unchanged. Merge group, push, schedule, release and manual dispatch are
untouched, so the overflow provider stays available for exactly the fan-out
case it is kept for.

    runs-on: ${{ github.event_name == 'pull_request'
                 && (vars.MACOS_RUNNER_PR || 'blacksmith-6vcpu-macos-15')
                 || vars.MACOS_RUNNER_15 || 'blacksmith-6vcpu-macos-15' }}

`MACOS_RUNNER_PR` is a new, unset escape hatch. Leaving it unset gives
Blacksmith. Setting it restores the overflow provider for pull requests
without reverting this commit, so the rollback is a variable edit rather than
a code change.

Jobs moved: `macos-compile-admission` and `app-host-unit-tests` (the largest
macOS consumer in the repo), `tests-build-and-lag`, `cli-pipe-regressions`,
and both `terminal-hang-diagnostics` jobs.

`swift-package-tests` is deliberately left alone. Its runner line is pinned by
`tests/test_ci_self_hosted_guard.sh` because of the dual-SDK sequence it
depends on, and `docs/ci-runners.md` already documents
`MACOS_RUNNER_DUAL_XCODE` as a Blacksmith label, so the variable fix covers it
without loosening a guard.

Fork pull requests are unaffected in behaviour: repository variables are not
exposed to them, so `vars.MACOS_RUNNER_PR` is empty and they land on the same
Blacksmith fallback they already used.

Tests: test_ci_self_hosted_guard.sh, test_ci_workload_profiles.py,
test_ci_persistent_mac_compile.py, test_ci_app_host_guard_structure.py,
test_ci_release_guard_structure.py, test_ci_merge_queue_required_checks.py,
test_ci_reusable_workflow_permissions.py, test_ci_release_sdk_lane.sh all pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Sep 22, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: d8ff2c97-ba23-4534-8ce2-b589a1864d72

📥 Commits

Reviewing files that changed from the base of the PR and between ea17450 and e4ffd06.

📒 Files selected for processing (3)
  • .github/workflows/ci-macos.yml
  • .github/workflows/cli-pipe-regressions.yml
  • .github/workflows/terminal-hang-diagnostics.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

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