Add exception for resize_if_needed mutant
What changed, and why it matters
This commit only updates a mutation-testing configuration file. It tells the mutation-testing tool to ignore one specific artificial code change in a buffer-resizing helper because the change behaves the same way and cannot be tested. There is no change to the actual library code, no bug fix, and no security relevance.
No action needed. This is a testing-tool configuration change with no security implications.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds a single regex exclusion to .cargo/mutants.toml for primitives/.* WitnessDecoder::resize_if_needed. The exclusion prevents cargo-mutants from reporting a mutant where *= is replaced with +=. The commit message states this mutant is ‘purely performant and untestable’ because the buffer is still resized correctly. No source code is modified.
Changed components
.cargo/mutants.tomlInspect captured patch +1 / −0
diff --git a/.cargo/mutants.toml b/.cargo/mutants.toml
index 3c335f7c..8d2cba2a 100644
--- a/.cargo/mutants.toml
+++ b/.cargo/mutants.toml
@@ -49,6 +49,7 @@ exclude_re = [
"primitives/.* <impl Encoder for .*Encoder<'_>>::current_chunk", # Replacing the return with Some(vec![]) causes an infinite loop.
"primitives/.* <impl Encoder for .*Encoder<'_>>::advance", # Replacing the return with true causes an infinite loop.
"primitives/.* <impl Decoder for WitnessDecoder>::push_bytes", # Replacing == with != causes an infinite loop
+ "primitives/.* WitnessDecoder::resize_if_needed", # Replacing *= with += still resizes the buffer making the mutant untestable.
# consensus_encoding - most of these are for mutations in the logic used to determine when to stop encoding or decoding.
"consensus_encoding/.* <impl Decoder for ArrayDecoder<N>>::push_bytes", # Mutations cause an infinite loop
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.