Upstream/server/commands
jvanvik 931f59e11e Phase 3: trade/end-game client, bot simulator, first balance pass
Built:
- Client: trade screen, world/end-game screen (landing sites, shipping, node build, final ranking), report sharing + alliance reports tab, alert describers for all notification types, error-code strings (en+nb) for every server CODE.
- tools/bot.js (+ tools/bot/): 50 headless bots against the real server in-process with a fake clock; resource/unit conservation ledger, exit 1 on broken invariants. docs/BALANCE.md has method and every run behind a number.
- Balance changes (evidence in docs/BALANCE.md): secondQueueCoreLevel 10 -> 3, TRANSPORT.capacityPerLink 500 -> 1000 (end game was shipping-limited in bot runs).
- Server fixes: POST /reports/:id/share 500 without a pending reportCleanup; bounced link shipments were silent about cargo overflow.

Tested: npm test 207/207 (new: bot determinism + invariants, client alerts/world/i18n over CODES, two regression tests that failed before their fix); openapi check up to date. Real-browser scratch runs (not in repo): WebSocket push shows an incoming-attack banner ~214 ms after launch, polling fallback ~52 s, 15 scripted flows, 71 screenshots.

NOT tested: Playwright suite (e2e/ still empty), real devices/Safari, nginx proxy websockets, throttled networks, HTTP-level bot load. NOT claimed: balance. Bots are not humans; open balance items (loot waste, escrow refund clipping, no garrisons at landing sites, end game not scaling with world speed) are listed in docs/BALANCE.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q2MJaQ5LXAHzGnTDgceT14
2026-10-11 20:24:41 +02:00
..
allianceCreate.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
allianceDisband.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
allianceInvite.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
allianceInviteAnswer.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
allianceInviteCancel.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
allianceKick.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
allianceLeave.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
allianceNote.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
allianceRole.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
allianceTransfer.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
backboneBuild.js Phase 2: client military/social screens, WebSocket push, trade + endgame, review findings pending 2026-10-11 19:05:03 +02:00
backboneShip.js Phase 2: client military/social screens, WebSocket push, trade + endgame, review findings pending 2026-10-11 19:05:03 +02:00
build.js Stage 0-2 server spine: db, scheduler, REST, auth, economy, map 2026-10-11 18:07:42 +02:00
cancelBuild.js Stage 0-2 server spine: db, scheduler, REST, auth, economy, map 2026-10-11 18:07:42 +02:00
diploAnswer.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
diploPropose.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
diploRevoke.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
diploWithdraw.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
index.js Phase 2: client military/social screens, WebSocket push, trade + endgame, review findings pending 2026-10-11 19:05:03 +02:00
joinWorld.js Stage 0-2 server spine: db, scheduler, REST, auth, economy, map 2026-10-11 18:07:42 +02:00
markReportRead.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
messageBlock.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
messageDelete.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
messageRead.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
messageSend.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
recallMovement.js Fix review findings: proto smuggling, trade-leg recall, escrow cap, static headers, rate limits, rankings DoS 2026-10-11 19:06:51 +02:00
renameTown.js Fix review findings: proto smuggling, trade-leg recall, escrow cap, static headers, rate limits, rankings DoS 2026-10-11 19:06:51 +02:00
reportShare.js Phase 3: trade/end-game client, bot simulator, first balance pass 2026-10-11 20:24:41 +02:00
research.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
sendMovement.js Phase 2: client military/social screens, WebSocket push, trade + endgame, review findings pending 2026-10-11 19:05:03 +02:00
sendTransport.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
signup.js Stage 0-2 server spine: db, scheduler, REST, auth, economy, map 2026-10-11 18:07:42 +02:00
tradeAccept.js Phase 2: client military/social screens, WebSocket push, trade + endgame, review findings pending 2026-10-11 19:05:03 +02:00
tradeCancel.js Phase 2: client military/social screens, WebSocket push, trade + endgame, review findings pending 2026-10-11 19:05:03 +02:00
tradeOffer.js Phase 2: client military/social screens, WebSocket push, trade + endgame, review findings pending 2026-10-11 19:05:03 +02:00
train.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00
withdrawStationed.js Stage 3-5 server (military, expansion, social), web client for stages 1-2, ops/deploy 2026-10-11 18:32:36 +02:00