👷 ci: scope mutation testing to production code - #2165
Merged
Conversation
The nightly run covers 18,902 mutants, and 1,063 of them sit in code that promises nothing to anyone outside this repository. Every nightly reports those again. Benchmark workloads and the shared harness answer to the tests and measurements that use them, so a mutant there asks a question no assertion can settle. Three paths leave the plan. A benchmark workload builds load for CodSpeed to measure, so changing how much it builds moves the measurement rather than any claim about correctness. Fixture binaries under tests/ hold up assertions that live elsewhere, and mutating one fails the suite that drives it. The shared harness is the one worth arguing over, since an injector that stopped injecting would leave every test using it green while testing nothing. That failure shows up red instead. A test that arms a fault asserts the faulted outcome, so it fails when the fault does not arrive, and -D dead_code covers harness behaviour no test reaches. The inventory agrees, with no mutant in that crate surviving a run. The plan drops to 17,839 mutants. Shard length holds rather than growing, because the nightly divides the same list it mutates, so the count goes from 148 shards to 140 with each still targeting 128 mutants. The reasoning sits in the config beside each glob and in contributing/ci.md, since an exclusion list without a reason is what drifts. A contract pins the three globs and checks that the shard count still comes from the plan the run mutates, so a wider count cannot size the matrix for mutants nothing examines.
gaborbernat
force-pushed
the
fix/mutation-scope-2164
branch
from
September 2, 2026 20:52
cdabeff to
aecb241
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
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.
The nightly mutation run covers 18,902 sites, and 1,063 of them sit in code that answers to nobody outside this repository. A surviving mutant marks a gap where the behaviour is a promise to someone. Production code promises behaviour to the people running peryx, so a survivor there is a missing test. Benchmark workloads, the shared harness and fixture binaries make no such promise, so a survivor in them is noise that each run reports again. The triage in #1893 spent 19 of its 48 sites on those paths.
.cargo/mutants.tomltakes three paths out of scope, with a reason beside each glob. A benchmark workload undercrates/*/src/bench/builds load for CodSpeed to measure, so changing how much it builds moves the measurement rather than any claim about correctness. Fixture binaries undercrates/*/tests/, such as the S3 multipart fixture, hold up assertions that live elsewhere, and mutating one fails the suite that drives it. 🔬 The harness incrates/peryx-test-support/is the one worth arguing over, since a fault injector that stopped injecting would leave every test using it green while testing nothing. That failure shows up red instead. A test that arms a fault asserts the faulted outcome, so it fails when the fault does not arrive, and-D dead_codecovers harness behaviour no test reaches. Both checks land before mutation asks the question, and the inventory agrees, with no mutant in that crate surviving a run. No carve-out earns its place today, and adding a path back means saying in the config why.Shard length holds rather than growing, because
mutation-countfeedsmutation-shard-countfrom the same plan the run mutates, so 148 shards become 140 with each still targeting 128 mutants. 📉 A contract inlint-automationpins the three globs and checks that the count still comes from that plan, so a wider count cannot size the matrix for mutants nothing examines.Closes #2164