fix(poker): read showdowns off the tool, not by eye — and cut the mush
The HAND fragment let her narrate a finished board from memory: she called
quad kings "kings full" and never noticed Brian FLOPPED quads, then wrapped it
in variance-evens-out / resilience filler. Two fixes to _F_HAND:
- Correctness: at a showdown where both hands are known, call analyze_spot on
the full board to confirm made hands + winner BEFORE commenting; name his hand
class by the street it mattered ("flopped quads"). The eval already existed —
she just never reached for it on a resolved hand. (It also catches impossible
cards, e.g. a villain card already on the board.)
- Register: ban reflexive praise / variance-evens-out / life-lesson / cross-hand
pep talk; if there's genuinely no leak, say so instead of inventing a takeaway.
Surgical here; the full voice pass stays with the persona branch.
Verified live on the exact quad-kings hand (cloud/gpt-4o-mini): she now logs,
calls analyze_spot, reads quads-vs-quads correctly, and calls it a cooler with
no leak. Guard tests added. Full suite 212 green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -114,3 +114,24 @@ def test_hardening_log_needs_number_or_result_word():
|
||||
assert c("rebought for 300") == "LOG"
|
||||
# first-person departure is Brian, not a roster op → not TABLE
|
||||
assert c("I busted, heading home") != "TABLE"
|
||||
|
||||
|
||||
# --- HAND fragment: route showdowns to the tool + no motivational mush ---
|
||||
|
||||
def test_hand_fragment_routes_showdowns_to_the_tool():
|
||||
# A resolved showdown must be verified via analyze_spot, not eyeballed
|
||||
# (the quad-kings-read-as-"kings-full" regression).
|
||||
frag = pp.fragment_for("HAND")
|
||||
assert "SHOWDOWN" in frag
|
||||
assert "analyze_spot" in frag
|
||||
assert "never eyeball" in frag.lower()
|
||||
# names the hand class by street so "flopped quads" actually gets said
|
||||
assert "street it mattered" in frag
|
||||
|
||||
|
||||
def test_hand_fragment_bans_motivational_filler():
|
||||
frag = pp.fragment_for("HAND")
|
||||
assert "variance-evens-out" in frag
|
||||
assert "life-lesson" in frag
|
||||
# if there's no leak, say so instead of inventing a takeaway
|
||||
assert "no leak" in frag.lower()
|
||||
|
||||
Reference in New Issue
Block a user