Skip to content

test(claw): kill the real refresh.t27 and sarif_feed.t27 mutation survivors - #10723

Merged
gHashTag merged 1 commit into
masterfrom
claw-refresh-feed-mutants
Oct 18, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claw-refresh-feed-mutants

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

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.t27 decides which open PRs get a base-branch refresh.
  • specs/claw/sarif_feed.t27 turns t27c's per-file records into the SARIF document the claw-sarif job uploads.
Spec Mutants Caught before Real survivors Caught after Left (cannot change any output)
refresh.t27 159 147 2 149 10
sarif_feed.t27 34 20 7 27 7

New tests:

Test Kills
a_zero_inside_a_position_is_a_digit 0 treated as a non-digit, so at line 10:20 lands at 1:1
a_column_needs_a_line_number_and_a_colon_right_after_it a column read from :5 with no line, or from 3-5 with no colon
a_blank_line_between_records_is_skipped_not_refused a blank line refused, which marks the run partial
a_two_field_record_is_refused_even_with_a_known_status path<TAB>UNWRITTEN accepted as a finding
crlf_records_are_all_read the CRLF skip loop walking backwards forever
a_finding_list_of_exactly_tsv_cap_bytes_is_kept a list of exactly TSV_CAP bytes thrown away
a_finding_list_one_byte_over_tsv_cap_is_refused_whole the overflow edge itself, which had no test
a_record_cut_after_its_number_does_not_borrow_the_previous_fields (refresh) rf_split saying true for a one-field record (return false → true, and >= → >). rf_classify then reads the previous record's stale offsets, and #8 gets an R line with someone else's sha

The two TSV_CAP tests assert feed_tsv(...) == TSV_CAP and == TSV_CAP + 1 before 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)

  • t27c test-report and 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.
  • Re-sweep of the 26 survivors: all 9 real ones are caught; the 17 left are the listed ones. Adding tests cannot un-catch a mutant that was already caught.
  • gen-c regenerates gen/c/claw/refresh.c and sarif_feed.c; the diff is only the new test functions and the test count. The other 5 committed gen/c/claw/*.c files are byte-identical.
  • seal --save for claw_ClawRefresh and claw_ClawSarifFeed, then seal --verify over specs/claw/*.t27 plus specs/verified/gen_file_check.t27: 32 of 32.

Self-check

  • My first run of t27c counted 0 passes. The cause: zig was not on PATH, and t27c reports that as BLOCKED, not as a failure. I re-ran with zig on PATH before counting.
  • My first CRLF test wrote "\r\n" in a literal. In t27 that is a backslash and an r, not a carriage return, so the test contained no CR, and the nx -= 1 mutant survived it. The test now writes the byte 13 and asserts that it is there; the mutant fails it. check_state.t27 and merge_lane.t27 each 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.
  • I filed the issue only after the re-sweep, so that the counts come from the re-sweep and not from my plan.

Closes #10721

🤖 Generated with Claude Code

…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
gHashTag enabled auto-merge (squash) October 18, 2026 23:55
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 23:56:32 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 45
PRs with All Checks Green 5
READY 4
FAILING 45
PENDING 0
NO CHECKS YET 0

These columns do not partition: 4 + 45 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=fad12492937a != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit 0ee35c9 into master Oct 18, 2026
33 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TRI CLAW: mutation sweep of refresh.t27 and sarif_feed.t27 -- 9 real survivors

1 participant