FA-81916 / Poker hand evaluation / Open access
Eight-high low rejected by the qualifier · case 01
An 8-6-4-3-2 low is disqualified and the pot is not split.
ROOT CAUSE
The qualifier uses >= 8, which excludes the eight itself.
VERIFIED REPAIR
Disqualify only when the highest low card exceeds 8.
Unsuccessful approach: Testing the lowest card against the threshold lets K-5-4-3-2 qualify.
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 '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'),
('straight still counts as low',
{'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, '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'),
('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
'none'),
('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'),
('trips disqualify', {'a': ['3h', '3d', '3c', '6s', '8h'], 'b': ['Kh', 'Qd', 'Jd', '9s', '8c']},
'none')],
[('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'),
('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'),
('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
'none'),
('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
'none'),
('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'),
('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'),
('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')]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| wheel is best low | a | a | Passed |
| ace low vs eight low | none | b | Failed |
| pair disqualifies | none | none | Passed |
| eight low qualifies | none | a | Failed |
| nine low misses | none | none | Passed |
| compare from top card | b | b | Passed |
| sum trap | b | b | Passed |
| straight still counts as low | a | a | Passed |
SHA-256 / f7b97108b684af41849a122780e7af91007c79a993104b59a0d93d1899697960
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[-1]>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'),
('straight still counts as low',
{'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, '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'),
('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
'none'),
('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'),
('trips disqualify', {'a': ['3h', '3d', '3c', '6s', '8h'], 'b': ['Kh', 'Qd', 'Jd', '9s', '8c']},
'none')],
[('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'),
('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'),
('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
'none'),
('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
'none'),
('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'),
('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'),
('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')]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| wheel is best low | a | a | Passed |
| ace low vs eight low | b | b | Passed |
| pair disqualifies | b | none | Failed |
| eight low qualifies | a | a | Passed |
| nine low misses | a | none | Failed |
| compare from top card | b | b | Passed |
| sum trap | b | b | Passed |
| straight still counts as low | a | a | Passed |
SHA-256 / fc2ed72b74c931c545a36e4640abf08bd486fcbc64e959fdae80de6609d98151
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'),
('straight still counts as low',
{'a': ['Ah', '2h', '3h', '4h', '5h'], 'b': ['6c', '4d', '3d', '2c', 'Ad']}, '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'),
('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
'none'),
('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'),
('trips disqualify', {'a': ['3h', '3d', '3c', '6s', '8h'], 'b': ['Kh', 'Qd', 'Jd', '9s', '8c']},
'none')],
[('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'),
('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'),
('pair disqualifies', {'a': ['2h', '2d', '4c', '6s', '8h'], 'b': ['Kh', 'Qd', '4d', '5s', '8c']},
'none'),
('nine low misses', {'a': ['9h', '5d', '4c', '3s', '2h'], 'b': ['Th', '5c', '4d', '3c', 'Ac']},
'none'),
('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'),
('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'),
('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')]]
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| wheel is best low | a | a | Passed |
| ace low vs eight low | b | b | Passed |
| pair disqualifies | none | none | Passed |
| eight low qualifies | a | a | Passed |
| nine low misses | none | none | Passed |
| compare from top card | b | b | Passed |
| sum trap | b | b | Passed |
| straight still counts as low | a | a | Passed |
SHA-256 / b27a6b915460c4e91789b365e8c50d93097b75d4e72a2e159d6e60df203a7d71
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.440502+00:00.
Case digest / 6b509a6c663911b5486086e0e00d51745ee36b1d669362e66e75726d14b4c7c6