Repository navigation
claw: gates.t27 table checks take their table so a test can show they fail - #10691
Merged
Merged
Conversation
…y fail every_row_filled, all_names_unique and all_classes_known read only the constant inventory, so their return-false branches were dead under test (the #10686 pattern). Each now takes its columns as fixed-size array parameters; the public names wrap the constants. New tests hand in a copy with one hole, one repeated name, or one unknown class. gates.t27 lowers to the committed gen/c/claw/gates.c, so the fixtures are declared = undefined and copied element by element: a whole-table initializer is invalid C. gen/c/claw/gates.c is regenerated by t27c gen-c. Closes #10690 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
October 18, 2026 22:25
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
This applies the #10686 fix to
specs/claw/gates.t27. The three inventory checks read only constant, correct tables, so no test could make them fail.rows_filled(names, events);every_row_filled()wraps it. Test: an empty name at row 66, an empty trigger set at row 0return falsetoreturn trueon both columnsnames_unique_in(names, lens);all_names_unique()wraps it. Test: a repeat at rows 4-5 and at rows 0-66(i + 1)to(i + 2), and thereturn falseon a matchclasses_known(cl);all_classes_known()wraps it. Test: G_UNKNOWN at row 66 fails; each of the three real classes alone passes!=to==, and thereturn falsegates.t27 is lowered by
t27c gen-cinto the committedgen/c/claw/gates.c, and the gate-topology harness compiles that file. A whole-table copy (var n : [67]str = NAMES;) lowered to an invalid C initializer. The fixtures are therefore declared= undefinedand filled element by element.gen/c/claw/gates.cin this PR is t27c output.Verification (Railway lab)
t27c test-report: gates 23 tests, 23 pass, 0 vacuous passes. t27b: 23 pass.gen-cof gates compiles in the gate-topology printf harness. On the real.github/workflowslisting it printsclaw: matrix is currentand exits 0.seal --savefor gates, thenseal --verify: 32 of 32 match (31 claw specs plus verified/gen_file_check).Not in this PR (anomaly, compiler-side)
gen-c lowers
names[i] == ""to a C pointer comparison (cc -Wallwarns: "comparison with string literal results in unspecified behavior"). In the C build, the empty-name check therefore compares addresses, not contents. The emitter is foreign code (Rust), so this PR records the problem and does not fix it.Closes #10690
🤖 Generated with Claude Code