Game Pass: tournament/pending answers rows (the field the games' polgrant.js reads), games-side integration test, docs "Games: as built"
- /api/partner/tournament/pending returned only `pending`; every game's polgrant.js tournamentPending() reads `rows`, so PolHunter's prize payer would never have seen a row. Answer now carries both (`pending` stays for the admin pane + qa). - qa/gamepass-games.cjs (bash qa/run.sh gamepass-games): boots a local copy like qa/gamepass.mjs and drives the REAL spooky-doors/server/polgrant.js and polhunter/lib/tournament.js against it (fetchPass, daily/progress caps, carry:<day> zero-POL call on the next Central day, void, bad secret / IAP down -> retry, retry queue, tournament dry run + live). 44/44. - qa/gamepass.mjs pins the `rows` field. - docs/GAME-PASS.md: 3a item 8 updated, "Games: as built" section merged from the games' notes (per game files/refs/perk/tests, decisions, the tournament payer and its dry-run claim trap, the integration test). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -3629,7 +3629,8 @@ const server = http.createServer(async (req, res) => {
|
||||
if (!/^\d{13}$/.test(ts) || Math.abs(Date.now() - Number(ts)) > 600000) return json(res, 401, { error: 'stale' });
|
||||
if (!gpSigOk(crypto.createHmac('sha256', chk.secret).update('player:tournament:' + ts).digest('hex'), sig)) return json(res, 401, { error: 'bad signature' });
|
||||
}
|
||||
return json(res, 200, { ok: true, pending: gamepass.pending() });
|
||||
const rows = gamepass.pending();
|
||||
return json(res, 200, { ok: true, rows, pending: rows }); // `rows` is what the games' polgrant.js tournamentPending() reads; `pending` is the admin pane's name
|
||||
}
|
||||
if (p === '/api/my/gamepass' && req.method === 'GET') {
|
||||
const s = await auth.fromRequest(req); if (!s || !s.email) return json(res, 401, { error: 'Sign in first.' });
|
||||
|
||||
Reference in New Issue
Block a user