AMT coverage: g1-knownmagic-enum-prefix-b - #202
Conversation
…ncoding, KnownMeta, normalize Pins the behaviours that a 76-mutant probe pass showed the existing suite does not discriminate: - every KnownMagic discriminant (AddressList had no prefix test), the 0xff prefix invariant, TryFrom<u64> for all 19 variants plus the UnknownMagic fallback, and the strum/serde kebab-case names - hash(false) vs hash(true) against handwritten cbor bytes - cbor_decode corrupt-input guards: empty input, bare document prefix, truncated trailing bytes, non-cbor trailing bytes, missing mandatory keys 0/1, unknown magic values - unpack content-encoding dispatch, the 13-magic unpack_into whitelist and its UnsupportedMeta rejections, String utf8 error path, Vec<u8> decode - ContentEncoding deflate compresses (zlib CMF pinned) and roundtrips, zlib + raw-deflate decode fixtures, InflateError on garbage, passthrough arms, kebab-case strum names for the content headers - KnownMeta TryFrom<KnownMagic> full mapping + UnsupportedMeta arm and its CLI-facing kebab-case names - KnownMeta::normalize: canonicalization, validation rejection and parse errors for OpV1 / SolidityAbiV2 / InterpreterCallerMetaV1, binary passthrough Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 36 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
rainix-rs-static failed on formatting only (clippy is clean); this is cargo fmt --all with no semantic change. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Adversarial mutation-test coverage for group g1-knownmagic-enum-prefix-b (30 behaviours across 5 units), scanned commit bba50a7.
Method: all 76 mutants were first probed against the pre-existing suite (attribution pass), then each surviving mutant got a new discriminating test and was re-probed with
--onlyuntil killed. No existing test was deleted, weakened, or edited to pass under a mutation.Behaviour matrix
test_op_meta_v1;test_address_list,test_all_discriminants_pinnedto_be_bytes->to_le_bytes(M03)test_authoring_meta_v1et altest_try_from_u64_roundtrip_all_-> Ok(OpMetaV1) (M23)test_try_from_u64_unknown_magictest_strum_kebab_case_parse_displaytest_serde_kebab_case_roundtriptest_empty_item,oa_schema_map_key_roundtrip, dotrain roundtripstest_hash_bare_vs_documentoa_schema_map_key_roundtripet altest_build_empty,meta_seq_roundtripmeta_seq_roundtrip, order_builder/oracle teststest_cbor_decode_trailing_truncated_is_corrupt==-><=(M53)no_schema_key_encodes_as_before_roundtripet altest_extract_from_meta_empty_data;test_cbor_decode_trailing_truncated_is_corrupttest_unpack_decodes_content_encodingtest_unpack_into_whitelisttest_empty_item,no_schema_key_encodes_as_before_roundtrip,oa_schema_map_key_roundtripnon_oa_schema_extra_map_key_errors,no_schema_key_encodes_as_before_roundtrip;test_cbor_decode_missing_payload_errors,test_cbor_decode_unknown_magic_errors,test_cbor_decode_missing_magic_errorstest_try_into_string_invalid_utf8_errors,test_try_into_vec_decodes_encodingtest_content_encoding_deflate_roundtriptest_content_encoding_decode_fixtures,test_content_encoding_decode_garbage_errorstest_empty_item, roundtrips;test_content_headers_strum_namestest_into_meta_document;test_known_meta_try_from_magic_-> Ok(OpV1) (M30)test_known_meta_try_from_magictest_known_meta_strum_parse_displaytest_normalize_op_v1_rejects_invalid_symbol,test_normalize_op_v1_canonicalizestest_normalize_op_v1_rejects_invalid_symboltest_normalize_solidity_abi_v2_rejects_bad_inputtest_normalize_interpreter_caller_rejects_empty_methodsEquivalent mutants (recorded, not killable)
error.offset() == len-><=: with serde_cbor 0.11.2 an eof error's offset is always the end of input (== len), verified empirically for clean ends, truncated u64 headers, truncated arrays and missing values. Theelsebranch is unreachable; the effective trailing-truncation guard is the final length check (now pinned bytest_cbor_decode_trailing_truncated_is_corrupt).track.len() != metas.len()->false: both vectors are pushed in the same iteration and any push failure returns early, so the lengths can never differ at the guard.Both are recorded in the audit issue about unreachable guard conditions.
QA
test_address_list,test_all_discriminants_pinned,test_all_prefixes_start_with_0xff,test_try_from_u64_roundtrip_all,test_try_from_u64_unknown_magic,test_strum_kebab_case_parse_display,test_serde_kebab_case_roundtrip,test_hash_bare_vs_document,test_cbor_decode_empty_is_corrupt,test_cbor_decode_trailing_truncated_is_corrupt,test_cbor_decode_trailing_garbage_errors,test_cbor_decode_missing_payload_errors,test_cbor_decode_missing_magic_errors,test_cbor_decode_unknown_magic_errors,test_unpack_decodes_content_encoding,test_unpack_into_whitelist,test_try_into_string_invalid_utf8_errors,test_try_into_vec_decodes_encoding,test_content_encoding_deflate_roundtrip,test_content_encoding_passthrough,test_content_encoding_decode_fixtures,test_content_encoding_decode_garbage_errors,test_content_headers_strum_names,test_known_meta_try_from_magic,test_known_meta_strum_parse_display,test_normalize_op_v1_canonicalizes,test_normalize_op_v1_rejects_invalid_symbol,test_normalize_solidity_abi_v2_rejects_bad_input,test_normalize_solidity_abi_v2_canonicalizes,test_normalize_interpreter_caller_rejects_empty_methods,test_normalize_passthrough_for_binary_metas- each fails on base under its target mutation (verified by mutation-probe pass 2: every re-probed mutant reports KILLED naming these tests as killers; probe logs per mutant)crates/cli/src/meta/{magic.rs,mod.rs,normalize.rs}; the behaviour matrix above maps every mutation to its verdict and killing test. Pass 1 (pre-existing suite): 36 KILLED / 40 SURVIVED / 0 NO-RUN / 0 HARNESS-ERROR. Pass 2 (with new tests): all survivors KILLED except two mutants proven equivalent (M53 eof-offset==-><=, M56 track/metas length check removal), documented in cbor_decode corrupt-meta guard carries unreachable sub-conditions (eof offset equality, track/metas length) — equivalent-mutant evidence #190.rain-meta-document-v1) — all independent of the implementation under test.Issues filed from the adversarial pass (audit + adversarial labels): #186, #187, #188, #189, #190, #191, #203, #204, #216. (#217/#218 are accidental duplicates of #203/#204 from a re-dispatched run of this group and are marked as such.)
🤖 Generated with Claude Code
Independent re-verification (second g1 run, 2026-08-22)
A re-dispatched run of this group independently rebuilt the harness from scratch (fresh clone at bba50a7, its own 92-mutant file) and converged on the same matrix:
--onlyagainst THIS branch's delivered tests (52 mutants including per-key Deserialize dispatch and per-mime rename probes the first pass did not carry): every non-equivalent mutant is KILLED by the tests on this branch; the two analytically equivalent mutants (eof-offset comparison, ContentEncoding kebab-vs-snake on single-word variants) survive as predicted and are documented in cbor_decode corrupt-meta guard carries unreachable sub-conditions (eof offset equality, track/metas length) — equivalent-mutant evidence #190.SliceReadeof paths (end()and byte-exhaustion) construct the error withoffset == slice.len(), soerror.offset() == lenis always true for eof from a slice.rainix-rs / staticwas red on formatting only; fixed by thestyle: rustfmtcommit with no semantic change.