Smoke e2e, docs consistency pass, status summary

Built: e2e/run.js + lib.js (playwright-core, in-process server, temp DB): desktop flow, phone touch portrait/landscape, layout matrix on 5 viewports x pop/map/trade/world (overflow + console errors), WebSocket push incoming-banner without reload. 61/61 checks, ~54 s, identical over 4 runs; the push and overflow checks were shown to fail when the behaviour is removed.
Docs: fixed stale numbers/claims in DESIGN, DECISIONS, BALANCE, API (undocumented routes, rate limits, notification types), DEPLOY, NEXT (status-at-a-glance on top). Deploy path exercised in a scratch dir: migrations, healthz, signup/build, admin CLI, SIGKILL catch-up, backup restore.

Tested: npm test 207/207, npm run e2e 61/61, bot run 50x14d INVARIANTS OK.
NOT tested: Chromium only; no systemd/nginx Proxy Manager/Node 22.13 run; e2e does not cover units, alliances, messages, trade or end-game flows beyond empty-state rendering; no nb, PWA or polling-fallback e2e; docs/workflows/ still empty.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q2MJaQ5LXAHzGnTDgceT14
This commit is contained in:
jvanvik 2026-10-11 20:34:35 +02:00
parent 931f59e11e
commit cc0524de5e
8 changed files with 533 additions and 38 deletions

View file

@ -25,7 +25,7 @@ Mid game adds more POPs, alliances and trade. Late game is the backbone race.
## World
- Square tile map, default 301 x 301 (coordinates -150..150), one tile = one site. World config sets size,
- Square tile map, default 101 x 101 (radius 50, coordinates -50..50; `WORLD_DEFAULTS.mapRadius`, DECISIONS D6), one tile = one site. World config sets size,
speed (1x, 2x, 3x), start time and a planned end.
- Tile types: empty land, **rural area** (bonus tile), **incumbent site** (NPC), **backbone landing site**
(appears late, see End game), player POP.
@ -63,7 +63,7 @@ Current amount is always computed, never stored as "now": `amount = min(cap, sto
## Buildings
One build queue per POP. The **Core router** level shortens all build times. Level cap 20 for most buildings.
One build slot per POP, a second from Core router 3 (`FORMULAS.secondQueueCoreLevel`, BALANCE.md B1). The **Core router** level shortens all build times. Level cap 20 for most buildings.
| Building | Role |
| --------------- | --------------------------------------------------------------------------------------------- |
@ -166,7 +166,8 @@ pump-feeding. Accepting an offer spawns two transport movements. Direct transpor
an Internet exchange. Each side must fit ONE transport link (1..1000) and the two amounts differ by at most 1:2:
`give <= 2 x want` and `want <= 2 x give` (count-based, the resources are not weighted). The resources must differ.
- The offered amount is **escrowed**: it leaves the POP when the offer is posted. Cancelling or expiry (48 h / world speed) credits it back
to the POP without the Rack hall cap (an amount above the cap is kept, it only stops growing), so nothing is created or lost.
to the POP **capped by the Rack hall** (`trade.refund`, review fix R1: stock already above the cap stays, a refund never lifts it further). If
the POP's store filled up meanwhile, the clipped part is destroyed without a notice (BALANCE.md S2, open); otherwise nothing is created or lost.
- **Reach:** a POP sees and takes offers of other operators within `min(offer.maxDistance, 10 x Internet exchange level)` tiles. The poster
cannot take their own offer.
- **Links:** an open offer holds one transport link of the poster's POP in reserve (open offers + running transports + returning carriers
@ -260,4 +261,4 @@ computed from `serverTime`.
- Research as a tree or a flat list of upgrades?
- Should rural areas be contested (takeable from each other) or just held?
- Night protection and holiday mode.
- World size vs expected players (301² tiles is a lot for 50 players; shrink for the first world).
- World size vs expected players (the default is already 101², radius 50; is that right for 50 players? untested with real players).