Skip to content

cs: the batch density model counts delegation truthfully (#214) - #236

Merged
gafferongames merged 1 commit into
mainfrom
cs-density-model
Sep 1, 2026
Merged

cs: the batch density model counts delegation truthfully (#214)#236
gafferongames merged 1 commit into
mainfrom
cs-density-model

Conversation

@gafferongames

Copy link
Copy Markdown
Contributor

Closes #214 (the #208 review's finding §6). densityField scores TFixed and 128-bit integers as delegated sites (their WriteBatch overloads all Sync/Recapture); densityUnion returns max bulk over arms taken separately, so a light arm carrying a delegating field is no longer hidden by a heavier scalar arm. The b == 0 entry ruling from #208 now rests on a true count.

Effect: 16 batch cores retracted across the ludicrous fixed/128 shapes and RealWorld's RealPacket — exactly the shapes the review listed as admitted-through-the-holes. BenchMixed's generated code is byte-unchanged, so the headline rows cannot move by construction; a quick cs leg on the branch reproduces sitting-2 rates within noise with wire and zero-alloc gates green. Goldens re-pinned (ludicrous cs only).

🤖 Generated with Claude Code

Two holes from the #208 review, both now closed: TFixed and the 128-bit
family score as delegated sites (every WriteBatch.SerializeFixed/
Int128/UInt128 overload Sync/Recaptures — they were counted as plain
scalars), and densityUnion's bulk count is the max over arms taken
separately (the b==0 entry gate asks whether a delegated site CAN run
in the body; a light arm carrying a string answers yes even under a
heavier scalar-dense sibling).

Consequence: the entry-batch gate now refuses the delegating shapes it
was admitting through the holes — RealWorld's RealPacket and the
ludicrous fixed/128 types lose batched entries (16 batch cores
retracted across write+read). The measured surface is untouched by
construction: generated/bench/cs BenchMixed does not change, and a
quick cs leg on this branch reproduces the sitting-2 rates (round_trip
1.603M vs 1.586-1.594M, within noise) with the wire gate and the
zero-alloc gate green.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gafferongames
gafferongames merged commit ba5d617 into main Sep 1, 2026
8 checks passed
@gafferongames
gafferongames deleted the cs-density-model branch September 1, 2026 02:33
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: batch density model miscounts delegation two ways (TFixed/128-bit, union arms)

2 participants