diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-29 21:36:26 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-29 21:36:26 +0100 |
| commit | 772727b0ef7d63144bf629d774f8b6c1c996bf78 (patch) | |
| tree | 1680dbbd61fce2aaf383ee81ad04ff0705ffe985 /AGENTS.md | |
| parent | v2.3.0: add crash with local multiplier and pushed crash event (diff) | |
| download | zagan-bet-772727b0ef7d63144bf629d774f8b6c1c996bf78.tar.gz zagan-bet-772727b0ef7d63144bf629d774f8b6c1c996bf78.zip | |
v2.3.1: settle orphaned reservations on server restart
Diffstat (limited to '')
| -rw-r--r-- | AGENTS.md | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -20,6 +20,12 @@ | |||
| 20 | - Every `PLAY_START` must produce a session entry before the balance is | 20 | - Every `PLAY_START` must produce a session entry before the balance is |
| 21 | touched. The session is the audit trail for the deduction; without it the | 21 | touched. The session is the audit trail for the deduction; without it the |
| 22 | deduction is orphaned. | 22 | deduction is orphaned. |
| 23 | - Multi-step games (blackjack, crash) reserve with `database::reserve_play`: | ||
| 24 | the debit and the `pending_plays` row are one transaction. Settlement deletes | ||
| 25 | that row and writes the `plays` row in the same transaction. | ||
| 26 | - Sweep orphaned reservations only at startup (`recover_orphaned_reservations`), | ||
| 27 | never per connection. A per-connection sweep would settle another player's | ||
| 28 | live hand. An orphaned reservation is a forfeit, never a refund. | ||
| 23 | - Clean up sessions on client disconnect. If a game is in progress when the | 29 | - Clean up sessions on client disconnect. If a game is in progress when the |
| 24 | connection drops, settle it as a forfeit (the reserved bet is lost) and | 30 | connection drops, settle it as a forfeit (the reserved bet is lost) and |
| 25 | record the play; never refund an active hand. | 31 | record the play; never refund an active hand. |
