Repository navigation
CI (dev): build each lane once on a large Mac, test on small ones - #1817
Merged
Merged
Conversation
- Build cluster test products and Build provider test products build each lane once on blacksmith-12vcpu-macos-27 and upload the debug products (scripts/ci-test-products.py, .github/actions/provider-ci-products). The test jobs need their lane's build job, download its products and run them with swift test --skip-build; they compile no package and refuse products of another commit or toolchain. - The jobs of the products work at one fixed path, /private/tmp/dinf: their first step links the workspace to it, because SwiftPM's products hold absolute paths and Blacksmith and Darkbloom check out to different paths. - Cluster Release Build Checks runs the capability and prefill release compiles on a large Mac, in a job no test job waits for; the gate requires it. Refresh build caches is gone: the build jobs refresh the caches of a tested push. - Cluster Runtime Tests: 3 shards; the Gemma 4 base suites run alone on shard 3. Cluster Focused Checks: 2 shards. Provider shard weights measured again from run 42029278469; the last shard's audit warns about unweighted suites. - Only the 7 blocking test lanes ask Darkbloom; the build jobs, the release build checks and Cluster GPU Tests stay on Blacksmith. - Every macOS job samples memory and CPU (scripts/ci-resource-sampler.py, report-only) and prints the peaks; the hand-off prints archive sizes and transfer times. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The Target line names the host's macOS version, which differs between runner images without changing the products. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run 42037827790: the Blacksmith image builds with Xcode 27.2 build 27B5038j (Swift 6.4.2.1.4, SDK 26B5110a); the Darkbloom image has the release build 27B52 (Swift 6.4.2.1.9, SDK 26B118). The versions are equal, so the test job runs the products and warns; another Swift, Xcode or SDK version or another commit still fails the job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…focused The approval lists the lane names of the earlier layout (test-cluster-1 to -3, test-cluster-focused), so test-cluster-3 routed and test-cluster-focused-1 and -2 fell back as lane_not_enabled. A route request may ask for several jobs on one lane (count, granted whole), so both shards now read test-cluster-focused, requested for 2 jobs. No approval change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Run 42046597342 ran Cluster Focused Checks on a Darkbloom VM for the first time; OwnerWriterWakeTests failed with "Renewal interval drifted: 5016.940 ms". The writer waits on a semaphore until the renewal is due and schedules the next one from its send time, so each interval is 5 s plus one timer wake latency; the test allowed a fixed 15 ms, which is Blacksmith's latency, not the writer's. A probe now measures, during the same window, how late this host wakes a thread waiting on a semaphore at the writer's priority; a renewal may be late by that worst wake plus 5 ms, at least 15 ms, and the allowance must stay below the 50 ms idle bound, so a writer that rested a whole idle wait is still told apart. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ci-test-products.py: one helper each for the commit lookup, the MiB size text and the upload or download clock; `uploaded` gets its own function like the other subcommands; `stream` precedes its callers. Output text, manifest and checks are unchanged. - provider-tests.yml: keep the fixed-path explanation once, in build-cluster, and point to it from the other four jobs; Prompt Parity now runs against the downloaded provider products, not the shard's own build, so its comment says so. - ci-resource-sampler.py: list the internal `run` subcommand in the docstring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This comment has been minimized.
This comment has been minimized.
Run 42057277814: Cluster Runtime Tests shard 2 failed on both attempts with every test passed; SwiftPM printed `error: error: accessing build database "...build.db": database is locked`, without the `unable to attach DB:` prefix the guard matched, so it did not run the selection again. LOCKED now matches either wording. The rule is unchanged: run once more only when attempt 1 shows the lock and every test passed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ard 2's groups
- actions/cache stores each path relative to the workspace and unpacks
it with `tar -C <workspace>`. In the jobs whose workspace links to
/private/tmp/dinf, the metallib cache (runner.temp) unpacked to
/private/_temp and failed ("Cannot mkdir"), and SwiftPM's repositories
(home) unpacked under /Library, where SwiftPM never reads. The metallib,
MiMo metadata and codec caches and SwiftPM's repositories now live in
/private/tmp/dinf-ci, whose only common ancestor with a workspace is
`/`; ~/Library/Caches/org.swift.swiftpm/repositories links there.
Restores and push saves use the same paths. A self-test refuses a
runner.temp, home or expression cache path in those jobs.
- Cluster runtime shard 2 found SwiftPM's build database locked at its
two groups' startup in every run (runs 42041608780 to 42065297991).
Each later group now starts CLUSTER_TEST_START_GAP seconds (default 15)
after the one before, as the provider shards' processes do; the
lock-retry guard stays the backstop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 5, 2026
This was referenced Nov 6, 2026
This branch had an error being 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.
Goal
David, 2026-11-05: "we need smaller sizes while preserving CI time". Ruling: build once on a big machine, ship the test products to small machines, keep CI on dev pull requests and pushes. This is Plan B of the VM sizing analysis, plus its Phase 0 sampler.
What changes
build-clusterandbuild-providerbuild each lane once onblacksmith-12vcpu-macos-27and upload the debug products (scripts/ci-test-products.pythrough.github/actions/provider-ci-products). Each test jobneeds:the build job of its lane, downloads the products with the matchedmlx.metalliband resource bundles, and runs the existing--skip-buildcommands. No test job compiles a package.needs:is done. With one build job, the cluster tests would wait for the provider build and the release compiles (warm about 19.7 min critical path, cold about 30 min). With the cluster lane in its own job, the cluster tests start when the cluster products are up.cluster-release-checks) runs the capability and prefill release compiles (--jobs 12) on Blacksmith, in a job that no test job waits for. Its failure skips no test job. The gate requires it. It saves the metadata build cache on push, as before.#filePath, resource bundle paths, local package paths inworkspace-state.json). Blacksmith checks out to/Users/runner/_work/d-inference/d-inference, Darkbloom to/Users/runner/actions-runner/_work/d-inference/d-inference. The first step of every job that builds or runs products replaces the workspace with a link to/private/tmp/dinf. Every later step starts in the workspace; the kernel resolves the link, sogetcwd, SwiftPM, the compiler, Python and the tests see only/private/tmp/dinf. No step, composite action or cache path changes. The Swift build cache keys bind the resolved checkout (provider-ci-cache.py), so the first runs on this branch build cold..buildwithout the compile intermediates (<Target>.build,ModuleCache,index,Modules): test bundles, executables, resource bundles, the staged metallib, checkouts, repositories andworkspace-state.json. tar plus zstd, uploaded withcompression-level: 0, kept 1 day. The test job refuses products of another commit or of another Swift, Xcode or SDK version, warns when only the builds of those versions differ, and never unpacks over a build.base(968 s, serial) splits by model family. The Gemma 4 suites (GEMMA_SUITES, 592 of 970 s in job 127128309712) run alone on new shard 3 asbase-gemma. The rest stays inbaseon shard 1, before the share probe. Each family still shares one process.auditfails when a Gemma suite is missing fromGEMMA_SUITES.provider-test-shards.py weights): 80 suites were missing, so selection 6/6 took them all (245 s against 65 s). The last shard's audit now warns (report-only) about unweighted serial suites.test-cluster-1..3,test-cluster-focused(2 jobs on the lane the approval names),test-provider-1..2, critical path first. They fit the per-run cap of 8. The build jobs, Cluster Release Build Checks and Cluster GPU Tests (18.5 to 24.7 GiB peaks) useblacksmith-12vcpu-macos-27directly. The size label plumbing was dropped, as ruled.darkbloom-route.ymlis unchanged.scripts/ci-resource-sampler.py: every 5 s it records memory in use (active, wired and compressed pages fromvm_stat), the memory pressure level, busy vCPUs and the largest process (ps). It prints the peaks to the log and the step summary, and uploadsresource-samples-<job>-<index>. Its steps cannot fail a job: the report ends in|| trueand the upload is the onlycontinue-on-errorstep. The hand-off prints the archive size and the upload and download times.Every test selection, guard and pin is kept: the lock-retry guard, the share probe alone after
baseon its shard, the parity counts, the plan audits, the native gates, coverage, and theProvider Teststruth table, which now has the release checks as a fourth lane.Before / after
Before is measured: runs 41992571131 (warm) and 42025284502 (cold), all on Blacksmith 12 vCPU. After is measured on this PR's green run 42041608780, which built cold (the cache keys now bind
/private/tmp/dinf, and a pull request saves no cache). In that run, 5 test lanes ran on Darkbloom 12 vCPU / 32 GiB sandboxes (the approval is not yet re-pinned to 4 vCPU / 16 GiB), and the 2 focused lanes fell back to Blacksmith (lane_not_enabled: the approval does not nametest-cluster-focused-1and-2yet). Warm rows for "after" are the measured jobs minus the measured cold compile and metallib steps, plus the warm compile times of run 41992571131. Rows at 4 vCPU count the 7 test lanes at the approved size and the build-stage and GPU jobs at 12 vCPU.The gating critical path is Build cluster test products (4.48 min cold), the job start (0.62 min) and Cluster Runtime Tests shard 2 (17.22 min on Darkbloom; 14.85 min with its build on Blacksmith before). Darkbloom's host is slower than Blacksmith's for that serial shard, as the sizing analysis expected; splitting shard 2's two groups would shorten it at the cost of one more lane.
Per job, run 42041608780
air-lld)air-lld)swift-frontend)swiftpm-testing-helper)"Memory in use" is active, wired and compressed pages, file cache included; the pressure level stayed 1 (normal) in every job.
Findings for the sizing decision:
Hooked up
build-cluster,build-provider:.github/workflows/provider-tests.yml; each runsprovider-ci-build, thenprovider-ci-products(direction: upload) when its component's tests run.test-providerneeds: build-provider;test-clusterandtest-cluster-gpuneeds: build-cluster; each downloads withprovider-ci-products(direction: download, step idtest-products), and every test step's condition readssteps.test-products.outcome.test-cluster-focused: both shards read lanetest-cluster-focused, requested for 2 jobs inprovider-plan.yml.cluster-release-checks: in the gate'sneedsand itsCLUSTER_RELEASE_RESULTcheck.build-cluster,build-provider,test-provider,test-cluster,test-cluster-gpu.base-gemma:scripts/cluster-test-plan.pySELECTIONS(blocking shard 3),test-clustermatrix[1, 2, 3], route lanetest-cluster-3.[1, 2], route lanestest-cluster-focused-1,-2.scripts/provider-test-shard-weights.json(read byprovider-test-shards.py argsandaudit-job); the unweighted-suite warning runs inaudit-jobof the last shard.Check the CI plans:test-ci-test-products.py,test-ci-resource-sampler.py(new), with the updatedtest-provider-ci-workflow.py,test-cluster-test-plan.py,test-provider-test-shards.py,test-ci-component-paths.py,test-darkbloom-route.py.ci-component-paths.py); docs-impact maps them tobuild.mdandtest.md.docs/developer/build.md(Build Once, routing, caching),docs/developer/test.md; changelogchangelog.d/ci-build-once.md.Diagrams
Before:
After:
Validation
--skip-buildat/private/tmp/dinf, on Darkbloom (5 lanes) and on Blacksmith. The GPU shards failed exactly the 6 selections they fail on dev (runs 41992571131 and 42029278469), so the handed-off products behave as the products built in place.test-cluster-1to-3,test-cluster-focused), sotest-cluster-3routed andtest-cluster-focused-1,-2fell back (lane_not_enabled). Both focused shards now read the approved lanetest-cluster-focused, requested withcount: 2(a lane is granted whole for its count). No approval change.OwnerWriterWakeTests: "Renewal interval drifted: 5016.940 ms". The writer waits on a semaphore until the renewal is due and schedules the next from its send time, so each interval is 5 s plus one timer wake latency; the test allowed a fixed 15 ms (Blacksmith's latency). The test now measures this host's wake latency during the same window (same primitive, user-interactive priority) and allows that worst wake plus 5 ms, at least 15 ms and below the 50 ms idle bound, so a writer that rests a whole idle wait still fails. On Darkbloom: worst wake 20.0 ms in 346 waits, interval 5008.3 ms.base-batch-sessiontwice (SwiftPM build database locked on attempt 1, every test passed).swiftc; they are the checks themselves, so they stay in the test jobs.🤖 Generated with Claude Code