FA-85196 / Fantasy sports scoring / Open access
Run outs credited to the bowler · case 01
A bowler earns 25 points for a run out effected by a fielder.
ROOT CAUSE
The wicket list is used without removing run outs.
VERIFIED REPAIR
Credit only dismissals other than run outs.
Unsuccessful approach: Also excluding stumpings removes wickets the bowler is credited with.
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 = list(spell['wickets'])
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: run-out credit', [{'maidens': 1, 'overs': '1.5', 'runs': 11, 'wickets': ['run out', 'lbw']}],
{'balls': 11, 'points': 45}),
('partial repair probe: run-out credit',
[{'maidens': 0, 'overs': '0.4', 'runs': 9, 'wickets': ['caught', 'run out', 'stumped', 'lbw']}],
{'balls': 4, 'points': 87}),
('second regression', [{'maidens': 0, 'overs': '0.4', 'runs': 4, 'wickets': ['stumped']}],
{'balls': 4, 'points': 25}),
('normal control 1',
[{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['bowled', 'bowled', 'caught', 'bowled']}],
{'balls': 11, 'points': 144}),
('normal control 2', [{'maidens': 1, 'overs': '2', 'runs': 24, 'wickets': []}], {'balls': 12, 'points': 8}),
('normal control 3',
[{'maidens': 1, 'overs': '2.0', 'runs': 12, 'wickets': ['caught', 'bowled', 'caught']}],
{'balls': 12, 'points': 101}),
('normal control 4', [{'maidens': 0, 'overs': '0.4', 'runs': 8, 'wickets': []}],
{'balls': 4, 'points': 0})],
[('regression: run-out credit', [{'maidens': 0, 'overs': '1.5', 'runs': 20, 'wickets': ['run out']}],
{'balls': 11, 'points': 0}),
('partial repair probe: run-out credit',
[{'maidens': 1, 'overs': '2.0', 'runs': 9, 'wickets': ['stumped', 'lbw', 'stumped', 'caught', 'lbw']}],
{'balls': 12, 'points': 175}),
('second regression',
[{'maidens': 1, 'overs': '1.5', 'runs': 16, 'wickets': ['lbw', 'stumped', 'lbw', 'stumped', 'lbw']}],
{'balls': 11, 'points': 177}),
('normal control 1', [{'maidens': 1, 'overs': '2.0', 'runs': 14, 'wickets': []}],
{'balls': 12, 'points': 14}),
('normal control 2',
[{'maidens': 1, 'overs': '1.5', 'runs': 22, 'wickets': ['caught', 'caught', 'caught', 'lbw', 'caught']}],
{'balls': 11, 'points': 161}),
('normal control 3',
[{'maidens': 0, 'overs': '1.5', 'runs': 22, 'wickets': ['caught', 'caught', 'bowled']}],
{'balls': 11, 'points': 87}),
('normal control 4', [{'maidens': 0, 'overs': '1.5', 'runs': 10, 'wickets': []}],
{'balls': 11, 'points': 0})],
[('regression: run-out credit',
[{'maidens': 0, 'overs': '2', 'runs': 24, 'wickets': ['caught', 'run out', 'run out', 'caught']}],
{'balls': 12, 'points': 46}),
('partial repair probe: run-out credit',
[{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['lbw', 'run out', 'caught', 'lbw', 'stumped']}],
{'balls': 12, 'points': 132}),
('second regression',
[{'maidens': 1,
'overs': '2.3',
'runs': 45,
'wickets': ['stumped', 'run out', 'bowled', 'run out', 'run out']}],
{'balls': 15, 'points': 64}),
('normal control 1',
[{'maidens': 1, 'overs': '2.3', 'runs': 17, 'wickets': ['lbw', 'bowled', 'caught', 'bowled', 'caught']}],
{'balls': 15, 'points': 179}),
('normal control 2', [{'maidens': 0, 'overs': '2', 'runs': 12, 'wickets': []}], {'balls': 12, 'points': 2}),
('normal control 3', [{'maidens': 0, 'overs': '2.3', 'runs': 8, 'wickets': []}],
{'balls': 15, 'points': 6}),
('normal control 4', [{'maidens': 0, 'overs': '2', 'runs': 34, 'wickets': []}],
{'balls': 12, 'points': -6})],
[('regression: run-out credit',
[{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['run out', 'bowled']}],
{'balls': 12, 'points': 41}),
('partial repair probe: run-out credit',
[{'maidens': 1, 'overs': '4', 'runs': 48, 'wickets': ['stumped', 'caught']}],
{'balls': 24, 'points': 58}),
('second regression',
[{'maidens': 0, 'overs': '4', 'runs': 58, 'wickets': ['stumped', 'stumped', 'caught', 'lbw']}],
{'balls': 24, 'points': 110}),
('normal control 1',
[{'maidens': 0, 'overs': '2.0', 'runs': 24, 'wickets': ['lbw', 'caught', 'caught', 'caught', 'lbw']}],
{'balls': 12, 'points': 153}),
('normal control 2', [{'maidens': 0, 'overs': '0.4', 'runs': 8, 'wickets': []}], {'balls': 4, 'points': 0}),
('normal control 3',
[{'maidens': 1, 'overs': '1.6', 'runs': 24, 'wickets': ['lbw', 'lbw', 'bowled', 'caught', 'bowled']}],
{'balls': 12, 'points': 181}),
('normal control 4', [{'maidens': 0, 'overs': '0.4', 'runs': 2, 'wickets': ['caught']}],
{'balls': 4, 'points': 25})],
[('regression: run-out credit',
[{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['run out', 'run out', 'bowled']}],
{'balls': 12, 'points': 41}),
('partial repair probe: run-out credit',
[{'maidens': 0, 'overs': '1.5', 'runs': 12, 'wickets': ['stumped', 'stumped']}],
{'balls': 11, 'points': 50}),
('second regression',
[{'maidens': 1,
'overs': '3.4',
'runs': 47,
'wickets': ['caught', 'caught', 'run out', 'stumped', 'run out']}],
{'balls': 22, 'points': 85}),
('normal control 1', [{'maidens': 1, 'overs': '2', 'runs': 14, 'wickets': []}],
{'balls': 12, 'points': 14}),
('normal control 2',
[{'maidens': 1, 'overs': '0.4', 'runs': 6, 'wickets': ['bowled', 'lbw', 'lbw', 'caught']}],
{'balls': 4, 'points': 144}),
('normal control 3', [{'maidens': 1, 'overs': '2.3', 'runs': 30, 'wickets': ['lbw', 'bowled']}],
{'balls': 15, 'points': 74}),
('normal control 4', [{'maidens': 0, 'overs': '2', 'runs': 14, 'wickets': ['caught', 'caught', 'bowled']}],
{'balls': 12, 'points': 89})]]
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: run-out credit | {'balls': 11, 'points': 70} | {'balls': 11, 'points': 45} | Failed |
| partial repair probe: run-out credit | {'balls': 4, 'points': 116} | {'balls': 4, 'points': 87} | Failed |
| second regression | {'balls': 4, 'points': 25} | {'balls': 4, 'points': 25} | Passed |
| normal control 1 | {'balls': 11, 'points': 144} | {'balls': 11, 'points': 144} | Passed |
| normal control 2 | {'balls': 12, 'points': 8} | {'balls': 12, 'points': 8} | Passed |
| normal control 3 | {'balls': 12, 'points': 101} | {'balls': 12, 'points': 101} | Passed |
| normal control 4 | {'balls': 4, 'points': 0} | {'balls': 4, 'points': 0} | Passed |
SHA-256 / 0e083789ceca6be4b91a26c00b21bd0edf795173008af4ee7e10c54ec8aeabb3
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 not in ('run out', 'stumped')]
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: run-out credit', [{'maidens': 1, 'overs': '1.5', 'runs': 11, 'wickets': ['run out', 'lbw']}],
{'balls': 11, 'points': 45}),
('partial repair probe: run-out credit',
[{'maidens': 0, 'overs': '0.4', 'runs': 9, 'wickets': ['caught', 'run out', 'stumped', 'lbw']}],
{'balls': 4, 'points': 87}),
('second regression', [{'maidens': 0, 'overs': '0.4', 'runs': 4, 'wickets': ['stumped']}],
{'balls': 4, 'points': 25}),
('normal control 1',
[{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['bowled', 'bowled', 'caught', 'bowled']}],
{'balls': 11, 'points': 144}),
('normal control 2', [{'maidens': 1, 'overs': '2', 'runs': 24, 'wickets': []}], {'balls': 12, 'points': 8}),
('normal control 3',
[{'maidens': 1, 'overs': '2.0', 'runs': 12, 'wickets': ['caught', 'bowled', 'caught']}],
{'balls': 12, 'points': 101}),
('normal control 4', [{'maidens': 0, 'overs': '0.4', 'runs': 8, 'wickets': []}],
{'balls': 4, 'points': 0})],
[('regression: run-out credit', [{'maidens': 0, 'overs': '1.5', 'runs': 20, 'wickets': ['run out']}],
{'balls': 11, 'points': 0}),
('partial repair probe: run-out credit',
[{'maidens': 1, 'overs': '2.0', 'runs': 9, 'wickets': ['stumped', 'lbw', 'stumped', 'caught', 'lbw']}],
{'balls': 12, 'points': 175}),
('second regression',
[{'maidens': 1, 'overs': '1.5', 'runs': 16, 'wickets': ['lbw', 'stumped', 'lbw', 'stumped', 'lbw']}],
{'balls': 11, 'points': 177}),
('normal control 1', [{'maidens': 1, 'overs': '2.0', 'runs': 14, 'wickets': []}],
{'balls': 12, 'points': 14}),
('normal control 2',
[{'maidens': 1, 'overs': '1.5', 'runs': 22, 'wickets': ['caught', 'caught', 'caught', 'lbw', 'caught']}],
{'balls': 11, 'points': 161}),
('normal control 3',
[{'maidens': 0, 'overs': '1.5', 'runs': 22, 'wickets': ['caught', 'caught', 'bowled']}],
{'balls': 11, 'points': 87}),
('normal control 4', [{'maidens': 0, 'overs': '1.5', 'runs': 10, 'wickets': []}],
{'balls': 11, 'points': 0})],
[('regression: run-out credit',
[{'maidens': 0, 'overs': '2', 'runs': 24, 'wickets': ['caught', 'run out', 'run out', 'caught']}],
{'balls': 12, 'points': 46}),
('partial repair probe: run-out credit',
[{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['lbw', 'run out', 'caught', 'lbw', 'stumped']}],
{'balls': 12, 'points': 132}),
('second regression',
[{'maidens': 1,
'overs': '2.3',
'runs': 45,
'wickets': ['stumped', 'run out', 'bowled', 'run out', 'run out']}],
{'balls': 15, 'points': 64}),
('normal control 1',
[{'maidens': 1, 'overs': '2.3', 'runs': 17, 'wickets': ['lbw', 'bowled', 'caught', 'bowled', 'caught']}],
{'balls': 15, 'points': 179}),
('normal control 2', [{'maidens': 0, 'overs': '2', 'runs': 12, 'wickets': []}], {'balls': 12, 'points': 2}),
('normal control 3', [{'maidens': 0, 'overs': '2.3', 'runs': 8, 'wickets': []}],
{'balls': 15, 'points': 6}),
('normal control 4', [{'maidens': 0, 'overs': '2', 'runs': 34, 'wickets': []}],
{'balls': 12, 'points': -6})],
[('regression: run-out credit',
[{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['run out', 'bowled']}],
{'balls': 12, 'points': 41}),
('partial repair probe: run-out credit',
[{'maidens': 1, 'overs': '4', 'runs': 48, 'wickets': ['stumped', 'caught']}],
{'balls': 24, 'points': 58}),
('second regression',
[{'maidens': 0, 'overs': '4', 'runs': 58, 'wickets': ['stumped', 'stumped', 'caught', 'lbw']}],
{'balls': 24, 'points': 110}),
('normal control 1',
[{'maidens': 0, 'overs': '2.0', 'runs': 24, 'wickets': ['lbw', 'caught', 'caught', 'caught', 'lbw']}],
{'balls': 12, 'points': 153}),
('normal control 2', [{'maidens': 0, 'overs': '0.4', 'runs': 8, 'wickets': []}], {'balls': 4, 'points': 0}),
('normal control 3',
[{'maidens': 1, 'overs': '1.6', 'runs': 24, 'wickets': ['lbw', 'lbw', 'bowled', 'caught', 'bowled']}],
{'balls': 12, 'points': 181}),
('normal control 4', [{'maidens': 0, 'overs': '0.4', 'runs': 2, 'wickets': ['caught']}],
{'balls': 4, 'points': 25})],
[('regression: run-out credit',
[{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['run out', 'run out', 'bowled']}],
{'balls': 12, 'points': 41}),
('partial repair probe: run-out credit',
[{'maidens': 0, 'overs': '1.5', 'runs': 12, 'wickets': ['stumped', 'stumped']}],
{'balls': 11, 'points': 50}),
('second regression',
[{'maidens': 1,
'overs': '3.4',
'runs': 47,
'wickets': ['caught', 'caught', 'run out', 'stumped', 'run out']}],
{'balls': 22, 'points': 85}),
('normal control 1', [{'maidens': 1, 'overs': '2', 'runs': 14, 'wickets': []}],
{'balls': 12, 'points': 14}),
('normal control 2',
[{'maidens': 1, 'overs': '0.4', 'runs': 6, 'wickets': ['bowled', 'lbw', 'lbw', 'caught']}],
{'balls': 4, 'points': 144}),
('normal control 3', [{'maidens': 1, 'overs': '2.3', 'runs': 30, 'wickets': ['lbw', 'bowled']}],
{'balls': 15, 'points': 74}),
('normal control 4', [{'maidens': 0, 'overs': '2', 'runs': 14, 'wickets': ['caught', 'caught', 'bowled']}],
{'balls': 12, 'points': 89})]]
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: run-out credit | {'balls': 11, 'points': 45} | {'balls': 11, 'points': 45} | Passed |
| partial repair probe: run-out credit | {'balls': 4, 'points': 58} | {'balls': 4, 'points': 87} | Failed |
| second regression | {'balls': 4, 'points': 0} | {'balls': 4, 'points': 25} | Failed |
| normal control 1 | {'balls': 11, 'points': 144} | {'balls': 11, 'points': 144} | Passed |
| normal control 2 | {'balls': 12, 'points': 8} | {'balls': 12, 'points': 8} | Passed |
| normal control 3 | {'balls': 12, 'points': 101} | {'balls': 12, 'points': 101} | Passed |
| normal control 4 | {'balls': 4, 'points': 0} | {'balls': 4, 'points': 0} | Passed |
SHA-256 / 09535f88b4681797f2ff11e4d6c758c0dfc7c10f869f729221e9b180eb340254
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: run-out credit', [{'maidens': 1, 'overs': '1.5', 'runs': 11, 'wickets': ['run out', 'lbw']}],
{'balls': 11, 'points': 45}),
('partial repair probe: run-out credit',
[{'maidens': 0, 'overs': '0.4', 'runs': 9, 'wickets': ['caught', 'run out', 'stumped', 'lbw']}],
{'balls': 4, 'points': 87}),
('second regression', [{'maidens': 0, 'overs': '0.4', 'runs': 4, 'wickets': ['stumped']}],
{'balls': 4, 'points': 25}),
('normal control 1',
[{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['bowled', 'bowled', 'caught', 'bowled']}],
{'balls': 11, 'points': 144}),
('normal control 2', [{'maidens': 1, 'overs': '2', 'runs': 24, 'wickets': []}], {'balls': 12, 'points': 8}),
('normal control 3',
[{'maidens': 1, 'overs': '2.0', 'runs': 12, 'wickets': ['caught', 'bowled', 'caught']}],
{'balls': 12, 'points': 101}),
('normal control 4', [{'maidens': 0, 'overs': '0.4', 'runs': 8, 'wickets': []}],
{'balls': 4, 'points': 0})],
[('regression: run-out credit', [{'maidens': 0, 'overs': '1.5', 'runs': 20, 'wickets': ['run out']}],
{'balls': 11, 'points': 0}),
('partial repair probe: run-out credit',
[{'maidens': 1, 'overs': '2.0', 'runs': 9, 'wickets': ['stumped', 'lbw', 'stumped', 'caught', 'lbw']}],
{'balls': 12, 'points': 175}),
('second regression',
[{'maidens': 1, 'overs': '1.5', 'runs': 16, 'wickets': ['lbw', 'stumped', 'lbw', 'stumped', 'lbw']}],
{'balls': 11, 'points': 177}),
('normal control 1', [{'maidens': 1, 'overs': '2.0', 'runs': 14, 'wickets': []}],
{'balls': 12, 'points': 14}),
('normal control 2',
[{'maidens': 1, 'overs': '1.5', 'runs': 22, 'wickets': ['caught', 'caught', 'caught', 'lbw', 'caught']}],
{'balls': 11, 'points': 161}),
('normal control 3',
[{'maidens': 0, 'overs': '1.5', 'runs': 22, 'wickets': ['caught', 'caught', 'bowled']}],
{'balls': 11, 'points': 87}),
('normal control 4', [{'maidens': 0, 'overs': '1.5', 'runs': 10, 'wickets': []}],
{'balls': 11, 'points': 0})],
[('regression: run-out credit',
[{'maidens': 0, 'overs': '2', 'runs': 24, 'wickets': ['caught', 'run out', 'run out', 'caught']}],
{'balls': 12, 'points': 46}),
('partial repair probe: run-out credit',
[{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['lbw', 'run out', 'caught', 'lbw', 'stumped']}],
{'balls': 12, 'points': 132}),
('second regression',
[{'maidens': 1,
'overs': '2.3',
'runs': 45,
'wickets': ['stumped', 'run out', 'bowled', 'run out', 'run out']}],
{'balls': 15, 'points': 64}),
('normal control 1',
[{'maidens': 1, 'overs': '2.3', 'runs': 17, 'wickets': ['lbw', 'bowled', 'caught', 'bowled', 'caught']}],
{'balls': 15, 'points': 179}),
('normal control 2', [{'maidens': 0, 'overs': '2', 'runs': 12, 'wickets': []}], {'balls': 12, 'points': 2}),
('normal control 3', [{'maidens': 0, 'overs': '2.3', 'runs': 8, 'wickets': []}],
{'balls': 15, 'points': 6}),
('normal control 4', [{'maidens': 0, 'overs': '2', 'runs': 34, 'wickets': []}],
{'balls': 12, 'points': -6})],
[('regression: run-out credit',
[{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['run out', 'bowled']}],
{'balls': 12, 'points': 41}),
('partial repair probe: run-out credit',
[{'maidens': 1, 'overs': '4', 'runs': 48, 'wickets': ['stumped', 'caught']}],
{'balls': 24, 'points': 58}),
('second regression',
[{'maidens': 0, 'overs': '4', 'runs': 58, 'wickets': ['stumped', 'stumped', 'caught', 'lbw']}],
{'balls': 24, 'points': 110}),
('normal control 1',
[{'maidens': 0, 'overs': '2.0', 'runs': 24, 'wickets': ['lbw', 'caught', 'caught', 'caught', 'lbw']}],
{'balls': 12, 'points': 153}),
('normal control 2', [{'maidens': 0, 'overs': '0.4', 'runs': 8, 'wickets': []}], {'balls': 4, 'points': 0}),
('normal control 3',
[{'maidens': 1, 'overs': '1.6', 'runs': 24, 'wickets': ['lbw', 'lbw', 'bowled', 'caught', 'bowled']}],
{'balls': 12, 'points': 181}),
('normal control 4', [{'maidens': 0, 'overs': '0.4', 'runs': 2, 'wickets': ['caught']}],
{'balls': 4, 'points': 25})],
[('regression: run-out credit',
[{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['run out', 'run out', 'bowled']}],
{'balls': 12, 'points': 41}),
('partial repair probe: run-out credit',
[{'maidens': 0, 'overs': '1.5', 'runs': 12, 'wickets': ['stumped', 'stumped']}],
{'balls': 11, 'points': 50}),
('second regression',
[{'maidens': 1,
'overs': '3.4',
'runs': 47,
'wickets': ['caught', 'caught', 'run out', 'stumped', 'run out']}],
{'balls': 22, 'points': 85}),
('normal control 1', [{'maidens': 1, 'overs': '2', 'runs': 14, 'wickets': []}],
{'balls': 12, 'points': 14}),
('normal control 2',
[{'maidens': 1, 'overs': '0.4', 'runs': 6, 'wickets': ['bowled', 'lbw', 'lbw', 'caught']}],
{'balls': 4, 'points': 144}),
('normal control 3', [{'maidens': 1, 'overs': '2.3', 'runs': 30, 'wickets': ['lbw', 'bowled']}],
{'balls': 15, 'points': 74}),
('normal control 4', [{'maidens': 0, 'overs': '2', 'runs': 14, 'wickets': ['caught', 'caught', 'bowled']}],
{'balls': 12, 'points': 89})]]
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: run-out credit | {'balls': 11, 'points': 45} | {'balls': 11, 'points': 45} | Passed |
| partial repair probe: run-out credit | {'balls': 4, 'points': 87} | {'balls': 4, 'points': 87} | Passed |
| second regression | {'balls': 4, 'points': 25} | {'balls': 4, 'points': 25} | Passed |
| normal control 1 | {'balls': 11, 'points': 144} | {'balls': 11, 'points': 144} | Passed |
| normal control 2 | {'balls': 12, 'points': 8} | {'balls': 12, 'points': 8} | Passed |
| normal control 3 | {'balls': 12, 'points': 101} | {'balls': 12, 'points': 101} | Passed |
| normal control 4 | {'balls': 4, 'points': 0} | {'balls': 4, 'points': 0} | Passed |
SHA-256 / cefa347efe50b3778e5f3172c59a89d2b9a89b291280e7caaf76060a2a2e537d
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.104224+00:00.
Case digest / 2cfe5cba39689f70766112df5198a7cb83506f7c69d4b85574f17cd01d28ebea