1 Commits
Author SHA1 Message Date
tiennm99 6099f1135a refactor(api): typed draw errors, honest statuses, and a slimmer guess envelope
A dry pool and an upstream failure were told apart by matching error
message prefixes in eight places; they are now DryPoolError and
UpstreamError, and /api/new-game answers 404 with the coverage message
for the first and 502 for the second instead of 200 for both. The draw
stops retrying after eight seconds and the client gives up at fifteen.

/api/guess returns gameResult alone: the whole leaderboard and distance
objects, four legacy rank fields and a message duplicated it and had no
reader. The leaderboard module drops its pre-tree aliases and the
submitScore primitive with no production caller; tests award points
through submitRoundScore, the path production runs. /api/leaderboard
returns the rows alone. The unused debug POST on new-game, zScore,
isDay and indexedProvinces go with them.

Fixes two live bugs: GameClient dropped the partial flag, so a
half-credited round showed the success message; and the map centre was
state seeded to Ho Chi Minh, painting one frame there on every region.
The e2e stubs carry every key the routes emit and a test now asserts it.
2026-09-21 16:21:14 +07:00