consensus_encoding: whitelist timeout mutants
What changed, and why it matters
This commit only updates a test-tool configuration file. It tells an automated mutation-testing tool (cargo-mutants) to skip testing certain code patterns because they would cause the test suite to loop forever. It does not change any actual library code, fix a bug, or alter how the software behaves in production.
No security action needed. Review as a normal tooling/CI maintenance change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds three exclude_re entries to .cargo/mutants.toml. These regexes prevent cargo-mutants from mutating specific consensus_encoding methods (Encoder::advance, flush_to_vec, flush_to_writer) because the resulting mutants trigger infinite loops during test runs. This is purely a CI/testing hygiene change.
Changed components
.cargo/mutants.tomlInspect captured patch +3 / −0
diff --git a/.cargo/mutants.toml b/.cargo/mutants.toml
index d65eabc2..88d34d8c 100644
--- a/.cargo/mutants.toml
+++ b/.cargo/mutants.toml
@@ -64,4 +64,7 @@ exclude_re = [
"consensus_encoding/.* decode_from_slice", # Mutations cause an infinite loop
"consensus_encoding/.* decode_from_read", # Mutations cause an infinite loop
"consensus_encoding/.* <impl Decoder for .*>::push_bytes", # Mutations cause an infinite loop
+ "consensus_encoding/.* <impl Encoder for .*>::advance", # Replacing the return with true causes an infinite loop.
+ "consensus_encoding/.* delete ! in flush_to_vec", # Causes an infinite loop.
+ "consensus_encoding/.* delete ! in flush_to_writer", # Causes 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.