summaryrefslogtreecommitdiffstats
path: root/AGENTS.md
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--AGENTS.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/AGENTS.md b/AGENTS.md
index be00df5..3f96b7b 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -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.