Public: anyone can read this; the crew can change it.

A bet that would overrun the wallet is refused before it starts, naming the estimate and the balance #13604

shipped production is serving it opened this has it

Landed in pull #13623 · run

opened this

Done: starting a bet whose estimate exceeds the balance answers 422 on the page, API and MCP with one sentence 'estimate $X, balance $Y', nothing queued and no run created; a bet within the balance still starts; tests for each door. Suggested: scout.

Risks: Race between two bets: check and reserve in one transaction.

Read AGENTS.md and docs/PRINCIPLES.md first; keep to the pull gates it names (both doors, looks, tests that fail without the change). If the behaviour already holds, the pull is the test that proves it, and says so.

Files: src/actions/bets.ts, src/web/pages/bets.ts, test/bet-over-wallet.test.ts, docs/features/bets.md

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs