Skip to content

feat(CI-CD): shard mutation-dashboard.yml so its runtime stops scaling with the helper count - #162

Merged
baxyz merged 1 commit into
mainfrom
shard-mutation-dashboard
Sep 8, 2026
Merged

feat(CI-CD): shard mutation-dashboard.yml so its runtime stops scaling with the helper count#162
baxyz merged 1 commit into
mainfrom
shard-mutation-dashboard

Conversation

@baxyz

@baxyz baxyz commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replaces 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.
  • New aggregate job downloads all shard reports, merges them (scripts/mutation/merge-shards.ts), uploads to the Stryker Dashboard, and commits the refreshed reports/mutation/incremental.json baseline — same responsibilities the old single job had.
  • 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 committed baseline) — verified by reading Stryker's incremental-differ.ts and json-reporter.ts source 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.
  • Hard-fails loudly if a shard's own report is missing one of its assigned files, or if fewer shard artifacts exist than SHARD_COUNT (a shard job failing before its upload step would otherwise let download-artifact's glob pattern silently return an incomplete set) — both paths verified locally with synthetic fixtures.
  • Fixes a real bug caught during testing: writing the shard's file list with echo left a trailing newline baked into the last filename once re-read via fs.readFileSync in a later step; switched to printf.
  • Closes Shard mutation-dashboard.yml so full runs stay under a hard timeout #159.

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

  • YAML validated with js-yaml
  • pnpm run typecheck / pnpm run lint clean
  • merge-shards.ts verified locally against synthetic shard fixtures: correct fresh-vs-stale file selection, missing-file-in-report failure, and missing-shard-artifact failure
  • Next push-to-main run completes with all 4 shards + aggregate succeeding, and the incremental baseline gets committed
  • Confirm the merged baseline still functions correctly as an incremental-mode baseline on the run after that (i.e. mostly-skipped, fast)

🤖 Generated with Claude Code

…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>
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

✅ PR Validation Passed

All checks passed!


📋 Pipeline Status

Job Status
🔢 Version passing
🏗️ Build passing
🧪 Tests passing
📝 Lint passing
📘 TypeCheck passing
🔐 Security Audit passing
🧾 Conventional Commits passing
🔗 Coherency passing

📊 Code Coverage

Overall Coverage: 100.0% — Target reached! 🎯

Metric Progress Coverage
Lines ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
Branches ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
Functions ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
Statements ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%

🧬 Mutation Testing

⏭️ Mutation Testing: skipped


🌐 Runtime Compatibility

Runtime Compatibility: 3/3 — All runtimes passed!

Runtime Status
🟩 Node.js 26 (LTS) v26.8.1
🦕 Deno 2.8.3
🍞 Bun 1.4.2

🔄 Runtime compatibility is informational only and does not block the PR


⏱️ Benchmarks

⏭️ Benchmarks: skipped


ℹ️ About this report
  • 🎯 Coverage Target: 100% for all metrics
  • 🧬 Mutation Testing: powered by Stryker (non-blocking)
  • ⏱️ Benchmarks: powered by Vitest Bench (non-blocking)
  • 🔄 This comment updates automatically with each push
  • 📈 Coverage is measured using Vitest + v8

🤖 Generated by @helpers4 CI • 2026-09-08

@baxyz
baxyz merged commit e6870ef into main Sep 8, 2026
16 checks passed
@baxyz
baxyz deleted the shard-mutation-dashboard branch September 8, 2026 10:47
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.

Shard mutation-dashboard.yml so full runs stay under a hard timeout

1 participant