Skip to content

cs: the 1:1 piece↔item gate lands before lever F (#212) - #229

Merged
gafferongames merged 2 commits into
mainfrom
cs-1to1-gate
Sep 1, 2026
Merged

cs: the 1:1 piece↔item gate lands before lever F (#212)#229
gafferongames merged 2 commits into
mainfrom
cs-1to1-gate

Conversation

@gafferongames

Copy link
Copy Markdown
Contributor

Closes #212 (the #208 review's first ask). internal/codegen/csharp gets its first test file: the C# twin of Go's TestFlatFallbackReEmitsItemsNotPieces, pinning the three output properties the 1:1 invariant protects — element-loop count on a fixed array, per-field serialize count through the live fallback path (flatWorthwhile refusing a run of one), and no inner-field-on-outer-base at the 384-bit run cap. Proven discriminating by sabotage (doubling the fallback's item emission → red), green as landed. Lever F cannot make classification 1:N without answering to it.

🤖 Generated with Claude Code

rowan-claude and others added 2 commits September 1, 2026 11:51
The flat codec re-derives #198-safety from every classifier returning
one piece per item or false; nothing asserted it and the package had no
tests. TestFlatFallbackReEmitsItemsNotPieces now pins the output
properties the invariant protects: a fixed array emits exactly one
element loop per direction, a single-scalar fallback (the one fallback
path that runs today) emits exactly one per-field serialize per
direction, and a nested struct at the run cap never names inner fields
on the outer base. Sabotage control: doubling the fallback's item
emission goes red (3 serializes detected); restored, green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gafferongames
gafferongames merged commit 228de2d into main Sep 1, 2026
8 checks passed
@gafferongames
gafferongames deleted the cs-1to1-gate branch September 1, 2026 01:59
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.

cs: gate the 1:1 piece↔item invariant before lever F

2 participants