FAILURE MAP
← Case archive

FA-85211 / Fantasy sports scoring / Open access

Economy divides by the overs string as a decimal · case 01

2.3 overs is treated as 2.3 overs rather than 2.5, inflating economy.

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

ROOT CAUSE

Economy uses the cricket notation as a decimal number of overs.

VERIFIED REPAIR

Divide runs by balls and scale by six.

Unsuccessful approach: Ignoring the balls of the partial over overstates economy.

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'))
    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']) / Fraction(spell['overs'])
        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: economy from decimal overs',
   [{'maidens': 1, 'overs': '1.6', 'runs': 13, 'wickets': ['stumped', 'lbw', 'bowled', 'caught', 'run out']}],
   {'balls': 12, 'points': 138}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': ['bowled']}], {'balls': 22, 'points': 47}),
  ('second regression', [{'maidens': 1, 'overs': '3.4', 'runs': 44, 'wickets': ['lbw']}],
   {'balls': 22, 'points': 41}),
  ('normal control 1',
   [{'maidens': 0, 'overs': '0.4', 'runs': 8, 'wickets': ['lbw', 'run out', 'stumped', 'caught']}],
   {'balls': 4, 'points': 87}),
  ('normal control 2',
   [{'maidens': 0, 'overs': '4', 'runs': 28, 'wickets': ['caught', 'run out', 'run out']}],
   {'balls': 24, 'points': 27}),
  ('normal control 3',
   [{'maidens': 0, 'overs': '2', 'runs': 24, 'wickets': ['stumped', 'caught', 'caught', 'caught']}],
   {'balls': 12, 'points': 104}),
  ('normal control 4', [{'maidens': 0, 'overs': '1.5', 'runs': 22, 'wickets': ['caught']}],
   {'balls': 11, 'points': 25})],
 [('regression: economy from decimal overs', [{'maidens': 1, 'overs': '2.3', 'runs': 30, 'wickets': []}],
   {'balls': 15, 'points': 8}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 0, 'overs': '3.4', 'runs': 22, 'wickets': ['run out']}], {'balls': 22, 'points': 2}),
  ('second regression', [{'maidens': 0, 'overs': '1.6', 'runs': 14, 'wickets': ['caught']}],
   {'balls': 12, 'points': 27}),
  ('normal control 1', [{'maidens': 0, 'overs': '2.0', 'runs': 24, 'wickets': ['run out']}],
   {'balls': 12, 'points': -4}),
  ('normal control 2',
   [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': ['stumped', 'lbw', 'run out', 'lbw']}],
   {'balls': 4, 'points': 107}),
  ('normal control 3', [{'maidens': 0, 'overs': '2', 'runs': 3, 'wickets': []}], {'balls': 12, 'points': 6}),
  ('normal control 4', [{'maidens': 1, 'overs': '0.4', 'runs': 9, 'wickets': ['caught']}],
   {'balls': 4, 'points': 37})],
 [('regression: economy from decimal overs',
   [{'maidens': 0, 'overs': '1.6', 'runs': 14, 'wickets': ['bowled', 'caught']}],
   {'balls': 12, 'points': 60}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 1, 'overs': '1.6', 'runs': 24, 'wickets': []}], {'balls': 12, 'points': 8}),
  ('second regression', [{'maidens': 0, 'overs': '1.6', 'runs': 24, 'wickets': ['lbw']}],
   {'balls': 12, 'points': 29}),
  ('normal control 1',
   [{'maidens': 0, 'overs': '2.0', 'runs': 14, 'wickets': ['bowled', 'bowled', 'lbw', 'lbw']}],
   {'balls': 12, 'points': 142}),
  ('normal control 2', [{'maidens': 0, 'overs': '0.4', 'runs': 6, 'wickets': []}], {'balls': 4, 'points': 0}),
  ('normal control 3', [{'maidens': 1, 'overs': '2.0', 'runs': 14, 'wickets': ['run out', 'lbw']}],
   {'balls': 12, 'points': 47}),
  ('normal control 4',
   [{'maidens': 1, 'overs': '4', 'runs': 28, 'wickets': ['lbw', 'caught', 'caught', 'run out', 'stumped']}],
   {'balls': 24, 'points': 130})],
 [('regression: economy from decimal overs', [{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': []}],
   {'balls': 22, 'points': 14}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': ['caught', 'lbw', 'stumped', 'run out', 'lbw']}],
   {'balls': 22, 'points': 138}),
  ('second regression',
   [{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': ['lbw', 'caught', 'stumped', 'bowled']}],
   {'balls': 22, 'points': 138}),
  ('normal control 1',
   [{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['caught', 'caught', 'run out']}],
   {'balls': 12, 'points': 58}),
  ('normal control 2',
   [{'maidens': 0, 'overs': '2', 'runs': 14, 'wickets': ['lbw', 'caught', 'stumped', 'run out', 'caught']}],
   {'balls': 12, 'points': 118}),
  ('normal control 3',
   [{'maidens': 1, 'overs': '4', 'runs': 24, 'wickets': ['bowled', 'stumped', 'caught', 'lbw', 'bowled']}],
   {'balls': 24, 'points': 179}),
  ('normal control 4', [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['bowled', 'bowled']}],
   {'balls': 11, 'points': 78})],
 [('regression: economy from decimal overs',
   [{'maidens': 1, 'overs': '1.6', 'runs': 24, 'wickets': ['caught', 'lbw', 'caught', 'run out']}],
   {'balls': 12, 'points': 95}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 1, 'overs': '1.6', 'runs': 6, 'wickets': []}], {'balls': 12, 'points': 18}),
  ('second regression',
   [{'maidens': 1, 'overs': '2.3', 'runs': 15, 'wickets': ['stumped', 'caught', 'caught']}],
   {'balls': 15, 'points': 93}),
  ('normal control 1',
   [{'maidens': 1, 'overs': '2', 'runs': 24, 'wickets': ['stumped', 'bowled', 'run out']}],
   {'balls': 12, 'points': 66}),
  ('normal control 2', [{'maidens': 0, 'overs': '4', 'runs': 48, 'wickets': ['run out']}],
   {'balls': 24, 'points': -4}),
  ('normal control 3', [{'maidens': 1, 'overs': '1.5', 'runs': 9, 'wickets': ['bowled', 'stumped']}],
   {'balls': 11, 'points': 70}),
  ('normal control 4', [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': []}],
   {'balls': 11, 'points': 12})]]
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 fixtureActualExpectedOutcome
regression: economy from decimal overs{'balls': 12, 'points': 136}{'balls': 12, 'points': 138}Failed
partial repair probe: economy from decimal overs{'balls': 22, 'points': 45}{'balls': 22, 'points': 47}Failed
second regression{'balls': 22, 'points': 39}{'balls': 22, 'points': 41}Failed
normal control 1{'balls': 4, 'points': 87}{'balls': 4, 'points': 87}Passed
normal control 2{'balls': 24, 'points': 27}{'balls': 24, 'points': 27}Passed
normal control 3{'balls': 12, 'points': 104}{'balls': 12, 'points': 104}Passed
normal control 4{'balls': 11, 'points': 25}{'balls': 11, 'points': 25}Passed

SHA-256 / 2e540e243de999125d8a8661f5a338b9296dbf49ef818da02b52fdc7d1c8d81c

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 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, int(whole) * 6)
        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: economy from decimal overs',
   [{'maidens': 1, 'overs': '1.6', 'runs': 13, 'wickets': ['stumped', 'lbw', 'bowled', 'caught', 'run out']}],
   {'balls': 12, 'points': 138}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': ['bowled']}], {'balls': 22, 'points': 47}),
  ('second regression', [{'maidens': 1, 'overs': '3.4', 'runs': 44, 'wickets': ['lbw']}],
   {'balls': 22, 'points': 41}),
  ('normal control 1',
   [{'maidens': 0, 'overs': '0.4', 'runs': 8, 'wickets': ['lbw', 'run out', 'stumped', 'caught']}],
   {'balls': 4, 'points': 87}),
  ('normal control 2',
   [{'maidens': 0, 'overs': '4', 'runs': 28, 'wickets': ['caught', 'run out', 'run out']}],
   {'balls': 24, 'points': 27}),
  ('normal control 3',
   [{'maidens': 0, 'overs': '2', 'runs': 24, 'wickets': ['stumped', 'caught', 'caught', 'caught']}],
   {'balls': 12, 'points': 104}),
  ('normal control 4', [{'maidens': 0, 'overs': '1.5', 'runs': 22, 'wickets': ['caught']}],
   {'balls': 11, 'points': 25})],
 [('regression: economy from decimal overs', [{'maidens': 1, 'overs': '2.3', 'runs': 30, 'wickets': []}],
   {'balls': 15, 'points': 8}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 0, 'overs': '3.4', 'runs': 22, 'wickets': ['run out']}], {'balls': 22, 'points': 2}),
  ('second regression', [{'maidens': 0, 'overs': '1.6', 'runs': 14, 'wickets': ['caught']}],
   {'balls': 12, 'points': 27}),
  ('normal control 1', [{'maidens': 0, 'overs': '2.0', 'runs': 24, 'wickets': ['run out']}],
   {'balls': 12, 'points': -4}),
  ('normal control 2',
   [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': ['stumped', 'lbw', 'run out', 'lbw']}],
   {'balls': 4, 'points': 107}),
  ('normal control 3', [{'maidens': 0, 'overs': '2', 'runs': 3, 'wickets': []}], {'balls': 12, 'points': 6}),
  ('normal control 4', [{'maidens': 1, 'overs': '0.4', 'runs': 9, 'wickets': ['caught']}],
   {'balls': 4, 'points': 37})],
 [('regression: economy from decimal overs',
   [{'maidens': 0, 'overs': '1.6', 'runs': 14, 'wickets': ['bowled', 'caught']}],
   {'balls': 12, 'points': 60}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 1, 'overs': '1.6', 'runs': 24, 'wickets': []}], {'balls': 12, 'points': 8}),
  ('second regression', [{'maidens': 0, 'overs': '1.6', 'runs': 24, 'wickets': ['lbw']}],
   {'balls': 12, 'points': 29}),
  ('normal control 1',
   [{'maidens': 0, 'overs': '2.0', 'runs': 14, 'wickets': ['bowled', 'bowled', 'lbw', 'lbw']}],
   {'balls': 12, 'points': 142}),
  ('normal control 2', [{'maidens': 0, 'overs': '0.4', 'runs': 6, 'wickets': []}], {'balls': 4, 'points': 0}),
  ('normal control 3', [{'maidens': 1, 'overs': '2.0', 'runs': 14, 'wickets': ['run out', 'lbw']}],
   {'balls': 12, 'points': 47}),
  ('normal control 4',
   [{'maidens': 1, 'overs': '4', 'runs': 28, 'wickets': ['lbw', 'caught', 'caught', 'run out', 'stumped']}],
   {'balls': 24, 'points': 130})],
 [('regression: economy from decimal overs', [{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': []}],
   {'balls': 22, 'points': 14}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': ['caught', 'lbw', 'stumped', 'run out', 'lbw']}],
   {'balls': 22, 'points': 138}),
  ('second regression',
   [{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': ['lbw', 'caught', 'stumped', 'bowled']}],
   {'balls': 22, 'points': 138}),
  ('normal control 1',
   [{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['caught', 'caught', 'run out']}],
   {'balls': 12, 'points': 58}),
  ('normal control 2',
   [{'maidens': 0, 'overs': '2', 'runs': 14, 'wickets': ['lbw', 'caught', 'stumped', 'run out', 'caught']}],
   {'balls': 12, 'points': 118}),
  ('normal control 3',
   [{'maidens': 1, 'overs': '4', 'runs': 24, 'wickets': ['bowled', 'stumped', 'caught', 'lbw', 'bowled']}],
   {'balls': 24, 'points': 179}),
  ('normal control 4', [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['bowled', 'bowled']}],
   {'balls': 11, 'points': 78})],
 [('regression: economy from decimal overs',
   [{'maidens': 1, 'overs': '1.6', 'runs': 24, 'wickets': ['caught', 'lbw', 'caught', 'run out']}],
   {'balls': 12, 'points': 95}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 1, 'overs': '1.6', 'runs': 6, 'wickets': []}], {'balls': 12, 'points': 18}),
  ('second regression',
   [{'maidens': 1, 'overs': '2.3', 'runs': 15, 'wickets': ['stumped', 'caught', 'caught']}],
   {'balls': 15, 'points': 93}),
  ('normal control 1',
   [{'maidens': 1, 'overs': '2', 'runs': 24, 'wickets': ['stumped', 'bowled', 'run out']}],
   {'balls': 12, 'points': 66}),
  ('normal control 2', [{'maidens': 0, 'overs': '4', 'runs': 48, 'wickets': ['run out']}],
   {'balls': 24, 'points': -4}),
  ('normal control 3', [{'maidens': 1, 'overs': '1.5', 'runs': 9, 'wickets': ['bowled', 'stumped']}],
   {'balls': 11, 'points': 70}),
  ('normal control 4', [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': []}],
   {'balls': 11, 'points': 12})]]
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 fixtureActualExpectedOutcome
regression: economy from decimal overs{'balls': 12, 'points': 130}{'balls': 12, 'points': 138}Failed
partial repair probe: economy from decimal overs{'balls': 22, 'points': 45}{'balls': 22, 'points': 47}Failed
second regression{'balls': 22, 'points': 39}{'balls': 22, 'points': 41}Failed
normal control 1{'balls': 4, 'points': 87}{'balls': 4, 'points': 87}Passed
normal control 2{'balls': 24, 'points': 27}{'balls': 24, 'points': 27}Passed
normal control 3{'balls': 12, 'points': 104}{'balls': 12, 'points': 104}Passed
normal control 4{'balls': 11, 'points': 25}{'balls': 11, 'points': 25}Passed

SHA-256 / de6e1112b72d644605f4999641f70f71e2c0d7e8779ac240f46d07f0925fc2c2

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: economy from decimal overs',
   [{'maidens': 1, 'overs': '1.6', 'runs': 13, 'wickets': ['stumped', 'lbw', 'bowled', 'caught', 'run out']}],
   {'balls': 12, 'points': 138}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': ['bowled']}], {'balls': 22, 'points': 47}),
  ('second regression', [{'maidens': 1, 'overs': '3.4', 'runs': 44, 'wickets': ['lbw']}],
   {'balls': 22, 'points': 41}),
  ('normal control 1',
   [{'maidens': 0, 'overs': '0.4', 'runs': 8, 'wickets': ['lbw', 'run out', 'stumped', 'caught']}],
   {'balls': 4, 'points': 87}),
  ('normal control 2',
   [{'maidens': 0, 'overs': '4', 'runs': 28, 'wickets': ['caught', 'run out', 'run out']}],
   {'balls': 24, 'points': 27}),
  ('normal control 3',
   [{'maidens': 0, 'overs': '2', 'runs': 24, 'wickets': ['stumped', 'caught', 'caught', 'caught']}],
   {'balls': 12, 'points': 104}),
  ('normal control 4', [{'maidens': 0, 'overs': '1.5', 'runs': 22, 'wickets': ['caught']}],
   {'balls': 11, 'points': 25})],
 [('regression: economy from decimal overs', [{'maidens': 1, 'overs': '2.3', 'runs': 30, 'wickets': []}],
   {'balls': 15, 'points': 8}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 0, 'overs': '3.4', 'runs': 22, 'wickets': ['run out']}], {'balls': 22, 'points': 2}),
  ('second regression', [{'maidens': 0, 'overs': '1.6', 'runs': 14, 'wickets': ['caught']}],
   {'balls': 12, 'points': 27}),
  ('normal control 1', [{'maidens': 0, 'overs': '2.0', 'runs': 24, 'wickets': ['run out']}],
   {'balls': 12, 'points': -4}),
  ('normal control 2',
   [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': ['stumped', 'lbw', 'run out', 'lbw']}],
   {'balls': 4, 'points': 107}),
  ('normal control 3', [{'maidens': 0, 'overs': '2', 'runs': 3, 'wickets': []}], {'balls': 12, 'points': 6}),
  ('normal control 4', [{'maidens': 1, 'overs': '0.4', 'runs': 9, 'wickets': ['caught']}],
   {'balls': 4, 'points': 37})],
 [('regression: economy from decimal overs',
   [{'maidens': 0, 'overs': '1.6', 'runs': 14, 'wickets': ['bowled', 'caught']}],
   {'balls': 12, 'points': 60}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 1, 'overs': '1.6', 'runs': 24, 'wickets': []}], {'balls': 12, 'points': 8}),
  ('second regression', [{'maidens': 0, 'overs': '1.6', 'runs': 24, 'wickets': ['lbw']}],
   {'balls': 12, 'points': 29}),
  ('normal control 1',
   [{'maidens': 0, 'overs': '2.0', 'runs': 14, 'wickets': ['bowled', 'bowled', 'lbw', 'lbw']}],
   {'balls': 12, 'points': 142}),
  ('normal control 2', [{'maidens': 0, 'overs': '0.4', 'runs': 6, 'wickets': []}], {'balls': 4, 'points': 0}),
  ('normal control 3', [{'maidens': 1, 'overs': '2.0', 'runs': 14, 'wickets': ['run out', 'lbw']}],
   {'balls': 12, 'points': 47}),
  ('normal control 4',
   [{'maidens': 1, 'overs': '4', 'runs': 28, 'wickets': ['lbw', 'caught', 'caught', 'run out', 'stumped']}],
   {'balls': 24, 'points': 130})],
 [('regression: economy from decimal overs', [{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': []}],
   {'balls': 22, 'points': 14}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': ['caught', 'lbw', 'stumped', 'run out', 'lbw']}],
   {'balls': 22, 'points': 138}),
  ('second regression',
   [{'maidens': 1, 'overs': '3.4', 'runs': 25, 'wickets': ['lbw', 'caught', 'stumped', 'bowled']}],
   {'balls': 22, 'points': 138}),
  ('normal control 1',
   [{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['caught', 'caught', 'run out']}],
   {'balls': 12, 'points': 58}),
  ('normal control 2',
   [{'maidens': 0, 'overs': '2', 'runs': 14, 'wickets': ['lbw', 'caught', 'stumped', 'run out', 'caught']}],
   {'balls': 12, 'points': 118}),
  ('normal control 3',
   [{'maidens': 1, 'overs': '4', 'runs': 24, 'wickets': ['bowled', 'stumped', 'caught', 'lbw', 'bowled']}],
   {'balls': 24, 'points': 179}),
  ('normal control 4', [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['bowled', 'bowled']}],
   {'balls': 11, 'points': 78})],
 [('regression: economy from decimal overs',
   [{'maidens': 1, 'overs': '1.6', 'runs': 24, 'wickets': ['caught', 'lbw', 'caught', 'run out']}],
   {'balls': 12, 'points': 95}),
  ('partial repair probe: economy from decimal overs',
   [{'maidens': 1, 'overs': '1.6', 'runs': 6, 'wickets': []}], {'balls': 12, 'points': 18}),
  ('second regression',
   [{'maidens': 1, 'overs': '2.3', 'runs': 15, 'wickets': ['stumped', 'caught', 'caught']}],
   {'balls': 15, 'points': 93}),
  ('normal control 1',
   [{'maidens': 1, 'overs': '2', 'runs': 24, 'wickets': ['stumped', 'bowled', 'run out']}],
   {'balls': 12, 'points': 66}),
  ('normal control 2', [{'maidens': 0, 'overs': '4', 'runs': 48, 'wickets': ['run out']}],
   {'balls': 24, 'points': -4}),
  ('normal control 3', [{'maidens': 1, 'overs': '1.5', 'runs': 9, 'wickets': ['bowled', 'stumped']}],
   {'balls': 11, 'points': 70}),
  ('normal control 4', [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': []}],
   {'balls': 11, 'points': 12})]]
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 fixtureActualExpectedOutcome
regression: economy from decimal overs{'balls': 12, 'points': 138}{'balls': 12, 'points': 138}Passed
partial repair probe: economy from decimal overs{'balls': 22, 'points': 47}{'balls': 22, 'points': 47}Passed
second regression{'balls': 22, 'points': 41}{'balls': 22, 'points': 41}Passed
normal control 1{'balls': 4, 'points': 87}{'balls': 4, 'points': 87}Passed
normal control 2{'balls': 24, 'points': 27}{'balls': 24, 'points': 27}Passed
normal control 3{'balls': 12, 'points': 104}{'balls': 12, 'points': 104}Passed
normal control 4{'balls': 11, 'points': 25}{'balls': 11, 'points': 25}Passed

SHA-256 / 15d522bff591025020cb2eaa4bbcc2956382406bb0c567f141962c2fab3a265f

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.346793+00:00.

Case digest / e46371e7f6c3496bc498eb3593431f02129fab2125450e2923d77a534226df00