Repository navigation
ci(nightly): every nightly-only slot builds warm, without the builder label - #33348
Merged
teamleaderleo merged 1 commit intoNov 3, 2026
Merged
Conversation
… label build-nightly-app took the warm path (kept DerivedData, host build root, no R2 restores) only when the picker read the runners and offered glaeda-nightly-only-m4pro-builder. That read hit HTTP 403 (the routing App's spent budget) in four of the last six nightly-next runs, so the build took the plain nightly-only label, prepare wrote no mode, and the job restored the compilation cache and Swift packages from R2 (about 270-320 s) before compiling. Every runner of the nightly-only minis now keeps state like the dedicated builder. Concurrent slots on one Mac stay apart: each slot's own kept tree is keyed by its runner name and workspace path, and the Release build takes the Mac's one host build root under a never-waited flock, so a second slot builds in its own tree and the host root's next build drops it (finish_host). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-31887b77fcdd43584d16
Contributor
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
|
Collaborator
Author
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Leo:
This PR is the warm half. The signing/publishing cores are another PR.
Leo-ask: ask-217810e1b3
What was wrong
build-nightly-apptakes the warm path (kept DerivedData in the Mac's host build root, no R2 restores) only whennightly_build_state.py prepare nightly-nextwrites amode. For a*-glaeda-nightly-only-Nrunner it did soonly with
NIGHTLY_ONLY_BUILDER=true, which holds only whenpick-nightly-build-runnerread the runners andoffered
glaeda-nightly-only-m4pro-builder. That read (GET /actions/runnerswith the routing App) got HTTP 403(rate limit) in most recent runs, so the picker fell back to the plain
glaeda-nightly-only-m4prolabel,modestayed empty, and the job restored the compilation cache and the Swift packages from R2 and compiled colder.
Four of the last six nightly-next runs went that way.
Across the six runs, cold builds took 413-1567 s in the build step, plus about 270-320 s of restores.
The fix
dedicated()now covers every nightly-only runner, without the builder flag, andNIGHTLY_ONLY_BUILDERisgone from the workflow and from
nightly_build_state.py. The picker still offers the builder label when itcan read the runners; it only stops deciding whether the build is warm.
Why concurrent slots on one mini are safe:
app-host-build-root.sh,/Users/Shared/cmux-build-fleet/xcode/nightly-next) under a flock that is never waited for(
host_build_lock.py); fd 9 is inherited by xcodebuild, so the lock lives as long as the build does.~/Library/Caches/cmux-nightly-next/<runner>/<sha256(workspace, toolchain)>. That tree is keyed by the runnername, so no two slots share one, and its own
incremental.jsoncheckpoint keeps the same clean rules.The slot's next host-root build deletes it (
finish_host), so a mini does not keep one DerivedData per slot.mark-builtonly marks a checkpoint under the slot's own runner directory, and only when prepare linkedbuild-universalthere.modeconditions are unchanged: with a mode, the R2 restores, the package sanitize and thecache save are skipped, and
mark-builtruns (tests/test_nightly_trusted_routing.pypasses unchanged).Disk: each nightly-only slot now also keeps its notices crate cache (bounded at 8 GiB by
notices_cache), anda fallback build leaves a slot's DerivedData until that slot's next host-root build.
Design surface: CI only, no UI.
Performance
The "after" column is the measured builder-label run, not a run of this head: the first nightly after the land
gives the real number.
Observed / Not run
Observed:
tests/test_nightly_build_state.py(30 tests, the two new ones fail on base and pass here),tests/test_nightly_build_runner.py,tests/test_nightly_trusted_routing.py,tests/test_ci_warm_sources.py,tests/test_nightly_dedicated_mini.py,tests/test_workflow_file_size.py,tests/test_ci_runs_on_fallback.pypass locally.
scripts/cmux-next/prepush-gate.py: no new violations.Not run:
"Start Release DerivedData empty" log should print a
cleanorincrementalmode on any nightly-only runner.Agent session: agent session
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes nightly-only nightly-next builds running cold after the runner picker failed to read the runners.
The picker's runner read returned HTTP 403 in four of the last six nightly-next runs, so those jobs took the plain
glaeda-nightly-only-m4prolabel, restored the compilation cache and Swift packages from R2 (~270–320 s), and compiled from empty DerivedData. Every*-glaeda-nightly-only-Krunner now keeps warm state (dedicated()covers all of them), andNIGHTLY_ONLY_BUILDERis removed from the workflow,nightly_build_state.py, and tests.Concurrent slots on one Mac stay apart:
flock.mark-builtonly writes a checkpoint under the slot's own runner directory.CI-only; no migration or rollout steps.
Written for commit c084316. Summary will update on new commits.