typescript-api-spec-live-shape-drift
Delivered: ~/SOLUTION.md (self-contained, directly usable).
Environment note: this sandbox has no checkout of the project (no specs/api-specs.md, no apps/server/src/routes/games.ts, no live server), so the deliverable is the standalone solution document itself, written to be executed verbatim against the target repo.
Summary of the solution:
specs/api-specs.md was authored from the model/DB layer instead of the wire. Internal game state (aliveCount, deadCount, startedAt, roundNumber) and epoch-millis timestamps leaked into samples, and the list envelope was documented bare ({games,total}) instead of the route's actual {success,data,count} wrapper.curl GET /api/v1/games?limit=2 + GET /api/v1/games/:id on an ended game.apps/server/src/routes/games.ts to confirm envelope keys, .toISOString() serialization, and that the mapper never emits the phantom fields.{success,data,count}, and add explicit field-availability notes — winner only on ended/decided games, per-player usage attribution only on completed games.jq -e probe checks (envelope keys, winner presence on ended / absence on in-progress, ISO timestamp regex, phantom-field absence) plus a grep for leftover epoch-millis/phantom artifacts in the spec, with expected PASS outcomes.# Evidence - Problem class: typescript-api-spec-live-shape-drift - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-25T17:48:45.319Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "specs/api-specs.md game-object samples documented phantom fields (aliveCount/deadCount/startedAt/roundNumber, epoch-millis timestamps, bare {games,total} envelope) that the live API never returned. Fix = probe the LIVE endpoints first (GET /api/v1/games?limit=2 + GET /api/v1/games/:id on an ENDED game), read the route code (apps/server/src/routes/games.ts) to confirm envelopes ({success,data,count}), then realign samples + add field-availability notes (winner only on decided games; per-player usage attribution on completed games; ISO timestamps). Judge tier2 PASS 3/3; tier1 lint/secrets FAILs are the known deterministic FP family.", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "typescript-api-spec-live-shape-drift", "provider": "openrouter", "solved_at": "2026-08-25T17:48:45.320Z", "version": ""}Delivered: ~/SOLUTION.md (self-contained, directly usable).
Environment note: this sandbox has no checkout of the project (no specs/api-specs.md, no apps/server/src/routes/games.ts, no live server), so the deliverable is the standalone solution document itself, written to be executed verbatim against the target repo.
Summary of the solution:
specs/api-specs.md was authored from the model/DB layer instead of the wire. Internal game state (aliveCount, deadCount, startedAt, roundNumber) and epoch-millis timestamps leaked into samples, and the list envelope was documented bare ({games,total}) instead of the route's actual {success,data,count} wrapper.curl GET /api/v1/games?limit=2 + GET /api/v1/games/:id on an ended game.apps/server/src/routes/games.ts to confirm envelope keys, .toISOString() serialization, and that the mapper never emits the phantom fields.{success,data,count}, and add explicit field-availability notes — winner only on ended/decided games, per-player usage attribution only on completed games.jq -e probe checks (envelope keys, winner presence on ended / absence on in-progress, ISO timestamp regex, phantom-field absence) plus a grep for leftover epoch-millis/phantom artifacts in the spec, with expected PASS outcomes.# Evidence - Problem class: typescript-api-spec-live-shape-drift - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-25T17:48:45.319Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "specs/api-specs.md game-object samples documented phantom fields (aliveCount/deadCount/startedAt/roundNumber, epoch-millis timestamps, bare {games,total} envelope) that the live API never returned. Fix = probe the LIVE endpoints first (GET /api/v1/games?limit=2 + GET /api/v1/games/:id on an ENDED game), read the route code (apps/server/src/routes/games.ts) to confirm envelopes ({success,data,count}), then realign samples + add field-availability notes (winner only on decided games; per-player usage attribution on completed games; ISO timestamps). Judge tier2 PASS 3/3; tier1 lint/secrets FAILs are the known deterministic FP family.", "environment": "", "language": "", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "typescript-api-spec-live-shape-drift", "provider": "openrouter", "solved_at": "2026-08-25T17:48:45.320Z", "version": ""}