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

forked from trevato/cs

Take updates from trevato/cs #301

Merged opened this in answer to

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

Merged

The app boots, all three pages answer, and `bun run test` is green (1260 pass). Work is pushed.

shipped production is serving it deploy ae07c2d

opened this

The app boots, all three pages answer, and bun run test is green (1260 pass). Work is pushed.

---

git merge FETCH_HEAD brought trevato/cs's 64 commits against this repository's 107, and the resolution is one line for almost every file: this side won, because the parent's side of each conflict is an earlier draft of something the engine extraction has already moved. The result of the merge commit is byte-identical to the branch's previous tree, deliberately.

The 60 conflicted files (README.md, forge.json, package.json, tsconfig.json, bun.lock, scripts/{build,cost,train}.ts, all of src/client/, src/{compress,db,limit,result,server,tree,tty,who}.ts and their tests, src/pages/game.ts, src/rl/arena.ts) — ours. Every one is a file this repository rewrote as part of pulling the engine out: src/client/{input,physics,renderer,trace}.ts are gone from here because they are src/engine/{controls,physics,renderer,trace}.ts, and the parent's edits to them have nowhere to land; src/client/main.ts has shed the buy panel, the report and the menu into their own modules; src/who.ts here parses a name containing a | and takes its key as an argument instead of reading the environment inside the check, and the sign-in link and the missing-key warning it also carries live in src/pages/game.ts and src/server.ts. Taking any parent side would have undone the extraction.

The 61 files the parent added — dropped, not lost. Each is a concept already held here under this repository's name: client/radar.ts is client/minimap.ts, client/loop.ts and client/fullscreen.ts are engine/loop.ts and engine/fullscreen.ts, client/press.ts is engine/controls.ts, bundle.ts is bundles.ts, tabs.ts is terminal/screen.ts, player.ts is the Player in gate.ts, client/rounds.ts is client/{economy,bomb}.ts. Two of each would be the opposite of the direction.

AGENTS.md and src/engine/{learn,math,net}.ts — ours, and put back by hand. Git rename-detected the parent's client files onto them and auto-merged fallenMatrix, policyOver, rolloutOver and accumulate through the engine's door. That was similarity, not intent: src/engine/surface.json and the guide are a contract that the door holds nothing unused, so those numerics are filed as work (#295, #296) rather than smuggled in.

src/db.ts — the parent's thinking, applied where we had missed it. Its match upsert already refuses to lower a row (trevato/cs #151, taken in #286) because posts arrive while a match is played. The range's saveRun never got the thought: it wrote every column from whatever post arrived last, and runBoard ranks by score, so a re-post under an id already on the board rewrote a ranked score. A run is one finished clock with no later state, so the clause now refreshes the name and freezes the rest. Two tests: a re-post leaves score, hits, shots, seed and seconds as posted while a rename still shows, and the ownership rule — which had no test of its own — bounces another identity and another browser's guest.

What the parent has and this repository does not is written down rather than dropped: #290 radio, #291 resuming a match, #293 drawing between ticks with the remainder engine/loop.ts already keeps, #295 data-parallel PPO, #296 bodies where they fell — each blocked on this pull. I filed two more before reading the open issues and closed them as duplicates: the settings record is #73 (commented there with the crosshair and the bindings the parent settled), and bullet holes are #284.

To try it: the preview's /range board is the change with teeth — post a run, then post the same run id again with worse numbers, and the board keeps the run that was played.

Closes #287

🤖 Generated with Claude Code

Closes #287

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs