FAILURE MAP
← Case archive

FA-81931 / Poker hand evaluation / Open access

Non-qualifying hand wins the low half · case 01

When only one player has a qualifying low, the other player is awarded the low.

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

ROOT CAUSE

The one-sided qualification branches return the non-qualifying seat.

VERIFIED REPAIR

When exactly one side qualifies, that side wins the low.

Unsuccessful approach: Returning "none" whenever one side fails leaves a qualified low unpaid.

Case contract

Input: {"a": five cards, "b": five cards}. Ace-to-five low: aces count 1, straights and flushes are ignored, any paired rank disqualifies, the highest card must be 8 or lower to qualify. Compare qualifying lows from the highest card downward; lower wins. Return "a", "b", "tie", or "none" when neither qualifies.

Why this case matters

Hi-lo split games award half the pot from this low comparison.

1 / The failure

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

N = 1
observations = []
def solve(x):
    R='23456789TJQKA'
    def low(h):
        vals=sorted({1 if c[0]=='A' else R.index(c[0])+2 for c in h}, reverse=True)
        if len(vals)<5: return None
        if vals[0]>8: return None
        return vals
    la,lb=low(x['a']),low(x['b'])
    if la is None and lb is None: return 'none'
    if la is None: return 'a'
    if lb is None: return 'b'
    if la==lb: return 'tie'
    return 'a' if la<lb else 'b'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
   'none'),
  ('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('sum trap', {'a': ['8h', '3d', '2c', '4s', 'Ah'], 'b': ['7c', '6d', '5d', '4c', '3c']}, 'b'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b')],
 [('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('sum trap', {'a': ['8h', '3d', '2c', '4s', 'Ah'], 'b': ['7c', '6d', '5d', '4c', '3c']}, 'b'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('six-high straight low',
   {'a': ['2h', '3d', '4c', '5s', '6h'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('flush low', {'a': ['2c', '4c', '5c', '6c', '7c'], 'b': ['8d', '6h', '5d', '4s', '2d']}, 'a'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b')],
 [('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('six-high straight low',
   {'a': ['2h', '3d', '4c', '5s', '6h'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('flush low', {'a': ['2c', '4c', '5c', '6c', '7c'], 'b': ['8d', '6h', '5d', '4s', '2d']}, 'a'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b'),
  ('exact tie', {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['8d', '6c', '4s', '3h', '2c']}, 'tie'),
  ('trips disqualify', {'a': ['3h', '3d', '3c', '6s', '8h'], 'b': ['Kh', 'Qd', 'Jd', '9s', '8c']},
   'none'),
  ('lowest card trap', {'a': ['Kh', '5d', '4c', '3s', '2h'], 'b': ['Qh', 'Jd', 'Tc', '9s', '7c']},
   'none')],
 [('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b'),
  ('exact tie', {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['8d', '6c', '4s', '3h', '2c']}, 'tie'),
  ('trips disqualify', {'a': ['3h', '3d', '3c', '6s', '8h'], 'b': ['Kh', 'Qd', 'Jd', '9s', '8c']},
   'none'),
  ('lowest card trap', {'a': ['Kh', '5d', '4c', '3s', '2h'], 'b': ['Qh', 'Jd', 'Tc', '9s', '7c']},
   'none'),
  ('second card decides',
   {'a': ['8h', '5d', '4c', '3s', '2h'], 'b': ['8d', '6c', '3d', '2c', 'Ac']}, 'a')],
 [('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
   'none'),
  ('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b'),
  ('second card decides',
   {'a': ['8h', '5d', '4c', '3s', '2h'], 'b': ['8d', '6c', '3d', '2c', 'Ac']}, 'a')]]
for label, args, expected in fixtures[N-1]:
    try:
        actual = solve(args)
    except Exception as exc:
        actual = 'error:' + type(exc).__name__
    check(label, actual, 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
wheel is best lowaaPassed
ace low vs eight lowbbPassed
pair disqualifiesnonenonePassed
eight low qualifiesbaFailed
nine low missesnonenonePassed
compare from top cardbbPassed
sum trapbbPassed
only b qualifiesabFailed

SHA-256 / 6cb11bab5d6b33105c5a9a6bbeac1159ee88fd7882800d13537dfca5f59e5fcd

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    R='23456789TJQKA'
    def low(h):
        vals=sorted({1 if c[0]=='A' else R.index(c[0])+2 for c in h}, reverse=True)
        if len(vals)<5: return None
        if vals[0]>8: return None
        return vals
    la,lb=low(x['a']),low(x['b'])
    if la is None and lb is None: return 'none'
    if la is None: return 'none'
    if lb is None: return 'none'
    if la==lb: return 'tie'
    return 'a' if la<lb else 'b'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
   'none'),
  ('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('sum trap', {'a': ['8h', '3d', '2c', '4s', 'Ah'], 'b': ['7c', '6d', '5d', '4c', '3c']}, 'b'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b')],
 [('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('sum trap', {'a': ['8h', '3d', '2c', '4s', 'Ah'], 'b': ['7c', '6d', '5d', '4c', '3c']}, 'b'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('six-high straight low',
   {'a': ['2h', '3d', '4c', '5s', '6h'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('flush low', {'a': ['2c', '4c', '5c', '6c', '7c'], 'b': ['8d', '6h', '5d', '4s', '2d']}, 'a'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b')],
 [('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('six-high straight low',
   {'a': ['2h', '3d', '4c', '5s', '6h'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('flush low', {'a': ['2c', '4c', '5c', '6c', '7c'], 'b': ['8d', '6h', '5d', '4s', '2d']}, 'a'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b'),
  ('exact tie', {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['8d', '6c', '4s', '3h', '2c']}, 'tie'),
  ('trips disqualify', {'a': ['3h', '3d', '3c', '6s', '8h'], 'b': ['Kh', 'Qd', 'Jd', '9s', '8c']},
   'none'),
  ('lowest card trap', {'a': ['Kh', '5d', '4c', '3s', '2h'], 'b': ['Qh', 'Jd', 'Tc', '9s', '7c']},
   'none')],
 [('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b'),
  ('exact tie', {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['8d', '6c', '4s', '3h', '2c']}, 'tie'),
  ('trips disqualify', {'a': ['3h', '3d', '3c', '6s', '8h'], 'b': ['Kh', 'Qd', 'Jd', '9s', '8c']},
   'none'),
  ('lowest card trap', {'a': ['Kh', '5d', '4c', '3s', '2h'], 'b': ['Qh', 'Jd', 'Tc', '9s', '7c']},
   'none'),
  ('second card decides',
   {'a': ['8h', '5d', '4c', '3s', '2h'], 'b': ['8d', '6c', '3d', '2c', 'Ac']}, 'a')],
 [('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
   'none'),
  ('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b'),
  ('second card decides',
   {'a': ['8h', '5d', '4c', '3s', '2h'], 'b': ['8d', '6c', '3d', '2c', 'Ac']}, 'a')]]
for label, args, expected in fixtures[N-1]:
    try:
        actual = solve(args)
    except Exception as exc:
        actual = 'error:' + type(exc).__name__
    check(label, actual, 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
wheel is best lowaaPassed
ace low vs eight lowbbPassed
pair disqualifiesnonenonePassed
eight low qualifiesnoneaFailed
nine low missesnonenonePassed
compare from top cardbbPassed
sum trapbbPassed
only b qualifiesnonebFailed

SHA-256 / 9c1ef230b48c5c08cdfa49d8d286dea0d13cf6413b8e3c3f83cf987033ee98bd

3 / The verified repair

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

N = 1
observations = []
def solve(x):
    R='23456789TJQKA'
    def low(h):
        vals=sorted({1 if c[0]=='A' else R.index(c[0])+2 for c in h}, reverse=True)
        if len(vals)<5: return None
        if vals[0]>8: return None
        return vals
    la,lb=low(x['a']),low(x['b'])
    if la is None and lb is None: return 'none'
    if la is None: return 'b'
    if lb is None: return 'a'
    if la==lb: return 'tie'
    return 'a' if la<lb else 'b'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
   'none'),
  ('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('sum trap', {'a': ['8h', '3d', '2c', '4s', 'Ah'], 'b': ['7c', '6d', '5d', '4c', '3c']}, 'b'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b')],
 [('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('sum trap', {'a': ['8h', '3d', '2c', '4s', 'Ah'], 'b': ['7c', '6d', '5d', '4c', '3c']}, 'b'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('six-high straight low',
   {'a': ['2h', '3d', '4c', '5s', '6h'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('flush low', {'a': ['2c', '4c', '5c', '6c', '7c'], 'b': ['8d', '6h', '5d', '4s', '2d']}, 'a'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b')],
 [('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('straight still counts as low',
   {'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('six-high straight low',
   {'a': ['2h', '3d', '4c', '5s', '6h'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'a'),
  ('flush low', {'a': ['2c', '4c', '5c', '6c', '7c'], 'b': ['8d', '6h', '5d', '4s', '2d']}, 'a'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b'),
  ('exact tie', {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['8d', '6c', '4s', '3h', '2c']}, 'tie'),
  ('trips disqualify', {'a': ['3h', '3d', '3c', '6s', '8h'], 'b': ['Kh', 'Qd', 'Jd', '9s', '8c']},
   'none'),
  ('lowest card trap', {'a': ['Kh', '5d', '4c', '3s', '2h'], 'b': ['Qh', 'Jd', 'Tc', '9s', '7c']},
   'none')],
 [('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b'),
  ('exact tie', {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['8d', '6c', '4s', '3h', '2c']}, 'tie'),
  ('trips disqualify', {'a': ['3h', '3d', '3c', '6s', '8h'], 'b': ['Kh', 'Qd', 'Jd', '9s', '8c']},
   'none'),
  ('lowest card trap', {'a': ['Kh', '5d', '4c', '3s', '2h'], 'b': ['Qh', 'Jd', 'Tc', '9s', '7c']},
   'none'),
  ('second card decides',
   {'a': ['8h', '5d', '4c', '3s', '2h'], 'b': ['8d', '6c', '3d', '2c', 'Ac']}, 'a')],
 [('wheel is best low', {'a': ['Ah', '2d', '3c', '4s', '5h'], 'b': ['2h', '3d', '4c', '5s', '7h']},
   'a'),
  ('ace low vs eight low',
   {'a': ['Ah', '2d', '4c', '6s', '8h'], 'b': ['2h', '3d', '4d', '5s', '8c']}, 'b'),
  ('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
   'none'),
  ('eight low qualifies',
   {'a': ['8h', '6d', '4c', '3s', '2h'], 'b': ['9h', '5d', '4d', '3c', '2c']}, 'a'),
  ('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
   'none'),
  ('compare from top card',
   {'a': ['7h', '6d', '5c', '2s', 'Ah'], 'b': ['7c', '4d', '3d', '2c', 'Ad']}, 'b'),
  ('only b qualifies', {'a': ['Kh', 'Qd', 'Jc', 'Ts', '9h'], 'b': ['8d', '7h', '5d', '4s', '2d']},
   'b'),
  ('second card decides',
   {'a': ['8h', '5d', '4c', '3s', '2h'], 'b': ['8d', '6c', '3d', '2c', 'Ac']}, 'a')]]
for label, args, expected in fixtures[N-1]:
    try:
        actual = solve(args)
    except Exception as exc:
        actual = 'error:' + type(exc).__name__
    check(label, actual, 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
wheel is best lowaaPassed
ace low vs eight lowbbPassed
pair disqualifiesnonenonePassed
eight low qualifiesaaPassed
nine low missesnonenonePassed
compare from top cardbbPassed
sum trapbbPassed
only b qualifiesbbPassed

SHA-256 / f9ba8ad67050ec37b2b1f182cae382103d44aa5253c38764bbc7f1c59de6774a

Verification & scope

A deterministic toy model with an explicitly stated contract; card strings are rank+suit (for example "As", "Td", "10h"); no claim of conformance to any casino or tournament rulebook. 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:07.577696+00:00.

Case digest / 860c8002c3195ca67cd2bf636641324867c83f94c20082941538332c9e273b34