CI: require mutation coverage on changed lines #108
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!108
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/108/head"
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?
@dutch2005 on GitHub · 2026-11-25 14:18 UTC · original
ci/mutation-testing→main· +154 −0 · 4 files · 2 commits · closed without mergingWhy
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.@dutch2005 on GitHub · 2026-11-25 16:51 UTC · original
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