FAILURE MAP
← Case archive

FA-83391 / Card game rule engines / Open access

Ace plus ten is not valued as 21 for the dealer · case 01

A dealer holding A-T keeps hitting from 11.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The ace promotion requires the soft total to stay strictly below 21.

VERIFIED REPAIR

Promote one ace to 11 whenever the total stays <= 21.

Unsuccessful approach: Allowing promotion only with a single ace undervalues hands such as A-A-6.

Case contract

Input [dealer_cards, shoe, rule]. Dealer draws from the front of the shoe while total < 17, and under H17 also on soft 17; aces count 11 when that does not bust. Stop if the shoe runs out. Return [final_cards, total].

Why this case matters

Card-game engines, scoring apps and online tables apply this rule automatically on every hand.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    cards, shoe, rule = x
    hand = list(cards)
    pos = 0
    def value(h):
        t = 0
        a = 0
        for c in h:
            if c[0] == 'A':
                a += 1
                t += 1
            elif c[0] in 'TJQK':
                t += 10
            else:
                t += int(c[0])
        soft = a > 0 and t + 10 < 21
        return (t + 10 if soft else t), soft
    while True:
        t, soft = value(hand)
        if t < 17 or (t == 17 and soft and rule == 'H17'):
            if pos >= len(shoe):
                break
            hand.append(shoe[pos])
            pos += 1
        else:
            break
    t, soft = value(hand)
    return [hand, t]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[['QD', 'AH'], ['3S', '4D', 'JH', '2D', '6C', '2H'], 'S17'], [['QD', 'AH'], 21]], [[['KS', '7S'], ['TC', 'JH', 'AD', '3D', 'KC', 'QD'], 'H17'], [['KS', '7S'], 17]], [[['QS', 'JS'], ['6H', '6D', '3C', '3S', '9D', 'QD'], 'S17'], [['QS', 'JS'], 20]], [[['3H', '7D'], ['3S', '9S', '4D', '2H', '6C', '9H'], 'S17'], [['3H', '7D', '3S', '9S'], 22]], [[['3C', '2D'], ['QS', 'QH', '2C', '8D', 'KC', 'JC'], 'S17'], [['3C', '2D', 'QS', 'QH'], 25]], [[['TC', '6H'], ['TH', '5C', '2D', '7S', '2S', '3S'], 'H17'], [['TC', '6H', 'TH'], 26]], [[['JD', 'TD'], ['2D', '5S', '8D', '6D', 'QH', '6S'], 'H17'], [['JD', 'TD'], 20]], [[['AH', 'AD'], ['9H', '7D', '7C', 'TC', '2D', '9C'], 'H17'], [['AH', 'AD', '9H'], 21]]], [[[['KS', '2D'], ['7D', '7H', '8S', '4H', '8H', 'KC'], 'S17'], [['KS', '2D', '7D'], 19]], [[['TH', '8S'], ['QC', 'QS', 'KH', 'JH', '3D', 'QH'], 'S17'], [['TH', '8S'], 18]], [[['8C', 'QS'], ['AS', 'KC', '5C', '6C', '9S', '6S'], 'S17'], [['8C', 'QS'], 18]], [[['TC', '7H'], ['2S', '8C', 'JC', '7S', '2H', '8H'], 'H17'], [['TC', '7H'], 17]], [[['2C', 'QS'], ['QD', '7D', '9D', '7C', 'KH', 'AS'], 'S17'], [['2C', 'QS', 'QD'], 22]], [[['KC', '9C'], ['2H', 'JD', '2C', 'KS', 'AC', '7C'], 'S17'], [['KC', '9C'], 19]], [[['5C', '5S'], ['AC', '6D', '4S', '4C', 'QH', 'KH'], 'H17'], [['5C', '5S', 'AC'], 21]], [[['5S', 'AH'], ['AC', '4D', '2C'], 'H17'], [['5S', 'AH', 'AC', '4D'], 21]]], [[[['7S', 'AS'], ['8S', 'JC', '6S', '6C', '8H', '3D'], 'H17'], [['7S', 'AS'], 18]], [[['JS', 'QC'], ['AH', '4S', '6C', 'TS', '5D', 'QD'], 'S17'], [['JS', 'QC'], 20]], [[['5C', '7S'], ['4C', 'KH', '9H', 'QC', 'KD', '3D'], 'H17'], [['5C', '7S', '4C', 'KH'], 26]], [[['JD', '7S'], ['7D', 'KH', '5D', '9H', '4D', '3H'], 'S17'], [['JD', '7S'], 17]], [[['KC', 'QH'], ['5H', 'JS', '9S', '6H', '5D', '3C'], 'H17'], [['KC', 'QH'], 20]], [[['TH', '5S'], ['7H', 'JD', '4C', '6D', '7D', 'QC'], 'H17'], [['TH', '5S', '7H'], 22]], [[['AS', 'KS'], ['8H', '9S', '4C', '9H', '2D', '6S'], 'S17'], [['AS', 'KS'], 21]], [[['AS', 'AD'], ['5C', '9D', '5S', '3H'], 'S17'], [['AS', 'AD', '5C'], 17]]], [[[['9H', '7D'], ['QD', '8C', '6D', 'AD', 'JD', 'AS'], 'H17'], [['9H', '7D', 'QD'], 26]], [[['8D', '4H'], ['5H', '2S', 'TS', 'QH', 'TD', '9H'], 'H17'], [['8D', '4H', '5H'], 17]], [[['2D', 'KC'], ['9D', 'AD', 'QC', 'TD', '6C', 'TC'], 'S17'], [['2D', 'KC', '9D'], 21]], [[['5D', '3S'], ['JC', '7S', '4S', '6H', '2D', 'KC'], 'H17'], [['5D', '3S', 'JC'], 18]], [[['8C', 'JS'], ['2C', '2S', '9C', '3C', '4D', 'TH'], 'S17'], [['8C', 'JS'], 18]], [[['5C', 'QD'], ['2H', 'TD', 'TC', '8C', '2C', 'QS'], 'H17'], [['5C', 'QD', '2H'], 17]], [[['AD', 'QH'], ['3S', 'JD', 'TH', '5H', '5C', '7D'], 'H17'], [['AD', 'QH'], 21]], [[['AH', 'AD'], ['9H', '7D', '7C', 'TC', '2D', '9C'], 'H17'], [['AH', 'AD', '9H'], 21]]], [[[['3C', 'TD'], ['4S', '4C', '6S', '6D', '4H', '2S'], 'S17'], [['3C', 'TD', '4S'], 17]], [[['QS', 'JS'], ['8H', '2C', '6H', '5C', 'AH', 'QH'], 'S17'], [['QS', 'JS'], 20]], [[['2C', '9D'], ['7H', '2S', '3S', '4H', '2D', '4S'], 'H17'], [['2C', '9D', '7H'], 18]], [[['3S', '9D'], ['2D', 'KC', '3D', 'TD', 'AS', 'TH'], 'S17'], [['3S', '9D', '2D', 'KC'], 24]], [[['4D', '7S'], ['3S', '8S', '8D', 'QC', 'AH', 'JC'], 'S17'], [['4D', '7S', '3S', '8S'], 22]], [[['7C', '6S'], ['5S', '7D', '9H', '3C', '4S', 'JH'], 'H17'], [['7C', '6S', '5S'], 18]], [[['AS', 'KC'], ['7S', '3S', '2S', 'AC', '9D', '8C'], 'H17'], [['AS', 'KC'], 21]], [[['5S', 'AH'], ['AC', '4D', '2C'], 'H17'], [['5S', 'AH', 'AC', '4D'], 21]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("dealer hand case %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
dealer hand case 0[['QD', 'AH', '3S', '4D'], 18][['QD', 'AH'], 21]Failed
dealer hand case 1[['KS', '7S'], 17][['KS', '7S'], 17]Passed
dealer hand case 2[['QS', 'JS'], 20][['QS', 'JS'], 20]Passed
dealer hand case 3[['3H', '7D', '3S', '9S'], 22][['3H', '7D', '3S', '9S'], 22]Passed
dealer hand case 4[['3C', '2D', 'QS', 'QH'], 25][['3C', '2D', 'QS', 'QH'], 25]Passed
dealer hand case 5[['TC', '6H', 'TH'], 26][['TC', '6H', 'TH'], 26]Passed
dealer hand case 6[['JD', 'TD'], 20][['JD', 'TD'], 20]Passed
dealer hand case 7[['AH', 'AD', '9H', '7D'], 18][['AH', 'AD', '9H'], 21]Failed

SHA-256 / 87695b53c5522d456ace190bb436af235c6ace3046d751270d9f276c60eb4159

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    cards, shoe, rule = x
    hand = list(cards)
    pos = 0
    def value(h):
        t = 0
        a = 0
        for c in h:
            if c[0] == 'A':
                a += 1
                t += 1
            elif c[0] in 'TJQK':
                t += 10
            else:
                t += int(c[0])
        soft = a == 1 and t + 10 <= 21
        return (t + 10 if soft else t), soft
    while True:
        t, soft = value(hand)
        if t < 17 or (t == 17 and soft and rule == 'H17'):
            if pos >= len(shoe):
                break
            hand.append(shoe[pos])
            pos += 1
        else:
            break
    t, soft = value(hand)
    return [hand, t]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[['QD', 'AH'], ['3S', '4D', 'JH', '2D', '6C', '2H'], 'S17'], [['QD', 'AH'], 21]], [[['KS', '7S'], ['TC', 'JH', 'AD', '3D', 'KC', 'QD'], 'H17'], [['KS', '7S'], 17]], [[['QS', 'JS'], ['6H', '6D', '3C', '3S', '9D', 'QD'], 'S17'], [['QS', 'JS'], 20]], [[['3H', '7D'], ['3S', '9S', '4D', '2H', '6C', '9H'], 'S17'], [['3H', '7D', '3S', '9S'], 22]], [[['3C', '2D'], ['QS', 'QH', '2C', '8D', 'KC', 'JC'], 'S17'], [['3C', '2D', 'QS', 'QH'], 25]], [[['TC', '6H'], ['TH', '5C', '2D', '7S', '2S', '3S'], 'H17'], [['TC', '6H', 'TH'], 26]], [[['JD', 'TD'], ['2D', '5S', '8D', '6D', 'QH', '6S'], 'H17'], [['JD', 'TD'], 20]], [[['AH', 'AD'], ['9H', '7D', '7C', 'TC', '2D', '9C'], 'H17'], [['AH', 'AD', '9H'], 21]]], [[[['KS', '2D'], ['7D', '7H', '8S', '4H', '8H', 'KC'], 'S17'], [['KS', '2D', '7D'], 19]], [[['TH', '8S'], ['QC', 'QS', 'KH', 'JH', '3D', 'QH'], 'S17'], [['TH', '8S'], 18]], [[['8C', 'QS'], ['AS', 'KC', '5C', '6C', '9S', '6S'], 'S17'], [['8C', 'QS'], 18]], [[['TC', '7H'], ['2S', '8C', 'JC', '7S', '2H', '8H'], 'H17'], [['TC', '7H'], 17]], [[['2C', 'QS'], ['QD', '7D', '9D', '7C', 'KH', 'AS'], 'S17'], [['2C', 'QS', 'QD'], 22]], [[['KC', '9C'], ['2H', 'JD', '2C', 'KS', 'AC', '7C'], 'S17'], [['KC', '9C'], 19]], [[['5C', '5S'], ['AC', '6D', '4S', '4C', 'QH', 'KH'], 'H17'], [['5C', '5S', 'AC'], 21]], [[['5S', 'AH'], ['AC', '4D', '2C'], 'H17'], [['5S', 'AH', 'AC', '4D'], 21]]], [[[['7S', 'AS'], ['8S', 'JC', '6S', '6C', '8H', '3D'], 'H17'], [['7S', 'AS'], 18]], [[['JS', 'QC'], ['AH', '4S', '6C', 'TS', '5D', 'QD'], 'S17'], [['JS', 'QC'], 20]], [[['5C', '7S'], ['4C', 'KH', '9H', 'QC', 'KD', '3D'], 'H17'], [['5C', '7S', '4C', 'KH'], 26]], [[['JD', '7S'], ['7D', 'KH', '5D', '9H', '4D', '3H'], 'S17'], [['JD', '7S'], 17]], [[['KC', 'QH'], ['5H', 'JS', '9S', '6H', '5D', '3C'], 'H17'], [['KC', 'QH'], 20]], [[['TH', '5S'], ['7H', 'JD', '4C', '6D', '7D', 'QC'], 'H17'], [['TH', '5S', '7H'], 22]], [[['AS', 'KS'], ['8H', '9S', '4C', '9H', '2D', '6S'], 'S17'], [['AS', 'KS'], 21]], [[['AS', 'AD'], ['5C', '9D', '5S', '3H'], 'S17'], [['AS', 'AD', '5C'], 17]]], [[[['9H', '7D'], ['QD', '8C', '6D', 'AD', 'JD', 'AS'], 'H17'], [['9H', '7D', 'QD'], 26]], [[['8D', '4H'], ['5H', '2S', 'TS', 'QH', 'TD', '9H'], 'H17'], [['8D', '4H', '5H'], 17]], [[['2D', 'KC'], ['9D', 'AD', 'QC', 'TD', '6C', 'TC'], 'S17'], [['2D', 'KC', '9D'], 21]], [[['5D', '3S'], ['JC', '7S', '4S', '6H', '2D', 'KC'], 'H17'], [['5D', '3S', 'JC'], 18]], [[['8C', 'JS'], ['2C', '2S', '9C', '3C', '4D', 'TH'], 'S17'], [['8C', 'JS'], 18]], [[['5C', 'QD'], ['2H', 'TD', 'TC', '8C', '2C', 'QS'], 'H17'], [['5C', 'QD', '2H'], 17]], [[['AD', 'QH'], ['3S', 'JD', 'TH', '5H', '5C', '7D'], 'H17'], [['AD', 'QH'], 21]], [[['AH', 'AD'], ['9H', '7D', '7C', 'TC', '2D', '9C'], 'H17'], [['AH', 'AD', '9H'], 21]]], [[[['3C', 'TD'], ['4S', '4C', '6S', '6D', '4H', '2S'], 'S17'], [['3C', 'TD', '4S'], 17]], [[['QS', 'JS'], ['8H', '2C', '6H', '5C', 'AH', 'QH'], 'S17'], [['QS', 'JS'], 20]], [[['2C', '9D'], ['7H', '2S', '3S', '4H', '2D', '4S'], 'H17'], [['2C', '9D', '7H'], 18]], [[['3S', '9D'], ['2D', 'KC', '3D', 'TD', 'AS', 'TH'], 'S17'], [['3S', '9D', '2D', 'KC'], 24]], [[['4D', '7S'], ['3S', '8S', '8D', 'QC', 'AH', 'JC'], 'S17'], [['4D', '7S', '3S', '8S'], 22]], [[['7C', '6S'], ['5S', '7D', '9H', '3C', '4S', 'JH'], 'H17'], [['7C', '6S', '5S'], 18]], [[['AS', 'KC'], ['7S', '3S', '2S', 'AC', '9D', '8C'], 'H17'], [['AS', 'KC'], 21]], [[['5S', 'AH'], ['AC', '4D', '2C'], 'H17'], [['5S', 'AH', 'AC', '4D'], 21]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("dealer hand case %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
dealer hand case 0[['QD', 'AH'], 21][['QD', 'AH'], 21]Passed
dealer hand case 1[['KS', '7S'], 17][['KS', '7S'], 17]Passed
dealer hand case 2[['QS', 'JS'], 20][['QS', 'JS'], 20]Passed
dealer hand case 3[['3H', '7D', '3S', '9S'], 22][['3H', '7D', '3S', '9S'], 22]Passed
dealer hand case 4[['3C', '2D', 'QS', 'QH'], 25][['3C', '2D', 'QS', 'QH'], 25]Passed
dealer hand case 5[['TC', '6H', 'TH'], 26][['TC', '6H', 'TH'], 26]Passed
dealer hand case 6[['JD', 'TD'], 20][['JD', 'TD'], 20]Passed
dealer hand case 7[['AH', 'AD', '9H', '7D'], 18][['AH', 'AD', '9H'], 21]Failed

SHA-256 / 3119c43b2b14ed8e184b9ebf302d9eeab9b7f0c9bdc2c68aba13507d646e7f26

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    cards, shoe, rule = x
    hand = list(cards)
    pos = 0
    def value(h):
        t = 0
        a = 0
        for c in h:
            if c[0] == 'A':
                a += 1
                t += 1
            elif c[0] in 'TJQK':
                t += 10
            else:
                t += int(c[0])
        soft = a > 0 and t + 10 <= 21
        return (t + 10 if soft else t), soft
    while True:
        t, soft = value(hand)
        if t < 17 or (t == 17 and soft and rule == 'H17'):
            if pos >= len(shoe):
                break
            hand.append(shoe[pos])
            pos += 1
        else:
            break
    t, soft = value(hand)
    return [hand, t]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[[[['QD', 'AH'], ['3S', '4D', 'JH', '2D', '6C', '2H'], 'S17'], [['QD', 'AH'], 21]], [[['KS', '7S'], ['TC', 'JH', 'AD', '3D', 'KC', 'QD'], 'H17'], [['KS', '7S'], 17]], [[['QS', 'JS'], ['6H', '6D', '3C', '3S', '9D', 'QD'], 'S17'], [['QS', 'JS'], 20]], [[['3H', '7D'], ['3S', '9S', '4D', '2H', '6C', '9H'], 'S17'], [['3H', '7D', '3S', '9S'], 22]], [[['3C', '2D'], ['QS', 'QH', '2C', '8D', 'KC', 'JC'], 'S17'], [['3C', '2D', 'QS', 'QH'], 25]], [[['TC', '6H'], ['TH', '5C', '2D', '7S', '2S', '3S'], 'H17'], [['TC', '6H', 'TH'], 26]], [[['JD', 'TD'], ['2D', '5S', '8D', '6D', 'QH', '6S'], 'H17'], [['JD', 'TD'], 20]], [[['AH', 'AD'], ['9H', '7D', '7C', 'TC', '2D', '9C'], 'H17'], [['AH', 'AD', '9H'], 21]]], [[[['KS', '2D'], ['7D', '7H', '8S', '4H', '8H', 'KC'], 'S17'], [['KS', '2D', '7D'], 19]], [[['TH', '8S'], ['QC', 'QS', 'KH', 'JH', '3D', 'QH'], 'S17'], [['TH', '8S'], 18]], [[['8C', 'QS'], ['AS', 'KC', '5C', '6C', '9S', '6S'], 'S17'], [['8C', 'QS'], 18]], [[['TC', '7H'], ['2S', '8C', 'JC', '7S', '2H', '8H'], 'H17'], [['TC', '7H'], 17]], [[['2C', 'QS'], ['QD', '7D', '9D', '7C', 'KH', 'AS'], 'S17'], [['2C', 'QS', 'QD'], 22]], [[['KC', '9C'], ['2H', 'JD', '2C', 'KS', 'AC', '7C'], 'S17'], [['KC', '9C'], 19]], [[['5C', '5S'], ['AC', '6D', '4S', '4C', 'QH', 'KH'], 'H17'], [['5C', '5S', 'AC'], 21]], [[['5S', 'AH'], ['AC', '4D', '2C'], 'H17'], [['5S', 'AH', 'AC', '4D'], 21]]], [[[['7S', 'AS'], ['8S', 'JC', '6S', '6C', '8H', '3D'], 'H17'], [['7S', 'AS'], 18]], [[['JS', 'QC'], ['AH', '4S', '6C', 'TS', '5D', 'QD'], 'S17'], [['JS', 'QC'], 20]], [[['5C', '7S'], ['4C', 'KH', '9H', 'QC', 'KD', '3D'], 'H17'], [['5C', '7S', '4C', 'KH'], 26]], [[['JD', '7S'], ['7D', 'KH', '5D', '9H', '4D', '3H'], 'S17'], [['JD', '7S'], 17]], [[['KC', 'QH'], ['5H', 'JS', '9S', '6H', '5D', '3C'], 'H17'], [['KC', 'QH'], 20]], [[['TH', '5S'], ['7H', 'JD', '4C', '6D', '7D', 'QC'], 'H17'], [['TH', '5S', '7H'], 22]], [[['AS', 'KS'], ['8H', '9S', '4C', '9H', '2D', '6S'], 'S17'], [['AS', 'KS'], 21]], [[['AS', 'AD'], ['5C', '9D', '5S', '3H'], 'S17'], [['AS', 'AD', '5C'], 17]]], [[[['9H', '7D'], ['QD', '8C', '6D', 'AD', 'JD', 'AS'], 'H17'], [['9H', '7D', 'QD'], 26]], [[['8D', '4H'], ['5H', '2S', 'TS', 'QH', 'TD', '9H'], 'H17'], [['8D', '4H', '5H'], 17]], [[['2D', 'KC'], ['9D', 'AD', 'QC', 'TD', '6C', 'TC'], 'S17'], [['2D', 'KC', '9D'], 21]], [[['5D', '3S'], ['JC', '7S', '4S', '6H', '2D', 'KC'], 'H17'], [['5D', '3S', 'JC'], 18]], [[['8C', 'JS'], ['2C', '2S', '9C', '3C', '4D', 'TH'], 'S17'], [['8C', 'JS'], 18]], [[['5C', 'QD'], ['2H', 'TD', 'TC', '8C', '2C', 'QS'], 'H17'], [['5C', 'QD', '2H'], 17]], [[['AD', 'QH'], ['3S', 'JD', 'TH', '5H', '5C', '7D'], 'H17'], [['AD', 'QH'], 21]], [[['AH', 'AD'], ['9H', '7D', '7C', 'TC', '2D', '9C'], 'H17'], [['AH', 'AD', '9H'], 21]]], [[[['3C', 'TD'], ['4S', '4C', '6S', '6D', '4H', '2S'], 'S17'], [['3C', 'TD', '4S'], 17]], [[['QS', 'JS'], ['8H', '2C', '6H', '5C', 'AH', 'QH'], 'S17'], [['QS', 'JS'], 20]], [[['2C', '9D'], ['7H', '2S', '3S', '4H', '2D', '4S'], 'H17'], [['2C', '9D', '7H'], 18]], [[['3S', '9D'], ['2D', 'KC', '3D', 'TD', 'AS', 'TH'], 'S17'], [['3S', '9D', '2D', 'KC'], 24]], [[['4D', '7S'], ['3S', '8S', '8D', 'QC', 'AH', 'JC'], 'S17'], [['4D', '7S', '3S', '8S'], 22]], [[['7C', '6S'], ['5S', '7D', '9H', '3C', '4S', 'JH'], 'H17'], [['7C', '6S', '5S'], 18]], [[['AS', 'KC'], ['7S', '3S', '2S', 'AC', '9D', '8C'], 'H17'], [['AS', 'KC'], 21]], [[['5S', 'AH'], ['AC', '4D', '2C'], 'H17'], [['5S', 'AH', 'AC', '4D'], 21]]]]
for i, (args, expected) in enumerate(fixtures[N-1]):
    check("dealer hand case %d" % i, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
dealer hand case 0[['QD', 'AH'], 21][['QD', 'AH'], 21]Passed
dealer hand case 1[['KS', '7S'], 17][['KS', '7S'], 17]Passed
dealer hand case 2[['QS', 'JS'], 20][['QS', 'JS'], 20]Passed
dealer hand case 3[['3H', '7D', '3S', '9S'], 22][['3H', '7D', '3S', '9S'], 22]Passed
dealer hand case 4[['3C', '2D', 'QS', 'QH'], 25][['3C', '2D', 'QS', 'QH'], 25]Passed
dealer hand case 5[['TC', '6H', 'TH'], 26][['TC', '6H', 'TH'], 26]Passed
dealer hand case 6[['JD', 'TD'], 20][['JD', 'TD'], 20]Passed
dealer hand case 7[['AH', 'AD', '9H'], 21][['AH', 'AD', '9H'], 21]Passed

SHA-256 / 4c82e64ac1ae67f72d56d1f607c14864b7eaf4a9fd7d2d59a75f782cb43b29ab

Verification & scope

A bounded toy rule contract stated explicitly in the contract field; cards are two-character codes (rank, suit). Not a complete implementation of any published rulebook or casino table rules. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:50:21.267781+00:00.

Case digest / f0bc5052855b2cfbb4207c1fdd69215ac908f51c15eccc4a4b33a1233267007b