Repository navigation
ci(ci): build the mutated projects once and restore the build in every shard - #226
Merged
Merged
Conversation
…y shard Every shard rebuilt the same 11 turbo tasks from scratch (0 cached, 23-38 s in run 37602076567). A build job now runs beside plan, restores the last run's turbo cache, builds, keeps only the entries it used and saves under a lockfile and source content key; shards restore that key so their build replays from cache Verdict-Semantics: unchanged
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.
Summary
Mutation shards now build once instead of rebuilding the same projects 20 times. A
buildjob runs alongsideplanand saves the turbo build cache, keyed on the content of the lockfile and the sources. Each shard restores that cache, so itsturbo run buildreplays from cache instead of compiling.Before
In main run 37602076567, every shard built the same 11 turbo tasks with
Cached: 0 cached, 11 total. That took 22.9 s on shard 11, 35.7 s on shard 5 and 38.1 s on shard 2: about 20 × 30 s ≈ 10 job-minutes per run. Of a shard's ~60 s of setup, the remaining 25 s is checkout, pnpm and node setup, andpnpm install.Design decisions
mutation-build-<os>-hashFiles(pnpm-lock.yaml, turbo.json, packages/**, test/e2e-core/**), hashed before install sonode_modulesanddiststay out of it. Restores fall back to the previous run's cache by prefix. Turbo re-hashes every task's inputs when it reads the cache, so a stale or partial restore can only cost a rebuild, never wrongdist.--summarizehashes don't name. Without that, each save would carry every older run's entries.needs: [plan, build]. A broken build fails one job, not 20.pnpm installis not cached. It takes 6–8 s with the pnpm store already restored bysetup-node. Restoring anode_modulesarchive with workspace symlinks would cost about the same and adds a second source of truth.Borrowed: Bazel's action cache, which keys on the content of inputs, not the commit, and recomputes on a miss. Rejected: building in the
planjob. Shards can't start until that job finishes, so the build would land on the critical path.Wall-clock trade
Shards now wait for
max(plan, build)instead ofplan. Plan took 36 s in 37602076567. Build is about 25 s of setup plus the tasks this push changed: near 0 s when nothing changed, about 40 s for a lockfile change. Each shard saves about 30 s.Main Mutation runs will measure this; the projection is not a result.
Validation
plan,build,mutation,report;mutationneeds[plan, build], and the build key is wired through job outputs.Cached: 11 cached, 11 totalfrom the pruned directory, and9 cached, 9 totalfor a stryker-js-only filter.pnpm check:ci(112/112),dprint checkandguard:projectsexit 0..github/workflows/is read-only for agents under AGENTS.md. This edit is authorized by Kiro's Conductor direction of 2026-10-07 (cycle 111), as #213 was by the decision of 2026-10-06.