Context
From the first complete full mutation-testing run (ADR-007 shared workflow, run 29074771985, 2026-07-10, main @ 94a5d44). The fragmentation encode path has untested boundaries, two unused public helpers, and an undispatched trait impl; the shared frame-length decoder misses a length-mismatch case.
Surviving mutants
src/fragment/series.rs:37 — replace FragmentSeries::is_complete -> bool with true
src/fragment/fragmenter.rs:146 — replace > with >= in Fragmenter::build_fragments_from
src/fragment/fragmenter.rs:155 — replace < with <= in Fragmenter::build_fragments_from
src/fragment/fragmenter.rs:262 — replace FragmentBatch::into_fragments -> Vec<FragmentFrame> with vec![]
src/fragment/config.rs:58 — replace encoded_fragment_ceiling -> usize with 0 / 1, replace + with * / -
src/fragment/adapter.rs:133 — replace <impl FragmentAdapter for DefaultFragmentAdapter>::purge_expired -> Vec<MessageId> with vec![]
src/frame/conversion.rs:83 — replace < with > in bytes_to_u64
Analysis
is_complete() is only ever asserted true (and accept() reads the field directly, not the method). The fragmenter's offset == total boundary is untested: the original returns Ok(vec![]), the >= mutant errors with SliceBounds, and the <= mutant emits a spurious empty is_last fragment. into_fragments and encoded_fragment_ceiling are public helpers with zero callers in the crate or tests. The FragmentAdapter trait impl of purge_expired is never dispatched — FragmentationState aliases the concrete type, so all calls bind the inherent method. In bytes_to_u64, every passing test uses bytes.len() == size and the short cases still error under the mutant via bytes.get(..size); only bytes.len() > size distinguishes it.
Suggested tests / deletions
- Assert
!FragmentSeries::new(id).is_complete() (and after a non-final fragment).
- Fragment with a cursor positioned at
offset == total; assert Ok with an empty fragment vector (kills both fragmenter boundary mutants).
- Either test
into_fragments (fragment a known payload; assert length and contents) or delete it in favour of the tested IntoIterator path.
- Either assert
encoded_fragment_ceiling() == fragment_payload_cap + fragment_overhead() with values where sum, product, and difference all differ, or delete the unused helper.
- Either delete the undispatched
FragmentAdapter trait impl (and the trait, if dynamic dispatch is not intended API) or add a test calling through &mut dyn FragmentAdapter and asserting the evicted identifiers.
- Add a
bytes_to_u64 case with trailing bytes, e.g. bytes_to_u64(&[0x12, 0x34, 0xFF, 0xFF], 2, Endianness::Big) == 0x1234.
Context
From the first complete full mutation-testing run (ADR-007 shared workflow, run 29074771985, 2026-07-10,
main@ 94a5d44). The fragmentation encode path has untested boundaries, two unused public helpers, and an undispatched trait impl; the shared frame-length decoder misses a length-mismatch case.Surviving mutants
src/fragment/series.rs:37—replace FragmentSeries::is_complete -> bool with truesrc/fragment/fragmenter.rs:146—replace > with >=inFragmenter::build_fragments_fromsrc/fragment/fragmenter.rs:155—replace < with <=inFragmenter::build_fragments_fromsrc/fragment/fragmenter.rs:262—replace FragmentBatch::into_fragments -> Vec<FragmentFrame> with vec![]src/fragment/config.rs:58—replace encoded_fragment_ceiling -> usize with 0 / 1,replace + with * / -src/fragment/adapter.rs:133—replace <impl FragmentAdapter for DefaultFragmentAdapter>::purge_expired -> Vec<MessageId> with vec![]src/frame/conversion.rs:83—replace < with > in bytes_to_u64Analysis
is_complete()is only ever assertedtrue(andaccept()reads the field directly, not the method). The fragmenter'soffset == totalboundary is untested: the original returnsOk(vec![]), the>=mutant errors withSliceBounds, and the<=mutant emits a spurious emptyis_lastfragment.into_fragmentsandencoded_fragment_ceilingare public helpers with zero callers in the crate or tests. TheFragmentAdaptertrait impl ofpurge_expiredis never dispatched —FragmentationStatealiases the concrete type, so all calls bind the inherent method. Inbytes_to_u64, every passing test usesbytes.len() == sizeand the short cases still error under the mutant viabytes.get(..size); onlybytes.len() > sizedistinguishes it.Suggested tests / deletions
!FragmentSeries::new(id).is_complete()(and after a non-final fragment).offset == total; assertOkwith an empty fragment vector (kills both fragmenter boundary mutants).into_fragments(fragment a known payload; assert length and contents) or delete it in favour of the testedIntoIteratorpath.encoded_fragment_ceiling() == fragment_payload_cap + fragment_overhead()with values where sum, product, and difference all differ, or delete the unused helper.FragmentAdaptertrait impl (and the trait, if dynamic dispatch is not intended API) or add a test calling through&mut dyn FragmentAdapterand asserting the evicted identifiers.bytes_to_u64case with trailing bytes, e.g.bytes_to_u64(&[0x12, 0x34, 0xFF, 0xFF], 2, Endianness::Big) == 0x1234.