ci(janitor): nightly notarization follow-ups reserve their Blacksmith macOS label
What
The queue janitor's macos-pool-load snapshot counts a queued macOS job as reserved_queued only when its run's workflow is freshness work. The cmux-next placement (scripts/ci/next_macos_cascade.py) keeps PR overflow off a Blacksmith macOS label while that count is above 0. Until now the reserved set was a regex matching only release.yml and nightly.yml, so .github/workflows/auto-resume-nightly-notarization.yml ("Continue nightly notarization") didn't count. On 2026-10-30 at 12:43Z its three wait-and-staple jobs queued on blacksmith-6vcpu-macos-26 behind 22 PR overflow jobs, and nothing kept the label free for them.
Change
scripts/ci/queue_janitor.py: the regexRESERVED_POOL_WORKFLOWis replaced byreserves_pool(path). It returns true forrelease.yml(the declaredRESERVED_RELEASE_WORKFLOWS) and for every delivery workflow inscripts/ci/delivery_workflows.py's existingDELIVERY_GLOBS. That file is already the one list the janitor uses to decide which runs it must never cancel. Matching still uses the workflow path only, so a CI run whose name containsrelease=arm64still doesn't reserve a label.- Workflows that now reserve and didn't before, each with a Blacksmith macOS job:
auto-resume-nightly-notarization.yml,resume-nightly-notarization.yml,nightly-next-canary.yml,nightly-next-launch-smoke.yml,nightly-next-train.ymlandcmux-next-dev-daily.yml(DEV verify and tip DMG/deltas; the cascade already counts DEV's Release compile as freshness work inFRESH_JOBS). - Not reserved, on purpose: the iOS TestFlight and App Store workflows (they're iOS publishing, not a macOS feed's freshness), and the DEV source build of
cmux-next.yml(matching is by path only, and that path is the PR workflow).
Tests
New ReservedPoolWorkflowTests in tests/test_ci_queue_janitor.py:
- A queued
auto-resume-nightly-notarization.ymljob onblacksmith-6vcpu-macos-26counts asreserved_queued(the same holds forresume-nightly-notarization.yml). - An invariant over the real
.github/workflows: every workflow whose file name orname:marks it as nightly, release, promote or notarization work, and that has a job whoseruns-oncan resolve to a Blacksmith macOS label (a literalblacksmith-*macos*or aMACOS_RUNNER*variable), must reserve its label. The only exceptions are listed with reasons:iroh-release-gate.yml, a manual test gate, andtmux-corpus.yml, a manual corpus test titled "terminal nightly". A new nightly or notarization workflow can't be missed. - The PR workflows
ci.yml,cmux-next.ymlandci-macos.ymldon't reserve (a run name containingrelease=arm64is used).
Evidence, run locally:
- Base
4ae385f8with the new tests: 7 failures (0 != 1for auto-resume, resume, nightly-next canary, launch smoke and train). - Head:
tests/test_ci_queue_janitor.py251 OK,tests/test_ci_pr_runner_pool.py252 OK,tests/test_ci_simple_pool_picker.py46 OK,tests/test_delivery_workflows_cancel.py25 OK,tests/test_nightly_delivery_concurrency.pyPASS.
feat-cmux-next
feat-cmux-next has an older copy of queue_janitor.py with the same regex. It doesn't need this change: the janitor runs only on schedule, workflow_run (CI requested) and workflow_dispatch, and the first two always run from the default branch. The snapshot every branch's placement reads is built by main's copy. The feat copy will pick this up the next time main is merged into it.
Risk: low. When a nightly, DEV or notarization job is queued on a Blacksmith macOS label, PR overflow now waits instead of taking that label. This is what the cascade already does for nightly.yml and release.yml.
Agent session: agent session
š¤ Generated with Claude Code
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the queue janitor's macos-pool-load snapshot so nightly notarization follow-ups and other delivery workflows reserve their Blacksmith macOS labels. Previously only release.yml and nightly.yml reserved; on 2026-10-30 auto-resume-nightly-notarization.yml's wait-and-staple jobs queued behind 22 PR overflow jobs on blacksmith-6vcpu-macos-26 because their workflow wasn't in the reserved set.
- Replaces the
RESERVED_POOL_WORKFLOWregex withreserves_pool(), which returns true forrelease.ymland every workflow indelivery_workflows.py'sDELIVERY_GLOBS(nightly, its verify/notarization follow-ups, DEV, and promote). Workflows are still matched by path only. - Adds
ReservedPoolWorkflowTeststhat fail on any workflow named or filed as nightly, release, promote, or notarization with a Blacksmith macOS job that isn't either reserved or explicitly exempted (e.g.,iroh-release-gate.yml,tmux-corpus.yml).
Summary by CodeRabbit
- Bug Fixes
- CI capacity tracking now accounts for queued jobs across release, nightly, development, promotion, and notarization workflows, while continuing to exclude designated workflows. This gives a more accurate view of available build capacity and helps prevent queued work from being overlooked when the system tracks resource availability.