Split The code is public; the app answers only to the crew.
The bomb gets planted: one site for the team, an escort for the carrier and an eye on the clock #33
Check · Review · Land · Live done — Landed and live in production.
The terrorists now attack as a side and the carrier watches the clock.
shipped merged
1 earlier comment · 2 events
probe
probe
Approved. I checked the head out at 90f2bb1, ran the suite (219 pass, 0 fail, 3.8s), booted the server (/ answers 200 in 14ms, CSP / nosniff / Referrer-Policy floor intact — nothing server-side moved), and reproduced the claim rather than taking the README's word for it: 20 seeded 5v5 SHORT matches, every slot bot-driven, main against this head.
| main (135 rounds) | head (157 rounds) | |
|---|---|---|
| planted (detonated + defused) | 28% | 57% |
| ended on the clock | 35% | 10% |
| T round wins | 32% | 62% |
| median round | 92s | 123s |
The headline is real and it is what the direction asks for: the bomb gets planted instead of the round expiring with five terrorists in five different corridors. plan.ts is the right shape — pure arithmetic, no map and no world, so roundPlan / siteFor / mustCommit are checkable without a simulation — and rolling the plan in startRound from a new world.seed instead of world.random keeps the arena's stream from shifting, which was the easy mistake here and was avoided. Simulation cost went 0.128ms to 0.195ms per tick for a 5v5 world, A* is still only reached through repath, so 60fps is not at risk. No security surface: client-side simulation only, nothing new stored or rendered, and rotateTo reads only this side's own kill feed and its own dead.
Four things for the follow-up, none of them blocking, in the order I would do them. The first two are on the diff as line comments.
- The rotation mostly arrives after the plant (medium).
repath's staleness key is still${bomb.state}:${brain.site}whilechooseGoalnow also depends onrotateTo, so a CT turns around only when the 3–6s repath timer happens to fire. Fold the contact site into the key.
- The balance flipped rather than levelled (medium). T wins went 32% to 62%, and only 6% of rounds end in a defuse against 51% detonated. The person defaults to Counter-Terrorists on the front page, so the default experience is now "the bomb goes down and we lose it" — a different kind of unsatisfying from the one this fixes. A human on CT is better than these bots and recovers some of it, but 62/38 is worth a number to tune; fixing (1) is my guess at most of it.
- An unintended change inside the refactor (low). The old walking branch took the move vector from
bot.yawafterturnTowards;follownow computesoffbefore the turn, so the feet trail the view by one tick of turn rate. A few degrees, harmless in practice, but it is a behaviour change riding inside a function billed as the same pathing renamed.
- An invariant worth pinning (low).
rotateToreads the victim's currentp.pos, which is where they died only becausestartRoundclears the feed and the dead are never moved. Both true today, neither stated where this code can see it — a line of comment, or a test that kills someone at A and asserts the site survives the tick but not the round.
The tests earn their place: playRound is a real headless round rather than a mock, and plan.test.ts checks the distribution — neither site favoured, the sides agreeing about half the time — instead of one lucky seed. The preview screenshots at both widths are unchanged apart from the front-page copy, which is honest about what the bots now do. (Two stray "probe" notes above are mine, from finding the right endpoint; ignore them.)
Review submitted: approved on pull #33, with two anchored line comments and the verdict body on the conversation (status.reviews.approved is now 1). Nothing was pushed; the clone is untouched and clean at 22c7a32.
What I did to judge it: checked out the head at 90f2bb1 in a scratch directory, ran bun test (219 pass, 0 fail), booted the server (/ 200 in 14ms, security headers intact), and re-ran the pull's headline claim myself over 20 seeded 5v5 SHORT matches on main versus the head — plants 28% → 57%, clock expiries 35% → 10%, tick cost 0.128ms → 0.195ms. The preview host 404s from this sandbox (production does too, so it is the network here, not the branch); I read the two screenshots instead.
Findings left for follow-up, none high: the CT rotation is not in repath's staleness key so it arrives 3–6s late; T win rate flipped to 62% with only 6% defuses while the person defaults to CT; follow now takes the move vector before turnTowards rather than after; and rotateTo's reliance on dead players keeping their position deserves a pinning test.
One note on process: the documented POST …/pulls/33/reviews with {"state":…} is the review comment route on this forge and rejects a bodyless anchor with bad_anchor; the verdict goes to POST /trevato/cs/pulls/33/review-state. Finding that left two stray "probe" notes on the pull, which the review body owns up to.
The terrorists now attack as a side and the carrier watches the clock.
src/client/plan.tsis a new pure module:roundPlan(seed, round)gives one site per side for the round — a roll per round from the match seed and the round number, not a coin per bot and not a constant — andmustCommit(secondsLeft, distance, plantTime)says when what is left of the round is no more than the walk (170 u/s) plusplantTimeplus three seconds of slack.world.planis set instartRoundfrom a newworld.seedrather than fromworld.random, so the training arena's random stream does not shift; each bot reads it once on its round reset. The terrorists all walk to the push site, the counter-terrorists stack it three and two so neither site is left empty and turn towards the site their last dead teammate fell at (kill feed and radar, nothing they could not see), and a carrier out of clock keeps the policy on its gun while its feet follow the path —botThink's fight branch takes the walk's forward/side instead of the policy's. Pathing is now two named functions,repathandfollow, shared by the fight and walking branches; nothing new is allocated per tick, and observe.ts is untouched.Measured headless with a throwaway script (not committed),
SHORTrules, 5v5, the same twenty seeds before and after — 133 rounds onmain, 137 rounds here: the bomb is planted in 65% of rounds rather than 38%, the carrier reaches a site in 66% rather than 38%, rounds endingtimefall from 37% to 10%, and T round wins go from 35% to 58%. The median round is longer, 115s against 87s, because rounds that used to be a clock running out now run the bomb's 40 seconds instead — that is the one number that moved the wrong way and it is worth a look. The plant rate is deliberately not near 100%: with the CTs holding blind it measured 96%, and the rotation-on-contact is what brings it back to two rounds in three.On the risks:
bun testis 219 pass / 0 fail in 4.0s (was 3.1s — the new bounded integration test is 0.7s of it), the rl tests pass,--benchsteps 12k ticks a second, and the trained policy still wins 34 of its 40 arena duels; the scripted baseline moved by exactly one duel (21 → 20) because the per-bot site coin no longer draws from that brain's random stream. New tests:src/client/plan.test.tscovers the plan and the urgency arithmetic, andbots.test.tsadds the team read, a five-seed round where the carrier plants inside a 30-second clock (none of those five planted on today's code), and a guard that a dropped bomb is still collected.🤖 Generated with Claude Code
Closes #27