Make mutation testing exclude more specific
What changed, and why it matters
This commit only changes a configuration file for mutation testing. It makes an existing test exclusion more specific so that future code additions are still tested. There is no change to the actual Bitcoin library code, no bug fix, and no security relevance.
No security action needed. This is a routine development hygiene change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch updates .cargo/mutants.toml to narrow a regex exclusion for cargo-mutants. The old pattern excluded all impl encoding::Decodable blocks; the new pattern excludes only the decoder function inside those impls. This prevents newly added functions in future Decodable impls from being silently skipped by mutation testing. It is a tooling/CI configuration change with no runtime effect.
Changed components
.cargo/mutants.tomlInspect captured patch +2 / −1
diff --git a/.cargo/mutants.toml b/.cargo/mutants.toml
index c2de2f15..f43eb356 100644
--- a/.cargo/mutants.toml
+++ b/.cargo/mutants.toml
@@ -11,7 +11,8 @@ exclude_re = [
"deserialize", # Skip serde mutation tests
"serde_details::<impl de::Visitor<'_>", # Skip serde mutation tests
"Iterator", # Mutating operations in an iterator can result in an infinite loop
- "impl encoding::Decodable", # Mutant replacing Default::default() is equivalent to returning new()
+ "<impl encoding::Decodable for .*>::decoder", # Mutant replacing Default::default() is equivalent to returning new()
+
# ----------------------------------Crate-specific exclusions----------------------------------
# Units
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.