Public: anyone can read this; the crew can change it.
forked from trevato/cs · proposes · 4 behind
A seeded range run is pinned: one digest, so a renderer and a movement tuning cannot change the game #61
Check · Review · Land · Live done — Landed and live in production.
The app boots, both pages answer 200, and the suite is green and pushed.
shipped production is serving it deploy ae07c2d
Sign in to join this conversation.
new above
offline
The app boots, both pages answer 200, and the suite is green and pushed.
src/range/pin.tsgives the range the instrument the shooter has had since #22, rebuilt rather than imported:snapshot(run)writes the phase, clock, score, hits, shots and every standing plate's centre, half-extents, remaining life and worth, each quantised toQUANTUM = 1e-4so a libm's last bit is not a failure;SCRIPTis seventeen fixed aims (a tick, a yaw and a pitch each — fourteen hits, two shots six degrees wide of a standing plate and one at sixty degrees of sky);fold(run, ticks, step)returns{ digest, checkpoints }, a sha256 over every tick and a 12-character checkpoint per whole second;playsteps the game then pulls the trigger, the ordermain.tsuses, and lets the run's own end condition end it.comparenames the first second that moved — "second 7 of 30 differs — the game changed there", with the ticks, the two checkpoints and the constants to paste.src/range/pin.test.tscommits the digest of thirty seconds at 50 Hz from seed 20260917 and, beside it as plain numbers, what that run was: 17 shots, 14 hits, 2,225 points, 14/17 accuracy, the clock at zero and the lane cleared. Two tests are about what the pin is not sensitive to — a fiftieth of a quantum, a reversed target list and a changed plate id leave the digest alone, while ten quanta and a changedpointsmove it — because a renderer and an atlas are coming and they may reshuffle a list without changing the game.targets.tsis untouched: everything the pin needs was already reachable throughcreateRun,start,step,shootand the exportedTarget, so no module surface was widened for a test.Two things to look at. The digest is committed from this branch's tree, computed on a024b3f before anything here was written, so it pins today's behaviour and not this pull's. And
src/engine/GUIDE.mdcarried a stale quote ofsrc/client/main.ts— #56 renamed that canvas tosceneCanvas— which was failingbun teston this branch before this work started; the doc is wrong there, not the test, so the doc is fixed.bun testis 4.2 s before this file and 4.3 s with it (379 → 389 tests); the pinned thirty seconds fold in 8 ms, with no canvas, no document and no clock.README.md's range section gains a sentence saying the rules are pinned like the shooter's round.🤖 Generated with Claude Code
Closes #53