Skip to content

claw: gates.t27 rows_filled reads length columns, not s == "" (a C pointer compare) - #10697

Merged
gHashTag merged 1 commit into
masterfrom
claw-gates-empty-by-length
Oct 18, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claw-gates-empty-by-length

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

What

rows_filled in specs/claw/gates.t27 tested for an empty row with s == "". gen-c lowers that to a C pointer comparison (#8013), so in the committed gen/c/claw/gates.c the check compared addresses, not contents. It was the only production function in gates.c that compared a string to a literal.

Change Why
New EVENT_LENS : [67]usize, parallel to EVENTS gen-c carries no .len; NAME_LENS already follows this pattern
rows_filled(name_lens, event_lens) checks == 0; every_row_filled() is unchanged a length check lowers to an integer compare
event_lens_pin_every_row_to_the_bytes in gates_pins.t27 pins each row to EVENTS[i].len, outside gen-c
The hole test now zeroes a length, and also shows that a length of 1 counts as filled keeps each return false killable

Verification (Railway lab)

  • t27c test-report and t27b: gates 23/23, gates_pins 6/6, service 8/8, preview 19/19, verified/gen_file_check 12/12. 0 vacuous passes.
  • 8 mutants, 8 caught. The six on rows_filled: both == 0 flipped to != 0, both return false set to return true, the bound changed from 0..67 to 0..66, and the final return true set to return false. The two on EVENT_LENS: row 1 off by one, and row 66 set to 0.
  • gen-c of the master spec matches the committed gates.c byte for byte, so the regenerated file in this PR comes from that same compiler.
  • cc -Wall "comparison with string literal" warnings on gates.c: 18 before, 16 after. All 16 are in test_* functions, which the harness never calls.
  • The gate-topology printf harness on the real .github/workflows listing prints claw: matrix is current and exits 0.
  • seal --save for gates and gates_pins, then seal --verify: 32 of 32 match.

Not in this PR

There are 16 test-only literal comparisons in gates.c, in audit_prefixes_name_the_problem_kind, soft_gates_report_their_events and unknown_name_is_unknown_and_not_blocking. It is the same defect, but those functions never run in C. A follow-up issue covers them.

Closes #10696

🤖 Generated with Claude Code

…inter compare)

gen-c lowers `s == ""` to a pointer comparison (#8013), so in the committed
gen/c/claw/gates.c the empty-row check compared addresses, not contents. It
was the only production function in gates.c that compared a string to a
literal.

rows_filled now takes NAME_LENS and a new EVENT_LENS column and checks for
zero; every_row_filled keeps its signature. EVENT_LENS is pinned row by row
to EVENTS[i].len in gates_pins.t27, which gen-c never lowers.
gen/c/claw/gates.c is regenerated by t27c gen-c.

Closes #10696

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

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 22:42:19 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 9eef99d into master Oct 18, 2026
34 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.

claw: gates.t27 rows_filled compares strings to "", which gen-c lowers to a C pointer comparison

1 participant