Skip to content

test(claw): kill the real check_state.t27 and merge_lane.t27 mutation survivors - #10726

Merged
gHashTag merged 1 commit into
masterfrom
claw-cr-tests
Oct 19, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claw-cr-tests

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 19, 2026 •

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/check_state.t27 reads a PR's check rollup into pass, failing, pending and unreadable, and gives a verdict.
  • specs/claw/merge_lane.t27 measures the auto-merger: its lane, its yield and its share of the queue.
Spec Mutants Caught before Real survivors Caught after Left (equivalent)
check_state.t27 40 33 3 36 4 (one is a test helper)
merge_lane.t27 92 74 12 86 6

New tests:

Test Kills
every_wait_status_with_no_conclusion_is_pending PENDING and REQUESTED not counted as waiting (or -> and)
the_row_cap_reads_1024_rows_and_refuses_the_next the check-row cap off by one; it had no test
the_dashboard_reads_each_row_from_its_first_byte a row read from its second byte, so CONTEXT becomes ONTEXT and counts as failing
a_blank_line_is_not_a_row_in_any_reader a blank line counted as an unreadable row, in all three merger readers
an_open_run_of_age_zero_is_read an open run of age 0 refused
the_merger_rows_cap_at_4096_and_refuse_the_next and the yield and share twins the three 4096-row caps, each off by one; none had a test
an_empty_run_is_label_only_only_when_a_label_was_missing an empty run with no missing label counted as label-only
an_event_name_is_lower_case_letters_from_a_to_z an empty event name accepted; a or z refused. No existing test event contained an a

Closes #10722, too. The carriage-return tests in both specs wrote "\r", which in a t27 literal is a backslash and an r, so neither test contained a carriage return. The tests now write the byte 13, then assert that the byte is there before they read the row:

  • check_state: a_carriage_return_after_the_conclusion_is_unreadable and a_line_that_is_only_a_carriage_return_is_an_unreadable_row
  • merge_lane: the first rows of a_carriage_return_or_a_near_name_is_not_the_merger

The survivors that stay are listed with a reason each in #10724. Each one either reads at ls == n, where qc_line_end returns n, or flips a comparison that cannot change the output.

Verification (Railway lab)

  • t27c test-report and t27b: check_state 17 of 17 (was 12), merge_lane 30 of 30 (was 23), 0 vacuous passes.
  • Survivor re-sweep: all 15 real survivors are now caught.
  • Full re-sweep of both specs: 36 of 40 and 86 of 92. I ran this because I removed two assertions (the backslash rows), and a removed assertion can un-catch a mutant. None was lost.
  • gen-c: the 7 committed gen/c/claw/*.c files are byte-identical. Neither spec has committed C.
  • seal --save for claw_ClawCheckState and claw_ClawMergeLane, then seal --verify over specs/claw/*.t27 plus specs/verified/gen_file_check.t27: 32 of 32.

Self-check

🤖 Generated with Claude Code

… survivors

A mutation sweep left 7 of 40 check_state.t27 mutants alive, 3 of
them real. It left 18 of 92 merge_lane.t27 mutants alive, 12 of them
real. Ten new tests kill all 15. They cover:
- every wait status
- the 1024-row and 4096-row caps (none had a test)
- a blank line, which was counted as an unreadable row
- an open run of age 0
- label-only with no missing label
- an empty event name
- the letters a and z in an event name
- the dashboard reading each row from its first byte

The carriage-return tests in both specs wrote "\r", which in a t27
literal is a backslash and an r. They now write the byte 13 and
assert that it is there (#10722).

Production code is unchanged. A full re-sweep leaves 36/40 and 86/92,
and every mutant left is an equivalent one. check_state 17/17 and
merge_lane 30/30 pass in t27c and t27b, with 0 vacuous passes. The 7
committed gen/c/claw files are byte-identical. Both seals are
resaved; 32/32 seals verify.

Closes #10724
Closes #10722

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-19 00:12:22 UTC

Summary

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

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 a14dec4 into master Oct 19, 2026
32 of 37 checks passed
gHashTag added a commit that referenced this pull request Oct 19, 2026
#10741)

Three tests: run ids of 0 and 20 digits, the 1024-row cap in both
readers, and a blank line before a re-run at the cap. 41 -> 46 of 51
mutants; the 5 left are equivalent. Reseals CheckLatest and
RequiredRed, which still cited check_state.t27 from before #10726.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 19, 2026
#10726 wrote t_rows (check_state) and t_rep (merge_lane) with the same
body, and master has been red on duplicate-bodies since. merge_lane now
uses check_state's t_rows. Reseals CheckState, MergeLane, CheckLatest
and RequiredRed.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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: two claw tests write CR as "\r" in a literal, which is a backslash and r

1 participant