Repository navigation
claw: gates.t27 rows_filled reads length columns, not s == "" (a C pointer compare) - #10697
Merged
Merged
Conversation
…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
enabled auto-merge (squash)
October 18, 2026 22:42
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
rows_filledinspecs/claw/gates.t27tested for an empty row withs == "". gen-c lowers that to a C pointer comparison (#8013), so in the committedgen/c/claw/gates.cthe check compared addresses, not contents. It was the only production function in gates.c that compared a string to a literal.EVENT_LENS : [67]usize, parallel to EVENTS.len; NAME_LENS already follows this patternrows_filled(name_lens, event_lens)checks== 0;every_row_filled()is unchangedevent_lens_pin_every_row_to_the_bytesin gates_pins.t27EVENTS[i].len, outside gen-creturn falsekillableVerification (Railway lab)
test-reportand t27b: gates 23/23, gates_pins 6/6, service 8/8, preview 19/19, verified/gen_file_check 12/12. 0 vacuous passes.rows_filled: both== 0flipped to!= 0, bothreturn falseset toreturn true, the bound changed from0..67to0..66, and the finalreturn trueset toreturn false. The two on EVENT_LENS: row 1 off by one, and row 66 set to 0.cc -Wall"comparison with string literal" warnings on gates.c: 18 before, 16 after. All 16 are intest_*functions, which the harness never calls..github/workflowslisting printsclaw: matrix is currentand exits 0.seal --savefor gates and gates_pins, thenseal --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_eventsandunknown_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