Repository navigation
test(claw): kill the real refresh.t27 and sarif_feed.t27 mutation survivors - #10723
Merged
Merged
Conversation
…vivors A mutation sweep of refresh.t27 left 12 of 159 mutants alive; two are real. A sweep of sarif_feed.t27 left 14 of 34 alive; seven are real. Eight new tests kill all nine. They cover: - a 0 inside a line:col position - a column that needs a line number and a colon - a blank line between records - a two-field record - CRLF record lists - a finding list of exactly TSV_CAP bytes, and one byte over - a refresh record cut after its number reusing the previous record's field offsets Production code is unchanged. The re-sweep of the survivors catches all nine real ones. refresh 55/55 and sarif_feed 19/19 pass in t27c and t27b, with 0 vacuous passes. gen/c/claw/refresh.c and sarif_feed.c are regenerated: the diff is only the new tests and the test count. The other five committed gen-c files are byte-identical. Both seals are resaved; 32/32 seals verify. Closes #10721 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 18, 2026 23:55
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 two TRI CLAW law specs, after a mutation sweep showed what their tests let through. Only tests change; production code does not.
specs/claw/refresh.t27decides which open PRs get a base-branch refresh.specs/claw/sarif_feed.t27turns t27c's per-file records into the SARIF document the claw-sarif job uploads.New tests:
a_zero_inside_a_position_is_a_digit0treated as a non-digit, soat line 10:20lands at 1:1a_column_needs_a_line_number_and_a_colon_right_after_it:5with no line, or from3-5with no colona_blank_line_between_records_is_skipped_not_refuseda_two_field_record_is_refused_even_with_a_known_statuspath<TAB>UNWRITTENaccepted as a findingcrlf_records_are_all_reada_finding_list_of_exactly_tsv_cap_bytes_is_keptTSV_CAPbytes thrown awaya_finding_list_one_byte_over_tsv_cap_is_refused_wholea_record_cut_after_its_number_does_not_borrow_the_previous_fields(refresh)rf_splitsaying true for a one-field record (return false→true, and>=→>).rf_classifythen reads the previous record's stale offsets, and #8 gets an R line with someone else's shaThe two
TSV_CAPtests assertfeed_tsv(...) == TSV_CAPand== TSV_CAP + 1before they check the document. If the input arithmetic is wrong they fail loudly instead of passing for the wrong reason.The survivors that stay are listed with a reason each in #10721. Three of them in refresh (lines 332, 350 and 413) read a slot that has not been written yet, so no deterministic test exists for them.
Verification (Railway lab)
test-reportand t27b: refresh 55 of 55 (was 54), sarif_feed 19 of 19 (was 12), 0 vacuous passes. sarif 15 of 15 and sarif_pins 4 of 4 still pass.gen-cregeneratesgen/c/claw/refresh.candsarif_feed.c; the diff is only the new test functions and the test count. The other 5 committedgen/c/claw/*.cfiles are byte-identical.seal --saveforclaw_ClawRefreshandclaw_ClawSarifFeed, thenseal --verifyoverspecs/claw/*.t27plusspecs/verified/gen_file_check.t27: 32 of 32.Self-check
"\r\n"in a literal. In t27 that is a backslash and anr, not a carriage return, so the test contained no CR, and thenx -= 1mutant survived it. The test now writes the byte13and asserts that it is there; the mutant fails it.check_state.t27andmerge_lane.t27each have one test with the same mistake, filed as TRI CLAW: two claw tests write CR as "\r" in a literal, which is a backslash and r #10722.Closes #10721
🤖 Generated with Claude Code