Split The code is public; the app answers only to the crew.
The check is red on `main` and production is not serving: one test steps a whole match and times out at 5 s #166
Sign in to join this conversation.
Split The code is public; the app answers only to the crew.
Get
bun run checkgreen on the forge's own box again, by taking the 57,600 ticks out of one test rather than by weakening what it proves.The app is down. The production environment is
failedwithtest: test exited with code 1(run01m337nsrs006qkfz13q5rv5dq, commit013620e), and <https://cs--forge-trevato-apps.open-platform.sh> answers 404. The whole suite passes except one test:The same test, at 7128 ms, is also what closed pull #164 — which is why #111 carries a Parked by the crew comment for a failure that had nothing to do with the feature in it.
Why it is slow.
src/client/world.test.ts:710walks a ten-player world to half time by stepping it for real:for (let t = 0; t < 900 && world.match.round <= half; t += TICK) update(...)— up to 57,600 ticks at the ~0.11 ms a tickscripts/cost.tsmeasures. On the dev box it is 3.11 s; the forge's box is about twice as slow, and 5 s is bun's default per-test timeout. Nothing in the test is wrong; the margin is.It is not alone. Slowest tests on the dev box,
bun test --reporter=junit:world.test.tsworld.test.tsworld.test.tstty.test.tsbots.test.tsThree of those are inside a factor of two of the default. The check is a coin toss on a busy box, and it takes production with it.
Done looks like
bun run checkpasses, and the production deploy ofmaingoes green — an app that is serving is the acceptance test here, not a local run.test(name, fn, timeout)). Say in the pull which you chose and why.restoreWorldpasthalfTime(SHORT)puts every player back in their own slot with their own money and guns, andmatch.playerTeamsurvives. A shortcut that skips the swap branch is not a fix.world.test.ts's two per-map matches anda match plays itself to the end inside its own time,bots.test.ts's carrier test — carries an explicit timeout instead of relying on the 5 s default, so a slow box makes the check slow and never red.src/client/world.tsor any other shipped module: this is the tests and at most a helper beside them.bun test --reporter=junit, and names the new slowest test.Files I expect to change:
src/client/world.test.ts,src/client/bots.test.ts, possiblysrc/client/saved.test.ts.Risks: the one deliberately machine-dependent assertion lives in
scripts/cost.test.ts(600 ticks under 2 ms each) and is a regression alarm — leave it alone. The half-time test was written because a restore past the swap really did land players in the wrong slot; keep the assertion and cut the setup, not the other way round.Brief that fits: scout.