Repository navigation
ci: shard the pull request mutation gate, and skip it where nothing it tests changed - #467
Merged
Merged
Conversation
…t tests changed The pull request's mutation run is now six parallel shards, each mutating a disjoint share of every module's top-level statements, run incrementally against the last green report on main. A merging job takes each mutant from the shard whose range holds it, decides the score, names every survivor, and on main uploads the merged report as the next baseline. A pull request that changes no module, test, gate configuration or dependency runs no shard. The weekly full run uses the same statement-level split. Closes #464
…r's pieces plainly
Shape
CoverageBaseline:
Lines this pull request changed: 173/174 covered (99.43%). |
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
The pull request's mutation gate now runs as six parallel shards and one merging job, and a pull request that changes nothing the gate reads runs no shard at all.
scripts/mutation-shard.tshands each shard a disjoint share of every module's top-level statements as--mutateline ranges, weighed by runtime syntax nodes (which track per-statement mutant counts at r = 0.96). Stryker mutates only a node a range holds whole, and every node sits inside one top-level statement, so every mutant lands in exactly one shard. Each file is spread over every shard, so a change that re-tests one module re-tests it in parallel. The weekly full run uses the same split.scripts/mutation-merge.tskeeps each mutant only from the shard whose range holds it, merges the test lists, decides the score against the break threshold, and names every survivor. On a push to main that merged report is themutation-incrementalbaseline.scripts/mutation-scope.tscompares the merge commit with its first parent. A release (version fields only), docs oremf/change runs no shard, andMutationpasses on main's result.src/,test/, the Stryker and Vitest configuration,tsconfig.json,.nvmrc, the setup action,ci.yml, the gate's own scripts, and any dependency change still run it. A push to main always runs.Pipeline Completeneeds onlyMutation, which never skips and fails when the scope job or any shard did not succeed. RULE-075 andtest/pipeline-wiring.test.tshold that; ADR 0063, RULE-064,docs/architecture.md, REQ-063 and REQ-064 say what the gate now is.To know:
INVARIANTSinsrc/check/union.ts(about 353 of the file's 648 mutants) cannot be split without dropping the mutant of every node that spans the cut. A change that re-tests every mutant ofunion.tswaits on that statement, about half of today's time rather than a third; a change spread like feat: deliver the database credential an edge derives, as itself or to the environment #462's (2,374 mutants re-tested) should take about a sixth plus setup. This run is the first real timing.mutation-survivors.tsnow reads every shard's part of one file: with range shards, two weekly reports can each hold part of a file, and the old merge by file name kept only one.Closes #464
Verification
npm run verifypasses, and actionlint is clean.emf/commits, and runs every commit that touchessrc/ortest/.