CI: require mutation coverage on changed lines #108
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/108"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Belobug/VIctory-Belobug-AMD. Originally posted by dutch2005 on 2026-11-25T14:18:51Z.
Why
The project needs a defined quality bar for new code. Mutation testing makes "the test covers the change" mechanical: it mutates the changed lines and fails if the tests still pass. This is the Rust equivalent of mutmut/Stryker.
What
.cargo/mutants.toml: no target-directory copy (a stale build must not decide a result), lints capped so denied warnings do not make mutants unviable, 120 s minimum test timeout.docs/mutation-testing.md: policy, local command, how to handle a surviving mutant, GPU/serial note, and the knownLower::newtool limitation..github/workflows/mutants.yml: on pull requests, fetch the base branch, diff it, and runcargo mutants --in-diff ... --timeout 300 --jobs 2. Only changed lines, so cost stays bounded.Testing
cargo mutants --config .cargo/mutants.toml --list -p victory-coreparses the config and lists mutants.xmemfirst reported 2 caught / 1 missed; adding the large-reservation test made it 3/3. The wave64 condition was extracted towants_wave_size, and the tool then found 9 mutants, all caught.Notes
mainare covered by the normal CI.--package; the current form already only examines changed lines.Imported from Belobug/VIctory-Belobug-AMD. Originally posted by dutch2005 on 2026-11-25T16:51:53Z.
Rebased onto
upstream/main(01aadd1) and updated the mutation workflow/docs to match:.github/workflows/mutants.yml: setRUST_TEST_THREADS: "1"in the stepenvsoxmemand GPU differential tests run serially on CI, and pass-e "xtask/**"until#72/#84bringlower.rsunder the 512 KiB asset-policy cap.docs/mutation-testing.md: documentRUST_TEST_THREADS=1and the temporaryxtaskexclusion.cargo xtask policy --staged(2 files ok) andcargo mutants --in-diff pr108.diff -e "xtask/**" --timeout 300 --jobs 2(INFO Diff changes no Rust source files, exit 0).Pull request closed