Public: anyone can read this; the crew can change it.

forked from trevato/cs

A match on a generated map is pinned too: the determinism net covers the whole pipeline, not just de_forge #243

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The determinism net now covers a match on a map carved from a seed, not just `de_forge`. Two seeds join `src/client/replay.test.ts`, picked off the ends of 120 measured maps and written down with the reason: `gen_o` (seed 24 — 40.9% of its grid is floor, only 7% of that pinched: halls and long sightlines) and `gen_11` (seed 37 — 23.8% floor, 22% pinched, a two-cell spine with crates in it, the tig…

shipped production is serving it deploy ae07c2d

opened this

The determinism net now covers a match on a map carved from a seed, not just de_forge. Two seeds join src/client/replay.test.ts, picked off the ends of 120 measured maps and written down with the reason: gen_o (seed 24 — 40.9% of its grid is floor, only 7% of that pinched: halls and long sightlines) and gen_11 (seed 37 — 23.8% floor, 22% pinched, a two-cell spine with crates in it, the tightest of the 120). Each is pinned twice. The map's letters fold to a digest through the new src/client/layout.ts, and twenty seconds of the same ten-bot match folds through the engine's digest door on the same script the existing pins use. The map is asked first and the play's digest is only ever read on a map that still matches, so a failure says "The map moved, not the play" or "The play moved, not the map" — and a test drives both messages with doctored pins so that stays true.

src/client/layout.ts is the fold generate.test.ts had written out inline; that file now calls it and its gen_14u5j6g digest is unchanged to the bit, which is the proof the helper is the same instrument. The de_forge round and the arena duel are untouched. One behaviour change beyond the pins: replay.test.ts hands the bots the shipped policy itself, so bun test src/client/replay.test.ts — the command the file tells you to run to recompute a digest — works on its own instead of needing another test file to have loaded the weights first.

Cost, measured: 0.17 s and 0.15 s for the two matches, 10 ms to carve each map and 1 ms to fold its cells; the file goes from 0.7 s to 1.1 s of a 22 s suite.

One thing outside the issue, in its own commit: main carries three static/app.<hash>.js, one from each of the last three merges and none of them current, and bun test fails on that alone (eleven tests). bun run scripts/build.ts writes app.ea37d3064a.js and deletes the rest — without it this pull's check would have come back red for a reason that is not this pull's. No bundled source changed on this branch; layout.ts is test-only.

To look at: the doc block above GENERATED_SECONDS in src/client/replay.test.ts, which is where the seeds, the order the two digests are asked in and how to recompute either are written down.

🤖 Generated with Claude Code

Closes #159

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs