A short all-in doesn't reopen the betting #51

Closed
jheaps wants to merge 1 commits from feature/casino-holdem-rulings-depth into feature/casino-holdem-bank-audit
Owner

Went looking at dealer procedure again and ended up checking the rule home games argue about longest. The tool had it wrong. Stacked on #50.

The bug

Blinds 1/2. Seat 4 raises to 10 — a full raise of 8. Seat 1 calls. Seat 2 is all-in for 13: three more, where a full raise needs eight.

Under TDA rule 44 that does not reopen the betting to anyone who has already acted — they owe the extra three or they fold. Seat 1 and seat 4 were both being handed another go.

before:  hasActed  s1=true  s2=false s3=false s4=true   lastRaiseSize=8
after:   hasActed  s1=FALSE s2=true  s3=false s4=FALSE  lastRaiseSize=3   <-- both wrong

Two errors in raiseTo:

  1. Any increase reset hasActed for every live player, so a short shove gave the whole table another chance to raise.
  2. lastRaiseSize was overwritten with the short amount, so the next legal raise was computed off 3 instead of 8 and came out too small — a quieter second error that only surfaces when somebody then tries to raise.

Both now key off whether the increase was actually a full raise. A player who hadn't yet acted keeps full rights, which falls out naturally because their hasActed is already false — and that distinction is the half of the rule people get wrong in the other direction.

Everyone still owes the difference: isStreetComplete already asks anyone with chips left to call, so the short all-in gets answered without being re-raiseable.

The rulings sheet now covers what the tool decides for you

It had three entries. A dealer challenged on a payout couldn't look up why the tool did what it did — even for rules it enforces silently. Added three that it already implements:

  • A short all-in doesn't reopen the betting (the rule above)
  • Chips nobody called come back — shown as "uncalled" rather than as a side pot you could win (from #42)
  • The odd chip in a split pot goes to the first player left of the button (the payout ordering added in #42)

All three are things the tool decides without being asked, and all three are worth being able to point at when somebody objects.

Validation

10 new tests (137 total, all passing — including the 1000-hand randomised invariants, so chip conservation is intact): already-acted players aren't reopened but still owe the difference; a player yet to act keeps full rights; the minimum raise isn't shrunk; calling ends the street; no chips created. And the other half of the rule — a full-sized all-in, an ordinary raise, a raise exactly matching the last one, and a full-sized opening bet all still reopen everyone.

Driven through the real action bar: after the short shove, lastRaiseSize stays 8 and the player who had already called stays settled, while the two who hadn't acted keep their turn. The longer rulings sheet still fits a phone, scrolls, traps focus and closes on Escape.

Sources: TDA Rules, Tips for Mistake-Free Dealing in Home Games

Went looking at dealer procedure again and ended up checking the rule home games argue about longest. **The tool had it wrong.** Stacked on #50. ## The bug Blinds 1/2. Seat 4 raises to 10 — a full raise of 8. Seat 1 calls. Seat 2 is all-in for **13**: three more, where a full raise needs eight. Under [TDA rule 44](https://thelodgepokerclub.com/tda-rules/) that does **not** reopen the betting to anyone who has already acted — they owe the extra three or they fold. Seat 1 and seat 4 were both being handed another go. ``` before: hasActed s1=true s2=false s3=false s4=true lastRaiseSize=8 after: hasActed s1=FALSE s2=true s3=false s4=FALSE lastRaiseSize=3 <-- both wrong ``` Two errors in `raiseTo`: 1. **Any** increase reset `hasActed` for every live player, so a short shove gave the whole table another chance to raise. 2. `lastRaiseSize` was overwritten with the short amount, so the next legal raise was computed off **3** instead of **8** and came out too small — a quieter second error that only surfaces when somebody then tries to raise. Both now key off whether the increase was actually a full raise. A player who hadn't yet acted keeps full rights, which falls out naturally because their `hasActed` is already false — and that distinction is the half of the rule people get wrong in the *other* direction. Everyone still owes the difference: `isStreetComplete` already asks anyone with chips left to call, so the short all-in gets answered without being re-raiseable. ## The rulings sheet now covers what the tool decides for you It had three entries. A dealer challenged on a payout couldn't look up *why* the tool did what it did — even for rules it enforces silently. Added three that it already implements: - **A short all-in doesn't reopen the betting** (the rule above) - **Chips nobody called come back** — shown as "uncalled" rather than as a side pot you could win (from #42) - **The odd chip in a split pot** goes to the first player left of the button (the payout ordering added in #42) All three are things the tool decides without being asked, and all three are worth being able to point at when somebody objects. ## Validation 10 new tests (**137 total, all passing** — including the 1000-hand randomised invariants, so chip conservation is intact): already-acted players aren't reopened but still owe the difference; a player yet to act keeps full rights; the minimum raise isn't shrunk; calling ends the street; no chips created. And the other half of the rule — a full-sized all-in, an ordinary raise, a raise exactly matching the last one, and a full-sized opening bet all still reopen everyone. Driven through the real action bar: after the short shove, `lastRaiseSize` stays **8** and the player who had already called stays settled, while the two who hadn't acted keep their turn. The longer rulings sheet still fits a phone, scrolls, traps focus and closes on Escape. Sources: [TDA Rules](https://thelodgepokerclub.com/tda-rules/), [Tips for Mistake-Free Dealing in Home Games](https://www.pokernews.com/strategy/deal-with-it-tips-for-mistake-free-dealing-in-home-games-30231.htm)
jheaps added 1 commit 2026-09-01 07:52:35 -06:00
Went looking at dealer procedure again and ended up checking the rule home games
argue about longest. The tool had it wrong.

Blinds 1/2. Seat 4 raises to 10 — a full raise of 8. Seat 1 calls. Seat 2 is
all-in for 13: three more, where a full raise would need eight. Under TDA rule 44
that does not reopen the betting to anyone who has already acted; they owe the
extra three or they fold. Seat 1 and seat 4 were both being handed another go.

Two things were wrong in raiseTo. Any increase at all reset hasActed for every
live player, so a short shove gave the whole table another chance to raise. And
lastRaiseSize was overwritten with the short amount, so the next legal raise was
computed off 3 instead of 8 and came out too small — a second, quieter error that
only shows up when somebody then tries to raise.

Both now key off whether the increase was actually a full raise. A player who had
not yet acted keeps full rights, which falls out naturally because their hasActed
is already false — that distinction is the part of the rule people get wrong in
the other direction.

Everyone still owes the difference: isStreetComplete already asks anyone with
chips left to call, so the short all-in is answered without being re-raiseable.

The rulings sheet now covers what the tool does for you

It had three entries. A dealer challenged on a payout couldn't look up why the
tool did what it did, even for the rules it enforces automatically. Added the
short all-in rule above, uncalled chips coming back rather than being announced
as a side pot, and the odd chip in a chopped pot going to the first player left
of the button — all three are things this tool already decides silently, and all
three are worth being able to point at when somebody objects.

10 tests (137 total): already-acted players aren't reopened but still owe the
difference, a player yet to act keeps full rights, the minimum raise isn't
shrunk, calling it ends the street, no chips are created, and — the other half of
the rule — a full-sized all-in, an ordinary raise, a raise exactly matching the
last one, and a full-sized opening bet all still reopen everyone.

Validated through the real action bar: after the short shove, lastRaiseSize stays
8 and the player who had already called stays settled, while the two who hadn't
acted keep their turn. The longer rulings sheet still fits a phone, scrolls, traps
focus and closes on Escape.

Sources: TDA rules via thelodgepokerclub.com/tda-rules/,
pokernews.com/strategy/deal-with-it-tips-for-mistake-free-dealing-in-home-games-30231.htm

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps closed this pull request 2026-09-01 09:32:16 -06:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jheaps/JoshHeaps.Net#51