You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TRI CLAW: two claw tests write CR as "\r" in a literal, which is a backslash and r #10722
In a t27 string literal, "\r" is two bytes: a backslash and an r, not a carriage return. specs/claw/control.t27 already says so twice (lines 245 and 455), and its tests write CR as the byte 13.
Two claw tests still put "\r\n" in a literal and believe they test a carriage return:
specs/claw/check_state.t27:261: t_class("COMPLETED\tSUCCESS\r\n", 19) == K_BAD. The literal is 20 bytes; 19 of them are copied, so the row ends in SUCCESS\r (a backslash and an r) and has no newline.
specs/claw/merge_lane.t27:633: ms_counts("Auto Merge Ready PRs\tworkflow_run\r\n", 35, &st). The literal is 36 bytes; 35 of them are copied, so the row ends in workflow_run\r (a backslash and an r).
Both assertions pass, but for a backslash. Neither test has ever shown its law a real CR.
I found this while writing a CRLF test for sarif_feed.t27 in the mutation sweep. My test made the same mistake: it passed with the CRLF skip loop broken into nx -= 1, and a test that writes byte 13 kills that mutant.
User Scenarios
gh output piped through a Windows-style line ending. The row ends in SUCCESS<CR>. These two tests say nothing about what the law does with it.
Requirements
Rewrite both rows with the CR written as 13, for example with put_byte into a buffer, or with a helper that appends 13, '\n'.
Then check that each law still answers what the test name claims:
check_state: a CR-terminated row is K_BAD, or it is read as SUCCESS. Decide which is intended, and if the law disagrees, say so in the PR rather than bending the test.
merge_lane: workflow_run<CR> is not the merger.
Sweep the other claw specs for literals containing \r. Right now the only ones are these two plus sarif_feed, which is fixed in the tick 26 PR.
Success Criteria
No claw test writes CR as \r inside a literal.
Each rewritten test fails against a mutant that drops its law's CR handling. If no such handling exists, the PR says so.
t27c and t27b pass, 0 vacuous, seals 32 of 32.
Boundary
Tests in specs/claw only. The compiler's escape set is out of scope; whether t27 should accept \r is a separate language question.
Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.
missing: ## Requirements -- numbered obligations, FR-001: ... MUST ...
missing: ## Success Criteria -- an outcome a machine can settle: a number with a unit, a backticked file, exit 0, or a backticked command
Activity
github-actions commentedon Oct 18, 2026
Closed by the issue-shape gate (specs/policy/issue_shape.t27, #7498): an issue must have the template's sections. Edit the body; an edit that passes reopens it.
FR-001: ... MUST ...exit 0, or a backticked commandtest(claw): kill the real check_state.t27 and merge_lane.t27 mutation…