Public: anyone can read this; the crew can change it.
forked from trevato/cs
Take updates from trevato/cs #367
Check · Review · Land · Live done — Landed and live in production.
This merges trevato/cs `main` (3118dc1, staged at `refs/following/main`). The merge commit (`b14d420`) keeps this repository's tree for every conflicted file. The one upstream change this repo was missing, #218, is rebuilt on this schema in its own commit (`2nd commit`) so it can be reviewed alone.
shipped production is serving it deploy ae07c2d
Sign in to join this conversation.
new above
offline
This merges trevato/cs
main(3118dc1, staged atrefs/following/main). The merge commit (b14d420) keeps this repository's tree for every conflicted file. The one upstream change this repo was missing, #218, is rebuilt on this schema in its own commit (2nd commit) so it can be reviewed alone.The git merge base is still #179: #361 was squashed, so git doesn't know it already took #212, #214 and #217. So the eight "new" upstream commits split into ones already here and ones that still needed a decision.
Per file:
src/client/{hud,world,main,motion,weapons}.tsand their tests, plussrc/pages/game.tsandgame.test.ts.- #212 (kill mark), #214 (the gun's raise) and #217 (reduced motion) were rebuilt on the engine in #361. The upstream side of those conflicts is the pre-extraction version of the same work. - Upstream #202 (switching weapons is instant) is this repo's #269, whose deploy times are in
weapons.ts. - Upstream #188 (the plant names its place) is already met: this repo's plant line saysThe bomb has been planted at A.Upstream usesplaceAtfor this, and there is noplaceAthere; callouts wait on #323.src/client/{input,renderer,settings,earshot,plan}.tsand their tests, plussrc/readme.test.ts: they stay deleted.-
inputandrendererlive insrc/engine/(controls.ts,renderer.ts), where other games import them. The parent's edits to them are #198, #214 and #217, all covered above or below. -plan.tswas replaced bysrc/plan/. Upstream #222'sworthTheDetouris a pure function for the parent's bot planner, which this repo doesn't have, so here it would have no caller. It is left out, not ported as dead code. - Upstream'ssettings.tssaves Motion. #361 chose to read menu fields at match start and save none of them, and that choice stands.src/client/zoom.tsandzoom.test.ts(#198): dropped. Scoped sensitivity already lives in this repo'ssrc/client/look.ts(#231), so this would be a second copy of the same rule.README.md: this side, plus one paragraph for the standings change.src/db.tsandsrc/db.test.ts: this side, with upstream #218 rebuilt on this repo's schema.- Upstream keys the board by
identity. Here it is keyed by(user_id, name), because this repository groups guests by name. -saveMatchanddeleteMatchrecompute only the row of the player they touched, inside a transaction. A post that renames a match recomputes both the old row and the new one. - An older database builds thestandingtable once when it opens. - Two things I found while porting: - The recompute needs a newmatch_by_player (user_id, name)index. Without it every save scans the whole match table, and 20,000 saves took 16 s. - The old GROUP BY broke ties by player without saying so, andsrc/server.test.tsdepended on that order. The tie-break is now explicit in both the query and the index. No existing test was changed. - At 20,000 matches,standingsdrops from 13.9 ms to 0.2 ms. - Four new tests cover: - building the table from an older database - a later post, a rename and a delete, each moving the right row - a refused post leaving the board untouched - a read-time bound, measured as the median of seven readsbun run testpassed twice in a row, 1474 of 1474. During debugging, one full run hadsrc/range/boot.test.tsfail once; that code isn't touched here, and it passed in both final runs. The booted app answers/in 22 ms. To try it in the preview, finish a match and check that the All time table on/shows it, the same as before.Closes #362
🤖 Generated with Claude Code
Closes #362