Skip to content

ci(mutants): cap lints on in-diff mutant builds, so -D warnings stops turning every mutant unviable (#400) - #524

Merged
avrabe merged 1 commit into
mainfrom
ci/mutants-cap-lints
Oct 27, 2026
Merged

avrabe merged 1 commit into
mainfrom
ci/mutants-cap-lints

Conversation

@avrabe

@avrabe avrabe commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

#522's per-PR gate ran cargo mutants --in-diff under the workflow-wide
RUSTFLAGS "-D warnings". A mutant that replaces a function body leaves
its parameters unused, and -D warnings makes that a compile error
("unused variable: inst"). On #517 all 9 selected mutants were
therefore UNVIABLE, nothing was caught, and the gate's "none caught"
rule failed the PR with no test ever having run. Same diff measured
locally under RUSTFLAGS="-D warnings": 9 unviable, reproduced exactly.

--cap-lints=true makes cargo-mutants cap lint levels for mutated
builds. Same diff, same RUSTFLAGS, with the flag: 9 selected, 6 caught,
3 unviable, 0 missed, matching the local run without -D warnings.

Only the in-diff step changes. The full-crate run keeps -D warnings,
because its 292 ratchet was measured under it and capping would change
which mutants compile.

The "none caught → FAIL" rule did its job here. It refused to read "0
missed" from a run in which no test executed.

Refs #400, #496

🤖 Generated with Claude Code

https://claude.ai/code/session_01BnBWxgVEUPdsBTLNKtrA6Z

…ps turning every mutant unviable (#400)

#522's per-PR gate ran `cargo mutants --in-diff` under the workflow-wide
RUSTFLAGS "-D warnings". A mutant that replaces a function body leaves
its parameters unused, and -D warnings makes that a compile error
("unused variable: `inst`"). On #517 all 9 selected mutants were
therefore UNVIABLE, nothing was caught, and the gate's "none caught"
rule failed the PR with no test ever having run. Same diff measured
locally under RUSTFLAGS="-D warnings": 9 unviable, reproduced exactly.

`--cap-lints=true` makes cargo-mutants cap lint levels for mutated
builds. Same diff, same RUSTFLAGS, with the flag: 9 selected, 6 caught,
3 unviable, 0 missed, matching the local run without -D warnings.

Only the in-diff step changes. The full-crate run keeps -D warnings,
because its 292 ratchet was measured under it and capping would change
which mutants compile.

The "none caught → FAIL" rule did its job here. It refused to read "0
missed" from a run in which no test executed.

Refs #400, #496

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BnBWxgVEUPdsBTLNKtrA6Z
@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions

Copy link
Copy Markdown

Rivet verification gate

✅ 20/20 passed

count
Passed 20
Failed 0
Skipped (no steps) 0

Filter: (and (= type "feature") (or (has-tag "v093") (has-tag "v0100")))

Failed artifacts

(none)

Updated automatically by tools/post_verification_comment.py. Source of truth: artifacts/verification.yaml.

@avrabe
avrabe merged commit dcd453e into main Oct 27, 2026
21 checks passed
@avrabe
avrabe deleted the ci/mutants-cap-lints branch October 27, 2026 19: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.

1 participant