feat(CI-CD): shard mutation-dashboard.yml so its runtime stops scaling with the helper count - #162
Merged
Merged
Conversation
…ing with the helper count Runtime had grown from 22 to 40+ minutes as helpers were added, twice requiring a manually bumped timeout (#160) — a fixed cap that would only be outgrown again as the project keeps growing. Splits the single full-project mutation job into a 4-way matrix, each shard testing a disjoint, deterministically round-robin-selected subset of helper files (self-rebalancing as files are added or removed, no category list to maintain), then an aggregate job merges the shards' reports, uploads to the Stryker Dashboard, and commits the refreshed incremental baseline — the same job that carried these responsibilities before. Each shard's own report already covers the whole project (Stryker's incremental mode carries forward every file outside a shard's --mutate scope from the baseline), so scripts/mutation/merge-shards.ts uses each shard's manifest to pick, for every file, the one shard that actually tested it fresh — verified locally against both a clean merge and a shard missing one of its assigned files. It also hard-fails if fewer shard artifacts exist than expected, since a shard job failing before its upload step would otherwise let `download-artifact`'s glob silently return an incomplete set. Closes #159. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
✅ PR Validation Passed
📋 Pipeline Status
📊 Code Coverage
🧬 Mutation Testing
🌐 Runtime Compatibility
⏱️ Benchmarks
ℹ️ About this report
🤖 Generated by @helpers4 CI • 2026-09-08 |
3 tasks
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-dashboard.yml's single full-project mutation job with a 4-way matrix (mutation-shard), each shard testing a deterministic, self-rebalancing round-robin subset of helper files (sorted file list,(NR-1) % SHARD_COUNT == shard) — no category list to maintain as helpers are added or removed.aggregatejob downloads all shard reports, merges them (scripts/mutation/merge-shards.ts), uploads to the Stryker Dashboard, and commits the refreshedreports/mutation/incremental.jsonbaseline — same responsibilities the old single job had.--mutatescope from the committed baseline) — verified by reading Stryker'sincremental-differ.tsandjson-reporter.tssource directly. The merge script uses each shard's manifest to pick the one shard that actually tested each file fresh, rather than a stale carried-forward duplicate.SHARD_COUNT(a shard job failing before its upload step would otherwise letdownload-artifact's glob pattern silently return an incomplete set) — both paths verified locally with synthetic fixtures.echoleft a trailing newline baked into the last filename once re-read viafs.readFileSyncin a later step; switched toprintf.Why
mutation-dashboard.yml's runtime grew from 22 to 40+ minutes as helpers were added today, needing a manually bumped timeout (#160) — a fixed cap that would only be outgrown again as the project keeps growing. Sharding keeps each job's own runtime roughly constant regardless of total helper count.Test plan
pnpm run typecheck/pnpm run lintcleanmerge-shards.tsverified locally against synthetic shard fixtures: correct fresh-vs-stale file selection, missing-file-in-report failure, and missing-shard-artifact failure🤖 Generated with Claude Code