FAILURE MAP
← Case archive

FA-85206 / Fantasy sports scoring / Open access

Economy bonus applied after two balls instead of two overs · case 01

A bowler who delivered 5 balls for 1 run receives the best economy bonus.

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

ROOT CAUSE

The minimum is compared in balls using the over count 2.

VERIFIED REPAIR

Require at least 12 balls (two full overs).

Unsuccessful approach: A strict comparison excludes spells of exactly two overs.

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 >= 2:
        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 minimum overs unit',
   [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': ['lbw', 'run out']}], {'balls': 4, 'points': 45}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '2', 'runs': 24, 'wickets': ['caught', 'caught', 'bowled', 'stumped']}],
   {'balls': 12, 'points': 124}),
  ('second regression', [{'maidens': 1, 'overs': '1.6', 'runs': 14, 'wickets': []}],
   {'balls': 12, 'points': 14}),
  ('normal control 1',
   [{'maidens': 0,
     'overs': '4',
     'runs': 16,
     'wickets': ['caught', 'bowled', 'run out', 'stumped', 'run out']}],
   {'balls': 24, 'points': 93}),
  ('normal control 2', [{'maidens': 0, 'overs': '3.4', 'runs': 44, 'wickets': ['caught', 'caught']}],
   {'balls': 22, 'points': 46}),
  ('normal control 3',
   [{'maidens': 1,
     'overs': '3.4',
     'runs': 25,
     'wickets': ['stumped', 'run out', 'run out', 'caught', 'bowled']}],
   {'balls': 22, 'points': 101}),
  ('normal control 4',
   [{'maidens': 1, 'overs': '4', 'runs': 28, 'wickets': ['bowled', 'caught', 'caught', 'caught']}],
   {'balls': 24, 'points': 130})],
 [('regression: economy minimum overs unit',
   [{'maidens': 0, 'overs': '1.5', 'runs': 22, 'wickets': ['bowled', 'bowled', 'caught']}],
   {'balls': 11, 'points': 95}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '2', 'runs': 14, 'wickets': ['run out', 'caught', 'caught', 'stumped']}],
   {'balls': 12, 'points': 93}),
  ('second regression', [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['run out']}],
   {'balls': 11, 'points': 12}),
  ('normal control 1', [{'maidens': 0, 'overs': '3.4', 'runs': 44, 'wickets': ['caught', 'lbw']}],
   {'balls': 22, 'points': 54}),
  ('normal control 2', [{'maidens': 1, 'overs': '4', 'runs': 48, 'wickets': ['lbw']}],
   {'balls': 24, 'points': 41}),
  ('normal control 3',
   [{'maidens': 0, 'overs': '2.3', 'runs': 17, 'wickets': ['run out', 'stumped', 'caught', 'caught']}],
   {'balls': 15, 'points': 81}),
  ('normal control 4', [{'maidens': 0, 'overs': '2.3', 'runs': 30, 'wickets': []}],
   {'balls': 15, 'points': -4})],
 [('regression: economy minimum overs unit',
   [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['run out', 'caught', 'lbw', 'bowled']}],
   {'balls': 11, 'points': 107}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '2.0', 'runs': 14, 'wickets': ['run out', 'caught', 'run out', 'run out']}],
   {'balls': 12, 'points': 39}),
  ('second regression', [{'maidens': 1, 'overs': '0.4', 'runs': 0, 'wickets': ['lbw', 'caught']}],
   {'balls': 4, 'points': 70}),
  ('normal control 1', [{'maidens': 0, 'overs': '3.4', 'runs': 44, 'wickets': []}],
   {'balls': 22, 'points': -4}),
  ('normal control 2', [{'maidens': 0, 'overs': '1.5', 'runs': 15, 'wickets': []}],
   {'balls': 11, 'points': 0}),
  ('normal control 3',
   [{'maidens': 0, 'overs': '3.4', 'runs': 25, 'wickets': ['lbw', 'bowled', 'caught', 'caught']}],
   {'balls': 22, 'points': 126}),
  ('normal control 4', [{'maidens': 1, 'overs': '3.4', 'runs': 29, 'wickets': []}],
   {'balls': 22, 'points': 12})],
 [('regression: economy minimum overs unit',
   [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': ['run out', 'bowled', 'run out']}],
   {'balls': 4, 'points': 45}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '1.6', 'runs': 12, 'wickets': ['caught']}], {'balls': 12, 'points': 39}),
  ('second regression',
   [{'maidens': 1, 'overs': '1.5', 'runs': 11, 'wickets': ['lbw', 'caught', 'run out', 'caught']}],
   {'balls': 11, 'points': 99}),
  ('normal control 1', [{'maidens': 0, 'overs': '2.3', 'runs': 30, 'wickets': ['caught', 'caught']}],
   {'balls': 15, 'points': 46}),
  ('normal control 2', [{'maidens': 0, 'overs': '4', 'runs': 28, 'wickets': ['bowled', 'stumped']}],
   {'balls': 24, 'points': 60}),
  ('normal control 3',
   [{'maidens': 1, 'overs': '4', 'runs': 28, 'wickets': ['stumped', 'stumped', 'stumped', 'stumped', 'lbw']}],
   {'balls': 24, 'points': 163}),
  ('normal control 4', [{'maidens': 1, 'overs': '4', 'runs': 28, 'wickets': ['lbw', 'bowled', 'bowled']}],
   {'balls': 24, 'points': 117})],
 [('regression: economy minimum overs unit',
   [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['run out', 'caught', 'stumped', 'lbw']}],
   {'balls': 11, 'points': 99}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '1.6', 'runs': 14, 'wickets': ['lbw', 'stumped', 'caught', 'bowled', 'stumped']}],
   {'balls': 12, 'points': 171}),
  ('second regression', [{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['caught']}],
   {'balls': 12, 'points': 33}),
  ('normal control 1', [{'maidens': 0, 'overs': '4', 'runs': 28, 'wickets': ['run out']}],
   {'balls': 24, 'points': 2}),
  ('normal control 2', [{'maidens': 1, 'overs': '2.3', 'runs': 15, 'wickets': ['lbw', 'lbw']}],
   {'balls': 15, 'points': 80}),
  ('normal control 3',
   [{'maidens': 0, 'overs': '3.4', 'runs': 44, 'wickets': ['stumped', 'stumped', 'caught', 'stumped']}],
   {'balls': 22, 'points': 104}),
  ('normal control 4',
   [{'maidens': 0, 'overs': '3.4', 'runs': 22, 'wickets': ['lbw', 'lbw', 'lbw', 'bowled', 'lbw']}],
   {'balls': 22, 'points': 183})]]
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 minimum overs unit{'balls': 4, 'points': 47}{'balls': 4, 'points': 45}Failed
partial repair probe: economy minimum overs unit{'balls': 12, 'points': 124}{'balls': 12, 'points': 124}Passed
second regression{'balls': 12, 'points': 14}{'balls': 12, 'points': 14}Passed
normal control 1{'balls': 24, 'points': 93}{'balls': 24, 'points': 93}Passed
normal control 2{'balls': 22, 'points': 46}{'balls': 22, 'points': 46}Passed
normal control 3{'balls': 22, 'points': 101}{'balls': 22, 'points': 101}Passed
normal control 4{'balls': 24, 'points': 130}{'balls': 24, 'points': 130}Passed

SHA-256 / b9dd2ee1b97faae40cbb080ba9adad14866af95d9771ec26ccbb5859bfb0b346

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, 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 minimum overs unit',
   [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': ['lbw', 'run out']}], {'balls': 4, 'points': 45}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '2', 'runs': 24, 'wickets': ['caught', 'caught', 'bowled', 'stumped']}],
   {'balls': 12, 'points': 124}),
  ('second regression', [{'maidens': 1, 'overs': '1.6', 'runs': 14, 'wickets': []}],
   {'balls': 12, 'points': 14}),
  ('normal control 1',
   [{'maidens': 0,
     'overs': '4',
     'runs': 16,
     'wickets': ['caught', 'bowled', 'run out', 'stumped', 'run out']}],
   {'balls': 24, 'points': 93}),
  ('normal control 2', [{'maidens': 0, 'overs': '3.4', 'runs': 44, 'wickets': ['caught', 'caught']}],
   {'balls': 22, 'points': 46}),
  ('normal control 3',
   [{'maidens': 1,
     'overs': '3.4',
     'runs': 25,
     'wickets': ['stumped', 'run out', 'run out', 'caught', 'bowled']}],
   {'balls': 22, 'points': 101}),
  ('normal control 4',
   [{'maidens': 1, 'overs': '4', 'runs': 28, 'wickets': ['bowled', 'caught', 'caught', 'caught']}],
   {'balls': 24, 'points': 130})],
 [('regression: economy minimum overs unit',
   [{'maidens': 0, 'overs': '1.5', 'runs': 22, 'wickets': ['bowled', 'bowled', 'caught']}],
   {'balls': 11, 'points': 95}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '2', 'runs': 14, 'wickets': ['run out', 'caught', 'caught', 'stumped']}],
   {'balls': 12, 'points': 93}),
  ('second regression', [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['run out']}],
   {'balls': 11, 'points': 12}),
  ('normal control 1', [{'maidens': 0, 'overs': '3.4', 'runs': 44, 'wickets': ['caught', 'lbw']}],
   {'balls': 22, 'points': 54}),
  ('normal control 2', [{'maidens': 1, 'overs': '4', 'runs': 48, 'wickets': ['lbw']}],
   {'balls': 24, 'points': 41}),
  ('normal control 3',
   [{'maidens': 0, 'overs': '2.3', 'runs': 17, 'wickets': ['run out', 'stumped', 'caught', 'caught']}],
   {'balls': 15, 'points': 81}),
  ('normal control 4', [{'maidens': 0, 'overs': '2.3', 'runs': 30, 'wickets': []}],
   {'balls': 15, 'points': -4})],
 [('regression: economy minimum overs unit',
   [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['run out', 'caught', 'lbw', 'bowled']}],
   {'balls': 11, 'points': 107}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '2.0', 'runs': 14, 'wickets': ['run out', 'caught', 'run out', 'run out']}],
   {'balls': 12, 'points': 39}),
  ('second regression', [{'maidens': 1, 'overs': '0.4', 'runs': 0, 'wickets': ['lbw', 'caught']}],
   {'balls': 4, 'points': 70}),
  ('normal control 1', [{'maidens': 0, 'overs': '3.4', 'runs': 44, 'wickets': []}],
   {'balls': 22, 'points': -4}),
  ('normal control 2', [{'maidens': 0, 'overs': '1.5', 'runs': 15, 'wickets': []}],
   {'balls': 11, 'points': 0}),
  ('normal control 3',
   [{'maidens': 0, 'overs': '3.4', 'runs': 25, 'wickets': ['lbw', 'bowled', 'caught', 'caught']}],
   {'balls': 22, 'points': 126}),
  ('normal control 4', [{'maidens': 1, 'overs': '3.4', 'runs': 29, 'wickets': []}],
   {'balls': 22, 'points': 12})],
 [('regression: economy minimum overs unit',
   [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': ['run out', 'bowled', 'run out']}],
   {'balls': 4, 'points': 45}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '1.6', 'runs': 12, 'wickets': ['caught']}], {'balls': 12, 'points': 39}),
  ('second regression',
   [{'maidens': 1, 'overs': '1.5', 'runs': 11, 'wickets': ['lbw', 'caught', 'run out', 'caught']}],
   {'balls': 11, 'points': 99}),
  ('normal control 1', [{'maidens': 0, 'overs': '2.3', 'runs': 30, 'wickets': ['caught', 'caught']}],
   {'balls': 15, 'points': 46}),
  ('normal control 2', [{'maidens': 0, 'overs': '4', 'runs': 28, 'wickets': ['bowled', 'stumped']}],
   {'balls': 24, 'points': 60}),
  ('normal control 3',
   [{'maidens': 1, 'overs': '4', 'runs': 28, 'wickets': ['stumped', 'stumped', 'stumped', 'stumped', 'lbw']}],
   {'balls': 24, 'points': 163}),
  ('normal control 4', [{'maidens': 1, 'overs': '4', 'runs': 28, 'wickets': ['lbw', 'bowled', 'bowled']}],
   {'balls': 24, 'points': 117})],
 [('regression: economy minimum overs unit',
   [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['run out', 'caught', 'stumped', 'lbw']}],
   {'balls': 11, 'points': 99}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '1.6', 'runs': 14, 'wickets': ['lbw', 'stumped', 'caught', 'bowled', 'stumped']}],
   {'balls': 12, 'points': 171}),
  ('second regression', [{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['caught']}],
   {'balls': 12, 'points': 33}),
  ('normal control 1', [{'maidens': 0, 'overs': '4', 'runs': 28, 'wickets': ['run out']}],
   {'balls': 24, 'points': 2}),
  ('normal control 2', [{'maidens': 1, 'overs': '2.3', 'runs': 15, 'wickets': ['lbw', 'lbw']}],
   {'balls': 15, 'points': 80}),
  ('normal control 3',
   [{'maidens': 0, 'overs': '3.4', 'runs': 44, 'wickets': ['stumped', 'stumped', 'caught', 'stumped']}],
   {'balls': 22, 'points': 104}),
  ('normal control 4',
   [{'maidens': 0, 'overs': '3.4', 'runs': 22, 'wickets': ['lbw', 'lbw', 'lbw', 'bowled', 'lbw']}],
   {'balls': 22, 'points': 183})]]
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 minimum overs unit{'balls': 4, 'points': 45}{'balls': 4, 'points': 45}Passed
partial repair probe: economy minimum overs unit{'balls': 12, 'points': 128}{'balls': 12, 'points': 124}Failed
second regression{'balls': 12, 'points': 12}{'balls': 12, 'points': 14}Failed
normal control 1{'balls': 24, 'points': 93}{'balls': 24, 'points': 93}Passed
normal control 2{'balls': 22, 'points': 46}{'balls': 22, 'points': 46}Passed
normal control 3{'balls': 22, 'points': 101}{'balls': 22, 'points': 101}Passed
normal control 4{'balls': 24, 'points': 130}{'balls': 24, 'points': 130}Passed

SHA-256 / 31d2e5ced6e9fd9f7768a8f6e1ee42049d8372414c158778a557c164712d67ef

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 minimum overs unit',
   [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': ['lbw', 'run out']}], {'balls': 4, 'points': 45}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '2', 'runs': 24, 'wickets': ['caught', 'caught', 'bowled', 'stumped']}],
   {'balls': 12, 'points': 124}),
  ('second regression', [{'maidens': 1, 'overs': '1.6', 'runs': 14, 'wickets': []}],
   {'balls': 12, 'points': 14}),
  ('normal control 1',
   [{'maidens': 0,
     'overs': '4',
     'runs': 16,
     'wickets': ['caught', 'bowled', 'run out', 'stumped', 'run out']}],
   {'balls': 24, 'points': 93}),
  ('normal control 2', [{'maidens': 0, 'overs': '3.4', 'runs': 44, 'wickets': ['caught', 'caught']}],
   {'balls': 22, 'points': 46}),
  ('normal control 3',
   [{'maidens': 1,
     'overs': '3.4',
     'runs': 25,
     'wickets': ['stumped', 'run out', 'run out', 'caught', 'bowled']}],
   {'balls': 22, 'points': 101}),
  ('normal control 4',
   [{'maidens': 1, 'overs': '4', 'runs': 28, 'wickets': ['bowled', 'caught', 'caught', 'caught']}],
   {'balls': 24, 'points': 130})],
 [('regression: economy minimum overs unit',
   [{'maidens': 0, 'overs': '1.5', 'runs': 22, 'wickets': ['bowled', 'bowled', 'caught']}],
   {'balls': 11, 'points': 95}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '2', 'runs': 14, 'wickets': ['run out', 'caught', 'caught', 'stumped']}],
   {'balls': 12, 'points': 93}),
  ('second regression', [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['run out']}],
   {'balls': 11, 'points': 12}),
  ('normal control 1', [{'maidens': 0, 'overs': '3.4', 'runs': 44, 'wickets': ['caught', 'lbw']}],
   {'balls': 22, 'points': 54}),
  ('normal control 2', [{'maidens': 1, 'overs': '4', 'runs': 48, 'wickets': ['lbw']}],
   {'balls': 24, 'points': 41}),
  ('normal control 3',
   [{'maidens': 0, 'overs': '2.3', 'runs': 17, 'wickets': ['run out', 'stumped', 'caught', 'caught']}],
   {'balls': 15, 'points': 81}),
  ('normal control 4', [{'maidens': 0, 'overs': '2.3', 'runs': 30, 'wickets': []}],
   {'balls': 15, 'points': -4})],
 [('regression: economy minimum overs unit',
   [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['run out', 'caught', 'lbw', 'bowled']}],
   {'balls': 11, 'points': 107}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '2.0', 'runs': 14, 'wickets': ['run out', 'caught', 'run out', 'run out']}],
   {'balls': 12, 'points': 39}),
  ('second regression', [{'maidens': 1, 'overs': '0.4', 'runs': 0, 'wickets': ['lbw', 'caught']}],
   {'balls': 4, 'points': 70}),
  ('normal control 1', [{'maidens': 0, 'overs': '3.4', 'runs': 44, 'wickets': []}],
   {'balls': 22, 'points': -4}),
  ('normal control 2', [{'maidens': 0, 'overs': '1.5', 'runs': 15, 'wickets': []}],
   {'balls': 11, 'points': 0}),
  ('normal control 3',
   [{'maidens': 0, 'overs': '3.4', 'runs': 25, 'wickets': ['lbw', 'bowled', 'caught', 'caught']}],
   {'balls': 22, 'points': 126}),
  ('normal control 4', [{'maidens': 1, 'overs': '3.4', 'runs': 29, 'wickets': []}],
   {'balls': 22, 'points': 12})],
 [('regression: economy minimum overs unit',
   [{'maidens': 1, 'overs': '0.4', 'runs': 4, 'wickets': ['run out', 'bowled', 'run out']}],
   {'balls': 4, 'points': 45}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '1.6', 'runs': 12, 'wickets': ['caught']}], {'balls': 12, 'points': 39}),
  ('second regression',
   [{'maidens': 1, 'overs': '1.5', 'runs': 11, 'wickets': ['lbw', 'caught', 'run out', 'caught']}],
   {'balls': 11, 'points': 99}),
  ('normal control 1', [{'maidens': 0, 'overs': '2.3', 'runs': 30, 'wickets': ['caught', 'caught']}],
   {'balls': 15, 'points': 46}),
  ('normal control 2', [{'maidens': 0, 'overs': '4', 'runs': 28, 'wickets': ['bowled', 'stumped']}],
   {'balls': 24, 'points': 60}),
  ('normal control 3',
   [{'maidens': 1, 'overs': '4', 'runs': 28, 'wickets': ['stumped', 'stumped', 'stumped', 'stumped', 'lbw']}],
   {'balls': 24, 'points': 163}),
  ('normal control 4', [{'maidens': 1, 'overs': '4', 'runs': 28, 'wickets': ['lbw', 'bowled', 'bowled']}],
   {'balls': 24, 'points': 117})],
 [('regression: economy minimum overs unit',
   [{'maidens': 1, 'overs': '1.5', 'runs': 12, 'wickets': ['run out', 'caught', 'stumped', 'lbw']}],
   {'balls': 11, 'points': 99}),
  ('partial repair probe: economy minimum overs unit',
   [{'maidens': 1, 'overs': '1.6', 'runs': 14, 'wickets': ['lbw', 'stumped', 'caught', 'bowled', 'stumped']}],
   {'balls': 12, 'points': 171}),
  ('second regression', [{'maidens': 1, 'overs': '2.0', 'runs': 24, 'wickets': ['caught']}],
   {'balls': 12, 'points': 33}),
  ('normal control 1', [{'maidens': 0, 'overs': '4', 'runs': 28, 'wickets': ['run out']}],
   {'balls': 24, 'points': 2}),
  ('normal control 2', [{'maidens': 1, 'overs': '2.3', 'runs': 15, 'wickets': ['lbw', 'lbw']}],
   {'balls': 15, 'points': 80}),
  ('normal control 3',
   [{'maidens': 0, 'overs': '3.4', 'runs': 44, 'wickets': ['stumped', 'stumped', 'caught', 'stumped']}],
   {'balls': 22, 'points': 104}),
  ('normal control 4',
   [{'maidens': 0, 'overs': '3.4', 'runs': 22, 'wickets': ['lbw', 'lbw', 'lbw', 'bowled', 'lbw']}],
   {'balls': 22, 'points': 183})]]
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 minimum overs unit{'balls': 4, 'points': 45}{'balls': 4, 'points': 45}Passed
partial repair probe: economy minimum overs unit{'balls': 12, 'points': 124}{'balls': 12, 'points': 124}Passed
second regression{'balls': 12, 'points': 14}{'balls': 12, 'points': 14}Passed
normal control 1{'balls': 24, 'points': 93}{'balls': 24, 'points': 93}Passed
normal control 2{'balls': 22, 'points': 46}{'balls': 22, 'points': 46}Passed
normal control 3{'balls': 22, 'points': 101}{'balls': 22, 'points': 101}Passed
normal control 4{'balls': 24, 'points': 130}{'balls': 24, 'points': 130}Passed

SHA-256 / 91d0af3c54bf916c468a48e69833427d77b41217ca9c54b7734ef941640aace8

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

Case digest / 4aa9ffd2e310d2ec055b2d6e7a821f7ee27ae738fc6f98e5a04869940b8c67c1