Ignore reserve() capacity mutant in WitnessDecoder
What changed, and why it matters
This commit only updates a mutation-testing configuration file. It tells the mutation-testing tool to skip certain artificial code changes in a WitnessDecoder because those changes only affect memory capacity reservations and cannot be detected by tests. There is no change to actual library code, no bug fix, and no security relevance.
No security action needed. This is a testing-tool configuration change with no runtime effect.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds six exclude_re entries to .cargo/mutants.toml for the cargo-mutants tool. Each entry excludes mutations in
Changed components
.cargo/mutants.tomlInspect captured patch +6 / −0
diff --git a/.cargo/mutants.toml b/.cargo/mutants.toml
index 7c3133bf..7006c602 100644
--- a/.cargo/mutants.toml
+++ b/.cargo/mutants.toml
@@ -60,6 +60,12 @@ exclude_re = [
"primitives/.* == with != in <impl encoding::Decoder for WitnessDecoder>::push_bytes", # Replacing == with != causes an infinite loop
"primitives/.* replace \\+ with \\* in MerkleNode::calculate_root", # Replacing + with * causes an infinite loop
"primitives/.* replace == with != in MerkleNode::calculate_root", # Replacing == with != isn't caught unless alloc is disabled.
+ "primitives/.* replace \\* with \\+ in <impl encoding::Decoder for WitnessDecoder>::end", # reserve(witness_elements * 4) only reserves capacity
+ "primitives/.* replace \\* with / in <impl encoding::Decoder for WitnessDecoder>::end", # reserve(witness_elements * 4) only reserves capacity
+ "primitives/.* replace && with \\|\\| in <impl encoding::Decoder for WitnessDecoder>::push_bytes", # reserve_exact only reserves capacity
+ "primitives/.* replace \\+ with \\* in <impl encoding::Decoder for WitnessDecoder>::push_bytes", # reserve_exact only reserves capacity
+ "primitives/.* replace \\* with \\+ in <impl encoding::Decoder for WitnessDecoder>::push_bytes", # reserve_exact only reserves capacity
+ "primitives/.* replace \\* with / in <impl encoding::Decoder for WitnessDecoder>::push_bytes", # reserve_exact only reserves capacity
# TODO: remove after x86 SIMD support lands (https://github.com/rust-bitcoin/rust-bitcoin/issues/5540)
"primitives/.* calculate_root_batched", # Behind cfg(target_arch = "aarch64"), not compiled on x86_64 CI runner
"primitives/.* <impl MerkleNode for TxMerkleNode>::calculate_root", # Behind cfg(target_arch = "aarch64"), not compiled on x86_64 CI runner
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.