Repository navigation
ci: compare build inputs by content so an adopted seed rebuilds only real changes - #14262
Merged
Merged
Conversation
Pins that every build-for-testing in compile-app-host-test-product.sh runs with FileSystemMode=checksum-only and that the seed fingerprint changes with the mode. Fails on this commit: FileSystemMode is unset and the fingerprint is the device-agnostic one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…real changes A seeded compile admission reran 94 SwiftDriver and 64 SwiftEmitModule tasks even for a seed of its own base commit (run 36022099083, seed distance 0). The XCBuild debugging trace names the inputs: 1,616 Xcode SDK and toolchain files whose mtime differs between Blacksmith images, and the generated package module maps Xcode rewrites with identical bytes on the first build after adoption. Every third-party package re-emitted its module for them. Build with Swift Build's FileSystemMode=checksum-only, set only in the environment of these xcodebuild invocations, so llbuild compares contents. A database written in one mode reruns every task in the other, so the mode joins the seed fingerprint. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 1 minute. View limit detailsLimit 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. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
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. Comment |
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
teamleaderleo
enabled auto-merge (squash)
September 24, 2026 17:22
rustybret
pushed a commit
to rustybret/bmux
that referenced
this pull request
Sep 24, 2026
40adc27 ci: drop compile admission's reads of the retired persistent-restore step (manaflow-ai#14260) 9415c2d fix(nushell): stop hiding the claude wrapper for every session (manaflow-ai#14263) 710ea01 Pace mobile render-grid frames per surface: dynamic ~11fps floor with keystroke-echo bypass (manaflow-ai#14031) c6f41e7 ci(e2e): wait for an earlier dispatch's compile of the same revision (manaflow-ai#14240) e3ac98d test: keep live terminals out of the unread sidebar-row invalidation test (manaflow-ai#14258) 464fe13 ci: compare build inputs by content so an adopted seed rebuilds only real changes (manaflow-ai#14262) ee95353 test: judge renderer retention after the async release lands (manaflow-ai#14247) eeb5d53 ci: skip a main seed build only when the nearest seed has the same inputs (manaflow-ai#14261) 55d9b75 ci: clone the canonical build root instead of rsyncing it (manaflow-ai#14254) # Conflicts: # .github/workflows/ci-guards.yml # .github/workflows/ci-macos.yml # .github/workflows/seed-derived-data.yml # .github/workflows/test-e2e.yml
This was referenced Sep 24, 2026
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.
Why
A seeded compile admission redid module work for unchanged code. Canary run 36022099083 adopted the seed of its own base commit (
seed_distance0), and its firstbuild-for-testingstill reran 94 SwiftDriver and 64 SwiftEmitModule tasks, every third-party package included (SwiftSyntax, Crypto, PostHog, MarkdownUI, IrohLib, WireGuardKit, ...). That is 43-46 CPU-s of emit plus 107-185 CPU-s of driver planning per admission. Main's seeder shows the same (run 36021070919: 94 / 65).The XCBuild debugging trace from that run (
EnableBuildDebugging), read against the seed'sprior-build.db, names the inputs:/Applications/Xcode_26.6.appcome backinvalid-value: SDK headers,prebuilt-modules, XCTest/Testing/XCUIAutomation. Inode and device are already ignored (IgnoreFileSystemDeviceInodeChanges), and mode and size match. Only the mtime differs: 2026-09-21 20:21 vs 20:42 UTC. Blacksmith images install Xcode at image build time, so two VMs from the same pool (bothblacksmith-12vcpu-macos-26) disagree. Every Swift driver task discovered these files, so every one reruns. No mtime replay can fix this, because the files are outside the checkout.GeneratedModuleMaps/*.modulemapwith identical bytes duringCreateBuildDescription(93Copytasks in scheme 1, 0 in schemes 2 and 3). This happens outside llbuild, so its recorded stat never matches.The inputs that
changed_inputscounts (45-61) are not the cause. At distance 0 they are 35 git refs andFETCH_HEADfiles in.ci-source-packages/repositories/*,workspace-state.json, 4scripts/ci/__pycache__files, and the diff under test.What
compile-app-host-test-product.sh buildruns xcodebuild with Swift Build'sFileSystemMode=checksum-only, so llbuild compares file contents instead of stat. The variable is set only in the environment of those xcodebuild invocations; Swift Build reads it from its launching process first, so nothing global changes. A build database written in one mode reruns every task in the other, so the mode joinsfingerprint. The seed prefix changes with it, and a checksum-mode build never adopts a device-agnostic seed.Every seeded build already goes through
build(): PR admission, seed-derived-data.yml, nightly, test-e2e (and #14226's E2E adoption usescanonical-build).Evidence
Canary #14256 (run 36029379921, this change plus probes, 6 vCPU). Cold compile under checksum-only: 15 min, and all four scheme manifests report
"file-system":"checksum-only". Then, in the same job:The second row is what a fresh runner adopting a seed looks like; under device-agnostic it reran the driver and emit for every target. A toy package on Xcode 27 shows the same split: content-preserving touches rerun nothing, and a real edit rebuilds only its target.
Regression commits: d0c65cd adds
SeededBuildFileSystemModeTests(fails:FileSystemModeunset, device-agnostic fingerprint); 84fee6a passes all 19 intests/test_ci_canonical_build_root.py.Interaction with mtime replay
The replay in
e2e_warm_derived_data.pystays. As #14250 records, swift-driver decides a clang header or module changed by "newer than the last build", independent of llbuild, so stamping a changed input with the current time is still what makes the driver rebuild it. checksum-only only stops llbuild from rerunning tasks whose inputs are byte-identical. #14241's directory keys stay as a harmless fallback. The touch-everything probe touched every directory and reran nothing, so they no longer decide anything under this mode.Rollout cost
The fingerprint change means the first admissions after merge miss the seed and compile cold until seed-derived-data.yml publishes a checksum-mode seed for the merge commit. That seed is itself a cold build, about 15-20 min. The test compilation cache key moves with the fingerprint too, so nightly's first run after merge misses it once.
The before/after number on a real test-only PR push (SwiftEmitModule count and the "cmux" scheme phase) comes after that first seed lands. Before: run 36001051652, 64 SwiftEmitModule tasks.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Runs seeded builds in Swift Build's
checksum-onlyfile mode so an adopted seed rebuilds only inputs whose contents changed, instead of rerunning every SwiftDriver and SwiftEmitModule task for Xcode files whose mtime differs across Blacksmith images. The mode joins the seed fingerprint, and builds in one mode never adopt a seed recorded in the other.Migration
Written for commit 84fee6a. Summary will update on new commits.