Exclude aarch64-gated merkle code from mutation
What changed, and why it matters
This change only updates the mutation-testing configuration file. It tells the automated mutation-testing tool to skip testing certain new merkle root functions because they are only compiled for ARM64 (aarch64) processors and the project's CI currently runs on x86_64. There is no change to actual Bitcoin library code, no bug fix, and no security patch.
No security action needed. This is a test-configuration-only change. Reviewers may optionally verify that issue #5540 tracks re-enabling mutation testing once x86 SIMD support lands.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds three regex exclusions to .cargo/mutants.toml for functions gated by cfg(target_arch = “aarch64”). These functions are not compiled on the x86_64 CI runner, so mutation testing cannot kill their mutants. The change is purely CI/test-tooling configuration and defers mutation coverage until x86 SIMD support is implemented (issue #5540).
Changed components
.cargo/mutants.tomlInspect captured patch +4 / −0
diff --git a/.cargo/mutants.toml b/.cargo/mutants.toml
index 88d34d8c..6075df3f 100644
--- a/.cargo/mutants.toml
+++ b/.cargo/mutants.toml
@@ -55,6 +55,10 @@ exclude_re = [
"primitives/.* WitnessDecoder::reserve_batch", # Mutations cause 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.
+ # 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
+ "primitives/.* <impl MerkleNode for WitnessMerkleNode>::calculate_root", # Behind cfg(target_arch = "aarch64"), not compiled on x86_64 CI runner
# 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.