Repository navigation
ci(cmux-next): DEV Release compile builds from one fixed tree and cache per host - #25147
Conversation
…he per host #24994 turned on Xcode's compilation cache for the DEV Release compile, but its keys hold the absolute source and DerivedData paths, and both were per runner instance (RUNNER_NAME + workspace). DEV compiles land on 30+ instances, so every compile since stayed cold (compile job median 10.8 min over the last 12 DEV publishes). scripts/cmux-next/compile-dev-release.sh now builds, on a mini with the cache on, from one tree per host (~/Library/Caches/cmux-next-ci/dev-daily-release/ host/src, cloned from the checkout by canonical-build-root.sh, the fixed-root copy the owned catch-up uses: old tree removed first, APFS clone, rsync fallback) into one DerivedData per host (release-derived-data-path.sh --host). host_build_lock.py takes the host lock for the build without waiting (pid + start time, flock-guarded check, stale holders replaced); a busy lock, a lock error or a failed setup builds per runner instance at once, as before. The cache-failure retry, the fresh tree around the CAS and the 3 GiB prune are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16fa4-6017-7cf0-a801-d0761b36e005&host=cosmic-gray
|
Owned by claude-sr2/incremental-build on cosmic-gray · session |
|
Found 9 test failures on Blacksmith runners: Failures
|
|
|
|
Bead |
…pid record Review (Codex xhigh): a pid record goes stale when the wrapper is SIGKILLed while its xcodebuild still runs, and the next build would then share the tree. The lock is now flock(2) on HOST_ROOT/lock through fd 9, which every child inherits: the kernel holds it until the last of them exits and drops it however they end, so there is no stale state to judge and no guard that waits. Tests cover a concurrent build, a SIGKILLed wrapper whose compile keeps running, and a leftover lock file. apfs_clone.py joins the workflow path filters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16fa4-6017-7cf0-a801-d0761b36e005&host=cosmic-gray
|
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)
web and size checks: green |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16fa4-6017-7cf0-a801-d0761b36e005&host=cosmic-gray
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?harness=claude&session=01a16fa4-6017-7cf0-a801-d0761b36e005&host=cosmic-gray
|
Review (codex gpt-6-astra xhigh): SHIP at 65ec818 |
|
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/40255417638 at ebbefce failed: cmux-next Release compile (fleet fast check). |
|
base-red-watch: |
2 similar comments
|
base-red-watch: |
|
base-red-watch: |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
What
#24994 turned on Xcode's compilation cache (CAS) for the cmux NEXT DEV Release compile, but the cache's keys hold the absolute source and DerivedData paths, and both were per runner instance (
RUNNER_NAME+ workspace,release-derived-data-path.sh). DEV compiles land on 30+ runner instances (cmuxNN-glaeda-K, several per host), so every compile since has been cold: the compile job's median is still 10.8 min over the last 12 DEV publishes (measure_next_build.py --dev-chain --limit 12).This gives each mini ONE build root for the DEV Release compile, so the keys match whichever instance builds:
scripts/cmux-next/compile-dev-release.sh(the DEV step now calls it): on a glaeda mini with the cache on, it takes the host lock, clones this checkout to~/Library/Caches/cmux-next-ci/dev-daily-release/host/srcwithscripts/ci/canonical-build-root.sh(the fixed-root copy that the owned catch-up and compile admission use: the old tree is removed first, then an APFS clone, with an rsync--deletefallback,.gitincluded, plus the cmux-tui tree and web bundles that earlier steps put in the checkout), checks the clone's HEAD is the checked-out commit, and builds there into one DerivedData per host (release-derived-data-path.sh dev-daily-release Release --host→.../host/Release/xcode-<toolchain>, with the same toolchain pruning and 12 GiB bound). The checkout's acpmux path is remapped into the tree.scripts/cmux-next/host_build_lock.py: one build per host, taken without waiting. The lock isflock(2)onhost/lockthrough fd 9, which the wrapper and every child it starts (the clone, xcodebuild, ditto) inherit. The kernel holds the lock until the last of them exits and drops it however they end. So a SIGKILLed wrapper whose xcodebuild still runs keeps the root until that xcodebuild is gone, and no stale lock is ever left behind. There is no pid file to judge (this changed after the first Codex review). The file's content only names the holder, for a busy caller's log.CompilationCache.noindexandSourcePackages(ci(nightly): start the shipped Release build from empty DerivedData #21761), the ci(cmux-next): DEV Release compile reuses a content-keyed compilation cache, not kept build products #24994 cache-failure retry, the 3 GiB limit and the prune after each build. The switch-off is the same:CMUX_NEXT_DEV_COMPILATION_CACHE=0also turns off the host root.Tests
tests/test_cmux_next_dev_release_host_root.py(run in the checks job) runscompile-dev-release.shagainst stub compilers. It covers:tests/test_cmux_next_release_build_retention.pyruns the DEV step through the new script. Its per-instance assertions are unchanged.Risk
Medium, CI only, and it touches only the DEV Release compile (nightly and stable are untouched).
Signals
xcodebuildtime is well below the cold time. I'll measure after landing with the same harness and report.instance build root (host tree setup failed)on a mini, or a DEV compile on a host that has already built the cache is no faster.Agent session: cosmic-gray
🤖 Generated with Claude Code