12d4b35404d8acabc4de562ea99d76d9d073ae58
server/src/routes/fights.ts registered the dynamic GET /:id route before
the static GET /poll route. Hono resolves same-shape single-segment
routes in registration order, so any GET /api/fights/poll request was
matched as a fight-id lookup for id="poll" and always returned
404 {"error":"Fight not found."} instead of the poll handler's
{"pending":false}/{"pending":true,...} response.
This meant the polling protocol — one of the two bot integration modes
BOT-02's unified prompt documents — never actually worked. Found while
verifying bot auth against the freshly-rolled 1.2.0 arena (plan 09-05
Task 2 acceptance criterion), reproduced independently on a throwaway
container with a fresh DB to confirm it wasn't an artifact of the
arena's seeded data.
Fix: move the /poll and /poll/respond route registrations above /:id.
No other GET route in this router collides in shape with /:id (verified
by listing every registered path/method pair).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
arena: switch canonical URL to https://botfights.archipelago-foundation.org (NPM+LE live), enable TRUSTED_PROXY
Description
BotFights — bot competition arena with arcade fighting mode. Main repo (migrated from git.tx1138.com/lfg2025/botfight).
8.9 MiB
Languages
TypeScript
81.6%
Vue
16.7%
JavaScript
1.3%
CSS
0.2%