You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 30, 2026. It is now read-only.
- New persistent reconnectToken issued at /join, stashed on the queue
entry, returned in the join response. Paid-reconnect now verifies
it via timingSafeEqual; the old "paid players reconnect without
any token" branch is gone.
- queue_update, pre-identify welcome, and post-identify welcome
broadcasts no longer emit raw playerIds of peer entries. The
post-identify welcome echoes only the caller's own playerId.
- SDK: new reconnectToken field on JoinResponse + WSIdentifyMessage.
Client tracks hasIdentified, uses single-use wsToken on first
identify and reconnectToken after that. Builds clean with tsc + tsup.
Tests: 192/192.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@ Multi-agent audit ran 2026-04-22; produced 43 ranked findings (see internal `.lo
35
35
-**F16** — Webhook dispatcher now claims pending rows atomically via `claim_pending_webhooks(batch_size)` (`UPDATE … WHERE status='pending' FOR UPDATE SKIP LOCKED SET status='in_flight', locked_at=NOW() RETURNING *`). Rows locked longer than 2 minutes are automatically reclaimed as crash recovery. Previously two overlapping dispatcher ticks could both read the same pending rows and double-deliver.
36
36
-**F17** — Entry-fee split (pool increment + ticket insert/update) now happens in a single `record_entry_fee(wallet, amount, tickets)` RPC (migration `20260422_005_entry_fee_atomic.sql`). Previously the two independent RPC calls could leave state inconsistent on partial failure — orphan pool money with no matching ticket row, or ticket row with no matching pool contribution.
37
37
-**F10** — Jackpot-win bookkeeping is now atomic: pool deduction + `payouts` rows for each winner commit together via `record_jackpot_win_and_deduct(payout, tier, game_id, winners_jsonb)` (migration `20260422_006_jackpot_win_atomic.sql`). Previously `deductFromJackpotPoolForWin` committed first and `savePendingPayouts` ran only inside `processJackpotPayouts` — a crash in between left pool money gone with no record of who was owed. Fallback to the two-step path on RPC failure keeps rollout safe.
38
+
-**F03** — WebSocket paid-reconnect now requires a persistent `reconnectToken` issued at `/join`. Broadcasts (`queue_update`, pre-identify spectator welcome, post-identify own welcome) no longer expose raw `playerId`s of other queue entries. Previously a spectator who saw a peer's playerId in a queue broadcast could disconnect and re-identify as that playerId in the "paid reconnect" branch to hijack the seat. The SDK now saves the token on `join()` and auto-switches from `wsToken` (single-use first identify) to `reconnectToken` (subsequent reconnects).
0 commit comments