Skip to content

Provider CI: pack only what the test jobs read - #1882

Merged
davidtai merged 2 commits into
devfrom
ci/smaller-provider-products
Nov 7, 2026
Merged

davidtai merged 2 commits into
devfrom
ci/smaller-provider-products

Conversation

@davidtai

@davidtai davidtai commented Nov 7, 2026 •

Copy link
Copy Markdown
Collaborator

What

The provider test products hand-off (scripts/ci-test-products.py, .github/actions/provider-ci-products) packs only what the test jobs read, and packs it tighter.

Composition of the provider archive of run 42318853015 (1,065 MiB at zstd -3), by kind:

Kind Files (MiB) zstd -3 (MiB) Test jobs read it?
.dSYM bundles (test bundle 948, darkbloom 465, darkbloom-enclave 438, others 98) 1,948 336.2 No. llvm-cov reads the coverage maps in the binaries.
.build/repositories (bare git clones) 333.3 315.9 No. SwiftPM reads them only to check out a missing or changed dependency.
Test bundle binary 636.4 144.0 Yes
Executables (darkbloom, darkbloom-enclave, darkbloom-publish, darkbloom-fan-helper, cluster-member-fixture-child) 630.0 140.7 Yes (tests and the coverage report)
mlx.metallib copies in the test bundle (2 x 213 MiB) 426.5 49.4 Yes
.build/checkouts 208.7 36.5 Yes (package graph)
mlx.metallib in the bin directory 213.2 24.8 Yes
Host tools (MLXHuggingFaceMacros-tool, its dSYM, Modules-tool) 62.1 12.0 No. Only the compiler runs them.
Build database and manifests (build.db, debug.yaml, description.json, ...) 54.4 2.8 Yes (swift test --skip-build opens build.db; the lock-retry guard depends on it)
Other (resource bundles, link lists, entitlements) 6.4 1.3 Kept

The object files, ModuleCache, index and Modules were already out (#1817).

Changes

  • scripts/ci-test-products.py: the archive also leaves out every .dSYM (at any depth: the test bundle holds its own), the -tool host products and Modules-tool, and .build/repositories.
  • zstd: -T0 -9 --long=31 to pack, --long=31 to unpack. The 2 GiB long-distance window stores the metallib copies and the code shared by the test bundle and the executables once.
  • The pack line also prints the size of the archived files.
  • scripts/test-ci-test-products.py: the kept and dropped fixtures cover the new rules (a nested test-bundle dSYM, a -tool file and .product, Modules-tool, repositories; the metallib copies, build.db, description.json, a checkout's alternates file and a -tool name outside the build directory stay). The round trip proves the unpack passes the long window: a --long=31 frame does not decompress without it.
  • docs/developer/build.md (Build Once) and changelog.d/ci-smaller-provider-products.md.

Unchanged: every test selection, the toolchain check, the fixed path /private/tmp/dinf, the lock-retry guard, the self-tests and the coverage report.

Measurements (laptop, 10 cores, products of run 42318853015)

Pack MiB Pack s Unpack s Unpack RSS
Old set, -3 1,065 - - -
New set, -3 400.4 1.8 - -
New set, -6 --long=31 278.6 - - -
New set, -9 --long=30 281.6 9.1 - 1.0 GiB
New set, -9 --long=31 (chosen) 265.3 9.2 2.0 2.0 GiB

Darkbloom test VMs have 32 GiB; the 2 GiB unpack peak is before the tests start.

Before and after (CI)

Before: run 42318853015 (#1872's head, this branch's base). After: run 42322758594, attempt 2 (provider shards on Darkbloom) and attempt 1 (the route answered profile_degraded, so every shard ran on Blacksmith). The build job ran on blacksmith-12vcpu-macos-27 each time.

Provider products Before After, attempt 2 (Darkbloom) After, attempt 1 (Blacksmith)
Archive, compressed (MiB) 1,064.6 265.9 265.9
Archive, files (MiB) 4,519 (from the archive listing) 2,177.3 2,177.3
Pack (s) 3.2 4.8 5.0
Upload (s) 9.4 3.4 3.4
Download, shard 1 / 2 (s) 689.2 / 126.0 (Darkbloom) 10.3 / 46.0 4.9 / 4.9
Extract, shard 1 / 2 (s) 5.2 / 5.2 5.9 / 3.4 4.7 / 4.9
Shard wall, shard 1 / 2 (min) 19.0 / 12.3 7.4 / 7.6 6.9 / 6.9
Run wall (min) 23.5 15.0 12.8

The before run had mimo_audio: true, so its shard 2 also ran the MiMo audio fixture steps; this PR's runs had mimo_audio: false. Without the download, shard 1 took 7.5 min before and 7.2 min after. Attempt 2's run wall includes Cluster Runtime Tests shard 5, which lost its Darkbloom runner (see below).

Cluster products Before After, attempt 2
Archive, compressed (MiB) 516.9 106.5
Archive, files (MiB) not printed 1,211.2
Pack / upload (s) 2.0 / 5.4 2.8 / 2.3 (attempt 1)
Download, Cluster Runtime Tests shards (s) 18.5 to 320.8 8.8 to 27.8

Checks on the after runs:

  • Each provider shard ran the same Swift Testing runs as before (shard 1: 950, 180, 1,078 and 1,501 tests; shard 2: 790, 883 and 1,868). The only test names missing are two MiMoV26ManagedAudioProviderTests cases that run only with mimo_audio: true.

  • No SwiftPM Fetching, Cloning or Creating working copy line in any shard log: SwiftPM loads the package graph from the checkouts and workspace-state.json without .build/repositories.

  • Each shard's audit of its selections against swift test list --skip-build and its coverage report passed.

  • The coverage report keeps its denominators (90,530 regions, 28,909 functions, 193,069 lines in shard 1, as before).

Non-green checks

  • Attempt 2, Cluster Runtime Tests (shard 5): its Darkbloom runner lost communication with GitHub in Set up runner, before any step ran (annotation: "The self-hosted runner lost communication with the server"). The Provider Tests gate failed on it. The same shard passed in attempt 1. Not rerun: attempt 2 was this PR's one rerun, made to get Darkbloom provider shards.
  • Vercel d-inference and d-inference-console-ui-dev: fail on every open PR and on Run the real-geometry rows check in two halves on separate GPU shards #1872; this PR touches neither app.

Refactor pass

Done by a dedicated refactor subagent, commit 012a0f4. No behavior change: Modules-tool leaves INTERMEDIATES, because the -tool suffix rule in unread already drops it with the host tools (build.md now lists it with the host tools too). The file-size sum takes one lstat per entry (stat.S_ISREG). The round-trip self-test has a new name and a comment: the unpack fails without --long=31, because a frame packed from a pipe declares the full 2 GiB window. The action, the changelog, the fixtures, the zstd flags, the toolchain check and the fixed path are unchanged.

Trade-off

Without dSYMs, a stalled-test sample (scripts/run-provider-test-watchdog.py, /usr/bin/sample) names each frame's function and offset, but not its file and line. No CI step reads the dSYMs.

Not done

  • Per-shard artifacts: both provider shards run the one test bundle DarkbloomProviderPackageTests.xctest, so a per-shard split would not shrink either download.
  • Before/after Mermaid diagrams: left out on the requester's instruction.

🤖 Generated with Claude Code

The provider test products archive was 1,065 MiB at zstd -3. Of its
4,519 MiB of files, 1,948 MiB were dSYM bundles, 333 MiB SwiftPM's bare
clones in .build/repositories and 62 MiB host tools (the -tool macro and
Modules-tool); no test step reads them. The coverage report reads the
coverage maps in the binaries, and SwiftPM reads the bare clones only to
check out a dependency whose checkout is missing or at another revision.

The archive now leaves them out, and zstd packs it at level 9 with a
2 GiB long-distance window, which stores the test bundle's metallib
copies and the code the executables share once. On the products of run
42318853015 that is 265 MiB. Unpacking passes the same window.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference Error Error Nov 7, 2026 1:47am UTC
d-inference-console-ui-dev Error Error Nov 7, 2026 1:47am UTC
d-inference-landing Ready Ready Preview Nov 7, 2026 1:47am UTC
darkbloom-status Ready Ready Preview Nov 7, 2026 1:47am UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 7, 2026 1:47am UTC

Request Review

- ci-test-products.py: drop the redundant `Modules-tool` entry from
  INTERMEDIATES; the `-tool` suffix rule in `unread` already drops it with
  the host tools. Size the archived files with one lstat per entry
  (stat.S_ISREG) instead of is_file, is_symlink and lstat.
- test-ci-test-products.py: name the round trip for what it drops now, and
  note that it proves the unpack passes the long window.
- build.md: list `Modules-tool` with the host tools, as the code does.

No behavior change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch had an error being deployed

2 failed and 3 active deployments
Preview – d-inference-landing — 012a0f49 Deployed Nov 7, 2026 by vercel[bot]
Preview – eigen-homepages-darkbloom — 012a0f49 Deployed Nov 7, 2026 by vercel[bot]
Preview – darkbloom-status — 012a0f49 Deployed Nov 7, 2026 by vercel[bot]
Preview – d-inference — 012a0f49 Deployed Nov 7, 2026 by vercel[bot]
Preview – d-inference-console-ui-dev — 012a0f49 Deployed Nov 7, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant