Skip to content

test(claw): pin token_shape's line reader, 16 of 23 sweep survivors killed - #10677

Merged
gHashTag merged 1 commit into
masterfrom
claw-token-shape-mutants
Oct 18, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claw-token-shape-mutants

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

What

This adds 6 tests to specs/claw/token_shape.t27, covering the line reader that the token-shape law (#10501) stands on. The mutation sweep of #10673 left 23 surviving mutants on its code lines.

Test Mutants it kills
a_note_at_the_end_of_its_line_counts span_has i + nlen <= e to < (a block-form - if: ... == 'failure' step)
blank_and_two_space_lines_do_not_end_a_job e > s to >= in the top-level check (an empty line would end jobs:); is_job_header's empty-name return false
a_commented_out_job_header_is_not_a_job or to and, and return false to return true, on the #/- check
only_a_step_or_its_own_key_can_mint ind > 2 to >= (a list item at the job's own indent); and to or on the in-step key check (a uses: line inside run: |)
only_a_bare_name_and_a_colon_is_a_job_header the tail check (!= to ==, and to or, trailing spaces and CR allowed); i + 1 to i + 2; the name length > to >=; both return false; the name scan running one byte past the line end
a_clipped_span_writes_nothing_at_cap put_span x < cap to x <= cap

Verification (Railway lab)

  • t27c test-report specs/claw/token_shape.t27: 16 tests, 16 pass, 0 vacuous passes.
  • t27b test: 16 tests pass.
  • I re-ran the 23 survivors one at a time: 16 are now caught. The other 7 are equivalent:
    • 81, line_end i < n to <=: it reads text[n] and returns n either way.
    • 91, indent_of i < e to <=: text[e] is a newline or past the input, and it returns e - s either way.
    • 102, i >= e to >: at i == e the next byte is the newline, and the scan returns false either way.
    • 165, s < n to <=: at s == n, e > s is already false.
    • 180, s >= n to >: at s == n nothing matches, and the loop ends with the same w.
    • 217 (two mutants), the count loop: past m the scratch buffer holds no newline the report wrote. Reaching it needs a report over 4 KiB.
  • seal --save for token_shape, then seal --verify on all 31 claw specs: 31 match, 0 differ.

Lesson: the first re-run marked 7 survivors as BLOCKED because the classifier matched the word "error". The test names contain continue_on_error. The classifier now reads the FAIL line of the report.

Closes #10676

🤖 Generated with Claude Code

…illed

Six tests cover a note at the end of its line, blank and two-space lines
inside a job, a commented-out job header, list items at the job indent,
key-shaped lines inside run blocks, the job header shapes and the
put_span clip. The other 7 survivors are equivalent (listed in the PR).

Closes #10676

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag enabled auto-merge (squash) October 18, 2026 21:48
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 21:49:08 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 47
PRs with All Checks Green 3
READY 3
FAILING 47
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 bcb5f54 into master Oct 18, 2026
35 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

claw: token_shape.t27 -- 23 mutants survive in its line reader; pin blank lines, comments, header shapes

1 participant