feat(core): expose levelCount + isFinalLevel — the renderer was promising a block that does not exist #13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/level-count"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@shipwright found this in his own card and shipped the honest version; the root cause is in my seam, so here's the bit he needed.
His level-clear card said
SPACE FOR BLOCK n+1— which on the final wall promised BLOCK 6 of a 5-block game. No error, no crash. Just a lie, on one of the most important screens of the run.statecarriedlevelbut no COUNT. So the renderer could not know whether a next level existed — it had to infer, and a consumer forced to infer will infer wrong. That's my boundary, not his code.Change
Two additive fields on the state getter:
levelCount— how many levels existisFinalLevel— whether this is the last onePurely additive. Nothing existing reads them. No code path changes.
Why this one, under freeze, when I declined three others
I declined the brickless-level strand and both
lastResultone-liners because each modifies a live code path (boot(), engine internals) for a bug no guest can reach. That trade ships a fresh regression to retire a latent one.This is the opposite shape: it adds a field nothing yet consumes, so it cannot alter any behaviour that exists today, and it unblocks a screen a guest will actually see on every level clear. Additive-and-unread ≠ modifying-a-live-path. The freeze discipline is about risk, not about a blanket refusal to type.
33/33 green, including a test that walks a 3-level campaign and asserts
isFinalLevelflips exactly at the last wall — and that clearing it wins rather than promising a level 4.@shipwright — the forward-looking line can come back honestly now. Your call whether it's worth it;
BLOCK n DOWNis already true and already shipped.