Skip to content

test(claw): kill the three text.t27 mutation survivors - #10714

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

gHashTag merged 1 commit into
masterfrom
claw-text-mutants

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

What

This closes three holes that a mutation sweep found in specs/claw/text.t27, the byte-text helpers that 21 TRI CLAW specs share. Only tests change; production code does not.

Survivor Mutant New test
line 108, has_prefix: if (s_len < p_len) < to <= has_prefix("claw-v", 6, "claw-v", 6) == true
line 111, has_prefix: byte-loop reject return false to return true has_prefix("xlaw-v0.1", 9, "claw-v", 6) == false, has_prefix("claw-x0.1", 9, "claw-v", 6) == false
line 67, put_count: if (w + k < cap) < to <= put_count(&out, 3, 0, 1050) returns 4, writes "105", and leaves out[3] at 0

Before this PR, every has_prefix reject in the tests used a string shorter than the prefix, so the byte loop never had to say no. No test gave put_count a cap shorter than the number.

Verification (Railway lab)

  • Mutation sweep of text.t27: 44 single-operator mutants over the non-test lines. 44 of 44 caught (was 41 of 44).

  • text, t27c test-report and t27b: 9 of 9 tests pass (was 7), 0 vacuous passes.

  • Dependents still pass in t27c and t27b:

    Spec Tests
    gates 24/24
    preview 19/19
    service 8/8
    evidence 16/16
    sarif 15/15
    suggest 22/22
  • gen-c regenerated all 7 committed gen/c/claw/*.c files byte-identically. Importers splice the helpers, not text's tests, so no C changes.

  • seal --save for claw_ClawText, then seal --verify over specs/claw/*.t27 plus specs/verified/gen_file_check.t27: 32 of 32 match. The first --save refused because zig was not on PATH. I re-ran it with zig on PATH, without --force.

Left

15 claw specs have still never been mutation-swept: check_latest, check_state, ledger_union, merge_lane, push_gate, queue_cost, refresh, required_red, sarif, sarif_feed, service, shape_race, social_visuals, suggest_feed, t27f_gate.

Closes #10713

🤖 Generated with Claude Code

A mutation sweep of specs/claw/text.t27 left 3 of 44 single-operator
mutants alive:
- put_count's clip `w + k < cap` changed to `<=`
- has_prefix's length guard `s_len < p_len` changed to `<=`
- has_prefix's byte-loop reject changed to return true

New tests:
- has_prefix_rejects_a_mismatch_that_fits: a first-byte mismatch, a
  last-byte mismatch, and a string exactly equal to the prefix.
- put_count_clipped_write_leaves_the_byte_at_cap_alone: cap 3 for a
  4-digit count; the byte at index cap stays untouched.

Sweep: 44/44 caught. text 9/9 in t27c and t27b. The committed gen-c
output regenerates byte-identically. The claw_ClawText seal is resaved,
and 32/32 seals verify.

Closes #10713

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 23:13:43 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 dd013b3 into master Oct 18, 2026
34 checks passed
gHashTag added a commit that referenced this pull request Oct 19, 2026
23 recorded dependency hashes no longer matched master, mostly text.t27
after #10714. Data only, written by seal --save on the Railway lab.

Refs #10727

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.

claw: three mutants survive in text.t27 (put_count clip, has_prefix equal length and byte reject)

1 participant