Skip to content

test(claw): kill the real suggest_feed.t27 mutation survivors - #10738

Merged
gHashTag merged 1 commit into
masterfrom
claw-mut-suggest-feed
Oct 19, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claw-mut-suggest-feed

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

What

This PR adds tests to specs/claw/suggest_feed.t27, the driver that turns a pull request's files and diff headers into one TRI CLAW review document. A mutation sweep (#10737) showed what its tests let through. Only tests change; production code does not.

Mutants Caught (incl. 1 timeout) Left
Before 169 115 54
After (full re-sweep; 171 with the 2 helper mutants) 171 156 15: 14 equivalent + 1 open

The one left open is aw > ARENA_CAP -> >=. Killing it needs replacement text of exactly 256 KiB; #10737 records this.

New tests:

Test Kills
a_length_field_is_one_to_nine_decimal_digits sf_num: an empty field read as 0, 9 digits refused, 9 refused, any byte taken as a digit
a_path_is_five_to_two_hundred_bytes_and_ends_in_t27 sf_path_ok: an empty path accepted, both length limits off by one, xxt27 accepted, z refused
a_suggested_line_is_printable_ascii_or_tab sf_line_ok: ~ refused; control bytes and DEL accepted
a_control_byte_is_escaped_with_lowercase_hex all six sf_hexd survivors; the \u00XX path had never run
two_lines_are_the_same_only_when_every_byte_is sf_same_line: one byte too many compared; different lines of the same length called equal
the_line_count_counts_a_last_line_without_a_newline sf_lines: a byte past the end counted; the last unterminated line dropped or subtracted
a_missing_final_newline_alone_gets_no_suggestion pins the honest limit the header comment states
one_trailing_blank_line_is_a_one_line_empty_suggestion total >= line -> > (the old test had two blank lines)
two_files_post_two_comments_split_by_one_comma the comma before the first comment; a byte skipped after a diff header
an_empty_diff_header_withholds_its_file_and_not_the_review H<TAB> dropping the whole review
an_unknown_record_shaped_like_a_file_posts_nothing any TAB-at-byte-1 record read as a file
a_stream_may_end_with_the_last_byte_of_a_file a stream ending exactly at a file's end refused
a_diff_header_of_127_bytes_is_read_and_128_is_not the header-length cap
the_range_cap_keeps_2048_and_flags_the_next MAX_RANGES off by one
the_hunk_cap_keeps_512_and_flags_the_next_wherever_it_closes MAX_HUNKS off by one in all three places a hunk is added
the_file_cap_reads_64_files_and_refuses_the_next MAX_FILES off by one
the_largest_file_held_is_file_cap_bytes FILE_CAP off by one, and a copy loop reading one byte past the file

Three test helpers (t_fix_stream, t_file_head, t_rep) follow the t_ convention already used in refresh.t27 and sarif_feed.t27. Like the tests, they appear in the generated C.

Verification (Railway lab)

Self-check

  • My first classification put mutant 297 (i < clen -> <=) under equivalent. The full re-sweep showed the new FILE_CAP test catches it, since at exactly 131072 bytes the copy reads out of bounds. Corrected in test(claw): suggest_feed.t27 mutation sweep, 39 real survivors of 169 #10737 before this PR.
  • My first .t28 path did not kill the or -> and mutant on the suffix check, because the mutant only changes the first or. Added specs/xxt27, then re-ran that line.

Closes #10737.

🤖 Generated with Claude Code

17 tests (36 of 36, was 19) kill 39 real survivors of a 169-mutant
sweep; 156 of 171 caught after, the rest equivalent or recorded in
the issue. Generated C and seal refreshed by t27c on the Railway lab.

Closes #10737

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-19 00:37:53 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 2520ee1 into master Oct 19, 2026
32 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.

test(claw): suggest_feed.t27 mutation sweep, 39 real survivors of 169

1 participant