Repository navigation
test(claw): kill the 22 real sarif.t27 mutation survivors - #10718
Merged
Merged
Conversation
A mutation sweep of specs/claw/sarif.t27 (137 single-operator mutants) left 35 alive: 22 real, 13 equivalent. Nine new tests kill the 22 real ones. They cover: - the put_byte clip at cap - printable edges in messages and paths - a trailing `..` in a path - parse_num on an empty field and on nine digits - a reversed field - per-field line rejects in parse_line - line_end stopping at len - no leading comma before the first rule or result - balanced refusing unbalanced input Production code is unchanged. Re-sweep: 124/137 caught, and the 13 left are equivalent. sarif 24/24 in t27c and t27b. refresh, sarif_feed and sarif_pins pass. The committed gen-c output is byte-identical. The claw_ClawSarif seal is resaved; 32/32 seals verify. service.t27 was swept in the same tick: 8/8 caught. Closes #10717 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 18, 2026 23:38
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This PR adds tests to
specs/claw/sarif.t27, the spec that turns t27c findings into the SARIF document TRI CLAW uploads to code scanning. A mutation sweep showed what its tests let through. Only tests change; production code does not.The sweep covered 137 single-operator mutants over the non-test lines. The same tick swept
service.t27: 8 of 8 caught, no change needed.New tests, one per hole:
a_clipped_document_writes_nothing_at_or_past_capput_bytewriting the byte atcap(render into a zeroed oversized buffer, plusput_bytepinned directly)the_printable_edges_survive_in_messages_and_paths~turned into?in a message;!and~refused in a patha_trailing_dot_dot_is_refused_and_a_trailing_dot_is_not..accepted; a read of the byte after the fieldparse_num_bounds_empty_and_nine_digitsa_reversed_field_is_no_severityfield_eqmatching whene < seach_field_check_rejects_its_own_lineparse_lineaccepting a missing message, an unknown rule, a path outside the repo, a non-numeric column, or an empty messagea_line_ends_at_len_not_at_the_next_newlineline_endreadingtext[len]the_first_rule_and_the_first_result_have_no_comma_before_themrulesorresults(invalid JSON)balanced_refuses_what_is_not_closedbalancedcalling}{,{or an empty buffer balanced, or reading pastnThe last one matters past this file: every render test asserts
balanced(...) == true, and until now that check had only ever been shown balanced input.Equivalent survivors, listed in #10717 so nobody re-investigates them: lines 160, 166, 215, 245, 266, 268, 272, 283, 289, 299, 404, 406, 414.
Verification (Railway lab)
test-reportand t27b: sarif 24 of 24 (was 15), 0 vacuous passes. Every spec that imports it still passes: refresh 54 of 54, sarif_feed 12 of 12, sarif_pins 4 of 4.gen-cregenerates all 7 committedgen/c/claw/*.cbyte-identically.seal --saveforclaw_ClawSarif, thenseal --verifyoverspecs/claw/*.t27plusspecs/verified/gen_file_check.t27: 32 of 32.Self-check
cap. Mutant 86 survived it, because the byte at index 128 happened to be written byput_str, notput_byte. A directput_byteassertion fixed that.balancedtest. The issue is corrected.Closes #10717
🤖 Generated with Claude Code