FA-85201 / Fantasy sports scoring / Open access
Stumpings earn the bowled/lbw bonus · case 01
Spinners collect 8 extra points for every stumping.
ROOT CAUSE
The bonus set includes stumped dismissals.
VERIFIED REPAIR
Limit the bonus to bowled and lbw.
Unsuccessful approach: Limiting the bonus to bowled alone drops lbw bonuses.
Case contract
Score a T20 bowling spell. Overs use cricket notation ("3.4" = 3 overs and 4 balls, 6 balls per over). Each wicket credited to the bowler scores 25 (run outs are not credited); bowled and lbw earn +8 each; haul bonus for 3/4/5+ credited wickets is 4/8/16 (highest only); maiden +12. Economy (exact runs per 6 balls) applies from 2 full overs (12 balls): <5 +6, <6 +4, <=7 +2, <10 0, <=11 -2, <=12 -4, else -6.
Why this case matters
Bowling points depend on which dismissals are credited and on economy computed from ball counts, not decimal overs.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(spell):
whole, _, part = spell['overs'].partition('.')
balls = int(whole) * 6 + int(part or 0)
wk = [d for d in spell['wickets'] if d != 'run out']
pts = 25 * len(wk)
pts += 8 * sum(1 for d in wk if d in ('bowled', 'lbw', 'stumped'))
if len(wk) >= 5:
pts += 16
elif len(wk) >= 4:
pts += 8
elif len(wk) >= 3:
pts += 4
pts += 12 * spell['maidens']
if balls >= 12:
econ = Fraction(spell['runs'] * 6, balls)
if econ < 5:
pts += 6
elif econ < 6:
pts += 4
elif econ <= 7:
pts += 2
elif econ < 10:
pass
elif econ <= 11:
pts -= 2
elif econ <= 12:
pts -= 4
else:
pts -= 6
return {'balls': balls, 'points': pts}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: bowled lbw bonus set',
[{'maidens': 0, 'overs': '0.4', 'runs': 7, 'wickets': ['caught', 'stumped', 'stumped', 'caught']}],
{'balls': 4, 'points': 108}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 0, 'overs': '0.4', 'runs': 4, 'wickets': ['stumped', 'caught', 'bowled', 'lbw']}],
{'balls': 4, 'points': 124}),
('second regression', [{'maidens': 1, 'overs': '2', 'runs': 12, 'wickets': ['stumped']}],
{'balls': 12, 'points': 39}),
('normal control 1', [{'maidens': 0, 'overs': '3.4', 'runs': 27, 'wickets': ['caught', 'caught']}],
{'balls': 22, 'points': 50}),
('normal control 2', [{'maidens': 1, 'overs': '2', 'runs': 24, 'wickets': ['caught']}],
{'balls': 12, 'points': 33}),
('normal control 3', [{'maidens': 0, 'overs': '2', 'runs': 30, 'wickets': []}],
{'balls': 12, 'points': -6}),
('normal control 4', [{'maidens': 0, 'overs': '2', 'runs': 14, 'wickets': []}],
{'balls': 12, 'points': 2})],
[('regression: bowled lbw bonus set',
[{'maidens': 0,
'overs': '2.0',
'runs': 0,
'wickets': ['caught', 'run out', 'bowled', 'stumped', 'caught']}],
{'balls': 12, 'points': 122}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 0, 'overs': '2.3', 'runs': 30, 'wickets': ['bowled', 'lbw', 'stumped', 'caught']}],
{'balls': 15, 'points': 120}),
('second regression', [{'maidens': 1, 'overs': '1.5', 'runs': 22, 'wickets': ['run out', 'stumped']}],
{'balls': 11, 'points': 37}),
('normal control 1', [{'maidens': 1, 'overs': '2.3', 'runs': 17, 'wickets': []}],
{'balls': 15, 'points': 14}),
('normal control 2', [{'maidens': 0, 'overs': '2', 'runs': 24, 'wickets': ['bowled']}],
{'balls': 12, 'points': 29}),
('normal control 3', [{'maidens': 0, 'overs': '2', 'runs': 33, 'wickets': []}],
{'balls': 12, 'points': -6}),
('normal control 4', [{'maidens': 1, 'overs': '2.3', 'runs': 21, 'wickets': ['run out']}],
{'balls': 15, 'points': 12})],
[('regression: bowled lbw bonus set',
[{'maidens': 1, 'overs': '2.0', 'runs': 14, 'wickets': ['run out', 'stumped', 'lbw', 'bowled']}],
{'balls': 12, 'points': 109}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 1, 'overs': '4', 'runs': 48, 'wickets': ['lbw']}], {'balls': 24, 'points': 41}),
('second regression', [{'maidens': 1, 'overs': '2', 'runs': 32, 'wickets': ['stumped']}],
{'balls': 12, 'points': 31}),
('normal control 1', [{'maidens': 1, 'overs': '0.4', 'runs': 8, 'wickets': []}],
{'balls': 4, 'points': 12}),
('normal control 2', [{'maidens': 0, 'overs': '4', 'runs': 28, 'wickets': []}], {'balls': 24, 'points': 2}),
('normal control 3', [{'maidens': 0, 'overs': '2.3', 'runs': 17, 'wickets': ['bowled', 'caught']}],
{'balls': 15, 'points': 60}),
('normal control 4', [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': ['bowled', 'caught']}],
{'balls': 4, 'points': 70})],
[('regression: bowled lbw bonus set',
[{'maidens': 0,
'overs': '2',
'runs': 12,
'wickets': ['run out', 'caught', 'caught', 'caught', 'stumped']}],
{'balls': 12, 'points': 110}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 1, 'overs': '2', 'runs': 12, 'wickets': ['caught', 'caught', 'stumped', 'lbw', 'lbw']}],
{'balls': 12, 'points': 171}),
('second regression', [{'maidens': 0, 'overs': '1.6', 'runs': 26, 'wickets': ['lbw', 'stumped']}],
{'balls': 12, 'points': 52}),
('normal control 1', [{'maidens': 0, 'overs': '1.5', 'runs': 11, 'wickets': []}],
{'balls': 11, 'points': 0}),
('normal control 2', [{'maidens': 1, 'overs': '2.3', 'runs': 30, 'wickets': ['caught', 'caught']}],
{'balls': 15, 'points': 58}),
('normal control 3', [{'maidens': 0, 'overs': '2', 'runs': 14, 'wickets': ['caught']}],
{'balls': 12, 'points': 27}),
('normal control 4', [{'maidens': 1, 'overs': '1.6', 'runs': 14, 'wickets': ['caught']}],
{'balls': 12, 'points': 39})],
[('regression: bowled lbw bonus set',
[{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': ['stumped', 'stumped', 'bowled', 'run out']}],
{'balls': 22, 'points': 101}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 1, 'overs': '4', 'runs': 13, 'wickets': ['lbw']}], {'balls': 24, 'points': 51}),
('second regression', [{'maidens': 0, 'overs': '0.4', 'runs': 9, 'wickets': ['lbw', 'caught']}],
{'balls': 4, 'points': 58}),
('normal control 1', [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': []}],
{'balls': 4, 'points': 12}),
('normal control 2', [{'maidens': 1, 'overs': '1.6', 'runs': 14, 'wickets': []}],
{'balls': 12, 'points': 14}),
('normal control 3', [{'maidens': 0, 'overs': '2.3', 'runs': 23, 'wickets': ['caught']}],
{'balls': 15, 'points': 25}),
('normal control 4', [{'maidens': 1, 'overs': '1.6', 'runs': 29, 'wickets': []}],
{'balls': 12, 'points': 6})]]
for label, args, expected in fixtures[N-1]:
check(label, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: bowled lbw bonus set | {'balls': 4, 'points': 124} | {'balls': 4, 'points': 108} | Failed |
| partial repair probe: bowled lbw bonus set | {'balls': 4, 'points': 132} | {'balls': 4, 'points': 124} | Failed |
| second regression | {'balls': 12, 'points': 47} | {'balls': 12, 'points': 39} | Failed |
| normal control 1 | {'balls': 22, 'points': 50} | {'balls': 22, 'points': 50} | Passed |
| normal control 2 | {'balls': 12, 'points': 33} | {'balls': 12, 'points': 33} | Passed |
| normal control 3 | {'balls': 12, 'points': -6} | {'balls': 12, 'points': -6} | Passed |
| normal control 4 | {'balls': 12, 'points': 2} | {'balls': 12, 'points': 2} | Passed |
SHA-256 / dc0d853a230414a25cd0f4b72eccda27ca31c27935294c4e5e5330b827b860e9
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(spell):
whole, _, part = spell['overs'].partition('.')
balls = int(whole) * 6 + int(part or 0)
wk = [d for d in spell['wickets'] if d != 'run out']
pts = 25 * len(wk)
pts += 8 * sum(1 for d in wk if d == 'bowled')
if len(wk) >= 5:
pts += 16
elif len(wk) >= 4:
pts += 8
elif len(wk) >= 3:
pts += 4
pts += 12 * spell['maidens']
if balls >= 12:
econ = Fraction(spell['runs'] * 6, balls)
if econ < 5:
pts += 6
elif econ < 6:
pts += 4
elif econ <= 7:
pts += 2
elif econ < 10:
pass
elif econ <= 11:
pts -= 2
elif econ <= 12:
pts -= 4
else:
pts -= 6
return {'balls': balls, 'points': pts}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: bowled lbw bonus set',
[{'maidens': 0, 'overs': '0.4', 'runs': 7, 'wickets': ['caught', 'stumped', 'stumped', 'caught']}],
{'balls': 4, 'points': 108}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 0, 'overs': '0.4', 'runs': 4, 'wickets': ['stumped', 'caught', 'bowled', 'lbw']}],
{'balls': 4, 'points': 124}),
('second regression', [{'maidens': 1, 'overs': '2', 'runs': 12, 'wickets': ['stumped']}],
{'balls': 12, 'points': 39}),
('normal control 1', [{'maidens': 0, 'overs': '3.4', 'runs': 27, 'wickets': ['caught', 'caught']}],
{'balls': 22, 'points': 50}),
('normal control 2', [{'maidens': 1, 'overs': '2', 'runs': 24, 'wickets': ['caught']}],
{'balls': 12, 'points': 33}),
('normal control 3', [{'maidens': 0, 'overs': '2', 'runs': 30, 'wickets': []}],
{'balls': 12, 'points': -6}),
('normal control 4', [{'maidens': 0, 'overs': '2', 'runs': 14, 'wickets': []}],
{'balls': 12, 'points': 2})],
[('regression: bowled lbw bonus set',
[{'maidens': 0,
'overs': '2.0',
'runs': 0,
'wickets': ['caught', 'run out', 'bowled', 'stumped', 'caught']}],
{'balls': 12, 'points': 122}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 0, 'overs': '2.3', 'runs': 30, 'wickets': ['bowled', 'lbw', 'stumped', 'caught']}],
{'balls': 15, 'points': 120}),
('second regression', [{'maidens': 1, 'overs': '1.5', 'runs': 22, 'wickets': ['run out', 'stumped']}],
{'balls': 11, 'points': 37}),
('normal control 1', [{'maidens': 1, 'overs': '2.3', 'runs': 17, 'wickets': []}],
{'balls': 15, 'points': 14}),
('normal control 2', [{'maidens': 0, 'overs': '2', 'runs': 24, 'wickets': ['bowled']}],
{'balls': 12, 'points': 29}),
('normal control 3', [{'maidens': 0, 'overs': '2', 'runs': 33, 'wickets': []}],
{'balls': 12, 'points': -6}),
('normal control 4', [{'maidens': 1, 'overs': '2.3', 'runs': 21, 'wickets': ['run out']}],
{'balls': 15, 'points': 12})],
[('regression: bowled lbw bonus set',
[{'maidens': 1, 'overs': '2.0', 'runs': 14, 'wickets': ['run out', 'stumped', 'lbw', 'bowled']}],
{'balls': 12, 'points': 109}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 1, 'overs': '4', 'runs': 48, 'wickets': ['lbw']}], {'balls': 24, 'points': 41}),
('second regression', [{'maidens': 1, 'overs': '2', 'runs': 32, 'wickets': ['stumped']}],
{'balls': 12, 'points': 31}),
('normal control 1', [{'maidens': 1, 'overs': '0.4', 'runs': 8, 'wickets': []}],
{'balls': 4, 'points': 12}),
('normal control 2', [{'maidens': 0, 'overs': '4', 'runs': 28, 'wickets': []}], {'balls': 24, 'points': 2}),
('normal control 3', [{'maidens': 0, 'overs': '2.3', 'runs': 17, 'wickets': ['bowled', 'caught']}],
{'balls': 15, 'points': 60}),
('normal control 4', [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': ['bowled', 'caught']}],
{'balls': 4, 'points': 70})],
[('regression: bowled lbw bonus set',
[{'maidens': 0,
'overs': '2',
'runs': 12,
'wickets': ['run out', 'caught', 'caught', 'caught', 'stumped']}],
{'balls': 12, 'points': 110}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 1, 'overs': '2', 'runs': 12, 'wickets': ['caught', 'caught', 'stumped', 'lbw', 'lbw']}],
{'balls': 12, 'points': 171}),
('second regression', [{'maidens': 0, 'overs': '1.6', 'runs': 26, 'wickets': ['lbw', 'stumped']}],
{'balls': 12, 'points': 52}),
('normal control 1', [{'maidens': 0, 'overs': '1.5', 'runs': 11, 'wickets': []}],
{'balls': 11, 'points': 0}),
('normal control 2', [{'maidens': 1, 'overs': '2.3', 'runs': 30, 'wickets': ['caught', 'caught']}],
{'balls': 15, 'points': 58}),
('normal control 3', [{'maidens': 0, 'overs': '2', 'runs': 14, 'wickets': ['caught']}],
{'balls': 12, 'points': 27}),
('normal control 4', [{'maidens': 1, 'overs': '1.6', 'runs': 14, 'wickets': ['caught']}],
{'balls': 12, 'points': 39})],
[('regression: bowled lbw bonus set',
[{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': ['stumped', 'stumped', 'bowled', 'run out']}],
{'balls': 22, 'points': 101}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 1, 'overs': '4', 'runs': 13, 'wickets': ['lbw']}], {'balls': 24, 'points': 51}),
('second regression', [{'maidens': 0, 'overs': '0.4', 'runs': 9, 'wickets': ['lbw', 'caught']}],
{'balls': 4, 'points': 58}),
('normal control 1', [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': []}],
{'balls': 4, 'points': 12}),
('normal control 2', [{'maidens': 1, 'overs': '1.6', 'runs': 14, 'wickets': []}],
{'balls': 12, 'points': 14}),
('normal control 3', [{'maidens': 0, 'overs': '2.3', 'runs': 23, 'wickets': ['caught']}],
{'balls': 15, 'points': 25}),
('normal control 4', [{'maidens': 1, 'overs': '1.6', 'runs': 29, 'wickets': []}],
{'balls': 12, 'points': 6})]]
for label, args, expected in fixtures[N-1]:
check(label, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: bowled lbw bonus set | {'balls': 4, 'points': 108} | {'balls': 4, 'points': 108} | Passed |
| partial repair probe: bowled lbw bonus set | {'balls': 4, 'points': 116} | {'balls': 4, 'points': 124} | Failed |
| second regression | {'balls': 12, 'points': 39} | {'balls': 12, 'points': 39} | Passed |
| normal control 1 | {'balls': 22, 'points': 50} | {'balls': 22, 'points': 50} | Passed |
| normal control 2 | {'balls': 12, 'points': 33} | {'balls': 12, 'points': 33} | Passed |
| normal control 3 | {'balls': 12, 'points': -6} | {'balls': 12, 'points': -6} | Passed |
| normal control 4 | {'balls': 12, 'points': 2} | {'balls': 12, 'points': 2} | Passed |
SHA-256 / 2ba6d0427ce4d4d22ac57bf01201a79d43726a936f2d90f8a4db239adc4655f8
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(spell):
whole, _, part = spell['overs'].partition('.')
balls = int(whole) * 6 + int(part or 0)
wk = [d for d in spell['wickets'] if d != 'run out']
pts = 25 * len(wk)
pts += 8 * sum(1 for d in wk if d in ('bowled', 'lbw'))
if len(wk) >= 5:
pts += 16
elif len(wk) >= 4:
pts += 8
elif len(wk) >= 3:
pts += 4
pts += 12 * spell['maidens']
if balls >= 12:
econ = Fraction(spell['runs'] * 6, balls)
if econ < 5:
pts += 6
elif econ < 6:
pts += 4
elif econ <= 7:
pts += 2
elif econ < 10:
pass
elif econ <= 11:
pts -= 2
elif econ <= 12:
pts -= 4
else:
pts -= 6
return {'balls': balls, 'points': pts}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: bowled lbw bonus set',
[{'maidens': 0, 'overs': '0.4', 'runs': 7, 'wickets': ['caught', 'stumped', 'stumped', 'caught']}],
{'balls': 4, 'points': 108}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 0, 'overs': '0.4', 'runs': 4, 'wickets': ['stumped', 'caught', 'bowled', 'lbw']}],
{'balls': 4, 'points': 124}),
('second regression', [{'maidens': 1, 'overs': '2', 'runs': 12, 'wickets': ['stumped']}],
{'balls': 12, 'points': 39}),
('normal control 1', [{'maidens': 0, 'overs': '3.4', 'runs': 27, 'wickets': ['caught', 'caught']}],
{'balls': 22, 'points': 50}),
('normal control 2', [{'maidens': 1, 'overs': '2', 'runs': 24, 'wickets': ['caught']}],
{'balls': 12, 'points': 33}),
('normal control 3', [{'maidens': 0, 'overs': '2', 'runs': 30, 'wickets': []}],
{'balls': 12, 'points': -6}),
('normal control 4', [{'maidens': 0, 'overs': '2', 'runs': 14, 'wickets': []}],
{'balls': 12, 'points': 2})],
[('regression: bowled lbw bonus set',
[{'maidens': 0,
'overs': '2.0',
'runs': 0,
'wickets': ['caught', 'run out', 'bowled', 'stumped', 'caught']}],
{'balls': 12, 'points': 122}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 0, 'overs': '2.3', 'runs': 30, 'wickets': ['bowled', 'lbw', 'stumped', 'caught']}],
{'balls': 15, 'points': 120}),
('second regression', [{'maidens': 1, 'overs': '1.5', 'runs': 22, 'wickets': ['run out', 'stumped']}],
{'balls': 11, 'points': 37}),
('normal control 1', [{'maidens': 1, 'overs': '2.3', 'runs': 17, 'wickets': []}],
{'balls': 15, 'points': 14}),
('normal control 2', [{'maidens': 0, 'overs': '2', 'runs': 24, 'wickets': ['bowled']}],
{'balls': 12, 'points': 29}),
('normal control 3', [{'maidens': 0, 'overs': '2', 'runs': 33, 'wickets': []}],
{'balls': 12, 'points': -6}),
('normal control 4', [{'maidens': 1, 'overs': '2.3', 'runs': 21, 'wickets': ['run out']}],
{'balls': 15, 'points': 12})],
[('regression: bowled lbw bonus set',
[{'maidens': 1, 'overs': '2.0', 'runs': 14, 'wickets': ['run out', 'stumped', 'lbw', 'bowled']}],
{'balls': 12, 'points': 109}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 1, 'overs': '4', 'runs': 48, 'wickets': ['lbw']}], {'balls': 24, 'points': 41}),
('second regression', [{'maidens': 1, 'overs': '2', 'runs': 32, 'wickets': ['stumped']}],
{'balls': 12, 'points': 31}),
('normal control 1', [{'maidens': 1, 'overs': '0.4', 'runs': 8, 'wickets': []}],
{'balls': 4, 'points': 12}),
('normal control 2', [{'maidens': 0, 'overs': '4', 'runs': 28, 'wickets': []}], {'balls': 24, 'points': 2}),
('normal control 3', [{'maidens': 0, 'overs': '2.3', 'runs': 17, 'wickets': ['bowled', 'caught']}],
{'balls': 15, 'points': 60}),
('normal control 4', [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': ['bowled', 'caught']}],
{'balls': 4, 'points': 70})],
[('regression: bowled lbw bonus set',
[{'maidens': 0,
'overs': '2',
'runs': 12,
'wickets': ['run out', 'caught', 'caught', 'caught', 'stumped']}],
{'balls': 12, 'points': 110}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 1, 'overs': '2', 'runs': 12, 'wickets': ['caught', 'caught', 'stumped', 'lbw', 'lbw']}],
{'balls': 12, 'points': 171}),
('second regression', [{'maidens': 0, 'overs': '1.6', 'runs': 26, 'wickets': ['lbw', 'stumped']}],
{'balls': 12, 'points': 52}),
('normal control 1', [{'maidens': 0, 'overs': '1.5', 'runs': 11, 'wickets': []}],
{'balls': 11, 'points': 0}),
('normal control 2', [{'maidens': 1, 'overs': '2.3', 'runs': 30, 'wickets': ['caught', 'caught']}],
{'balls': 15, 'points': 58}),
('normal control 3', [{'maidens': 0, 'overs': '2', 'runs': 14, 'wickets': ['caught']}],
{'balls': 12, 'points': 27}),
('normal control 4', [{'maidens': 1, 'overs': '1.6', 'runs': 14, 'wickets': ['caught']}],
{'balls': 12, 'points': 39})],
[('regression: bowled lbw bonus set',
[{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': ['stumped', 'stumped', 'bowled', 'run out']}],
{'balls': 22, 'points': 101}),
('partial repair probe: bowled lbw bonus set',
[{'maidens': 1, 'overs': '4', 'runs': 13, 'wickets': ['lbw']}], {'balls': 24, 'points': 51}),
('second regression', [{'maidens': 0, 'overs': '0.4', 'runs': 9, 'wickets': ['lbw', 'caught']}],
{'balls': 4, 'points': 58}),
('normal control 1', [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': []}],
{'balls': 4, 'points': 12}),
('normal control 2', [{'maidens': 1, 'overs': '1.6', 'runs': 14, 'wickets': []}],
{'balls': 12, 'points': 14}),
('normal control 3', [{'maidens': 0, 'overs': '2.3', 'runs': 23, 'wickets': ['caught']}],
{'balls': 15, 'points': 25}),
('normal control 4', [{'maidens': 1, 'overs': '1.6', 'runs': 29, 'wickets': []}],
{'balls': 12, 'points': 6})]]
for label, args, expected in fixtures[N-1]:
check(label, 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: bowled lbw bonus set | {'balls': 4, 'points': 108} | {'balls': 4, 'points': 108} | Passed |
| partial repair probe: bowled lbw bonus set | {'balls': 4, 'points': 124} | {'balls': 4, 'points': 124} | Passed |
| second regression | {'balls': 12, 'points': 39} | {'balls': 12, 'points': 39} | Passed |
| normal control 1 | {'balls': 22, 'points': 50} | {'balls': 22, 'points': 50} | Passed |
| normal control 2 | {'balls': 12, 'points': 33} | {'balls': 12, 'points': 33} | Passed |
| normal control 3 | {'balls': 12, 'points': -6} | {'balls': 12, 'points': -6} | Passed |
| normal control 4 | {'balls': 12, 'points': 2} | {'balls': 12, 'points': 2} | Passed |
SHA-256 / 819758f0288c30b5080fcebbe25142c687696f7de8e16b09a4dbd340cdbd7ba0
Verification & scope
A deterministic toy scoring contract stipulated for this example; it is not the rulebook of any real fantasy platform. 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:38.290085+00:00.
Case digest / d2f6765c2015bdf5cd74b570c573fa3358f5e380ee208687d933d198cee42e63