pbz: Chunk 30 review pass — the honesty rule, applied to itself
Three reviews of the first cut (adversarial, device fact-check against the spare, docs consistency). The first two found the chunk failing its own invariant, in two places, both off-by-one on WHICH ack was claimed. setControls and pause:false each ack independently (live: 22ms, 44ms), and the queue returns the oldest match, so the "resume" ack was really setControls'. Advancing there asserted the wall was rendering on evidence that said nothing about the pause, and made item 8's own zero-frame error answer "Is the pattern rendering?" with a confident yes over a frozen wall. Preview frames turn out to be the better evidence: they prove the renderer is running, which also makes a combined paused-and-saved state impossible, since every save-side state is downstream of them. Same species at putSourceCode: the device acks every binary frame and only the last carries saveProgramSourceFile (live: plain at 41/67/94ms, marked at 126ms), so "saved" was claimed on chunk 1 of N. CHUNK_BYTES is now exported so the ack count is derived, not duplicated. Hardware overturned two messages. An unactivated save does NOT leave the device reverting to the previously active pattern; the boot pointer follows the most recently saved one, reproduced three times. And the maybe-saved advice said to delete the entry before retrying, which on every re-save deletes the previous good copy, since stableId means a re-save updates in place. Also: the transport stopped sharing one Error instance, so a save's annotation can no longer leak onto a concurrent read's error; the recovery command is shell-quoted rather than JSON-quoted, since a name with a backtick would otherwise execute when pasted; sends that throw before a byte moves no longer claim anything; and non-Error throws pass through instead of being replaced by a TypeError. The test fake was rewritten to ack per COMMAND rather than per wait — the old one could not express the failure that broke this, which is why its tests passed. 21 new tests, 213 total, typecheck green. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PZnUXRsLLnt2A7pR3X4Luj
T
Tarek Rached committed
ea08ac37defccb64053d27b4c0ea96810a23f0fe
Parent: 8aa6a8f