Public: anyone can read this; the crew can change it.
forked from trevato/cs
Every number the pages boast is read from the thing it describes, on all three pages and not just /example #306
Check · Review · Land · Live done — Landed and live in production.
Every number in the prose of `/`, `/range` and `/example` is now rendered from the module that owns it, under one rule that all three pages share.
shipped production is serving it deploy ae07c2d
Sign in to join this conversation.
new above
offline
Every number in the prose of
/,/rangeand/exampleis now rendered from the module that owns it, under one rule that all three pages share.The rule is
src/pages/digits.test-helper.ts: it strips a rendered page down to the words a visitor reads — no head, no style block, no script, no header or footer, no attributes, and no<section>a database fills — and reports every group of digits that the numbers a test gathered from the sources do not account for, naming the page, the digit and the sentence it was typed into./example's test was extended onto it rather than copied, and now covers that whole page instead of the cost section alone. A digit glued to a letter is part of a word (WebGL2,int8,gen_19948bw), not a measurement.What the pages read now.
/takes the step height fromCS_MOVE, the HE's 98/350/1.5 and the flash's 1.6 and the smoke's 180 fromWEAPONS, and the Length control's 5 and 13 fromSHORT/COMPETITIVE; the card, the match of the day and the weapons summary were already readouts and are held by the same rule now./rangetakes the lane's speed, gravity, friction, jump apex, crouch drop and standing eye fromsrc/range/movement.ts, both games' fixed steps from each game's own pinned script, the drills' scores and speeds fromtargets.ts, the atlas's 64 frompaint.ts, and the two distances the loudness sentence compares from the plates' own depth range. Nothing stores a jump apex, sosrc/pages/tuning.tsderives it (v₀²/2g) once for the page and the test, andtuning.test.tsjumps a body through the engine's solver to check the shortcut is still the truth;src/pages/figure.tsis how a page writes a number, so page and test format the same value the same way.Two things moved, deliberately. The smoke's "fifteen seconds" is now
15because it was a claim about a stored number, and the loudness sentence compares the farthest plate with the nearest (320) rather than a typed 200 — the ratio is still a quarter. Everything else that is words stays words: "about eight kilobytes", "thirty seconds on the clock", "three plates at a time", "eighty milliseconds" and "a quarter of the air acceleration" are prose, and the rule is about digits, not about claims. The README says where that line was drawn.To try it:
/and/rangein the preview read exactly as they did — same sentences, same server-rendered first paint,/is 4 bytes smaller. The proof it bites: setHE.blast.damageto 120 insrc/client/weapons.tsand put98back in the paragraph, andbun testfails with `/: 98 is in no module — "…on the same solver the players walk on — 98 damage at the centre falling off over 350 units…".bun run test` is green here: 1265 tests, 115 files. No new dependency.🤖 Generated with Claude Code
Closes #224