FAILURE MAP
← Case archive

FA-83991 / Sports scoring and tiebreakers / Open access

No-ball bat runs booked as extras · case 01

Extras are inflated when runs are hit off a no-ball.

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

ROOT CAUSE

The no-ball branch adds the batter runs to extras along with the penalty.

VERIFIED REPAIR

Only the one-run penalty is an extra; bat runs belong to the batter.

Unsuccessful approach: Dropping the penalty and booking only the bat runs as extras undercounts extras.

Case contract

Ball-by-ball innings tally. Events: "0".."6" runs off the bat (legal ball); "W" wicket (legal ball, no runs, the new batter takes strike); "wdK" wide: 1 penalty + K run wides, all extras, not a legal ball, K runs completed; "nbK" no-ball: 1 penalty extra + K runs off the bat, not a legal ball; "bK"/"lbK" byes/leg byes: K extras on a legal ball. Batters change ends when an odd number of runs is completed, and again after the 6th legal ball of an over. Batters are numbered 1, 2 and then 3, 4, ... as they come in; batter 1 starts on strike. Return [total, wickets, overs "O.B", extras, batter on strike].

Why this case matters

Scoring apps derive totals, overs and strike from ball events; extras and strike rotation are error-prone.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    total = wickets = legal = extras = 0
    striker, non = 1, 2
    next_bat = 3
    for e in events:
        if e == 'W':
            wickets += 1
            legal += 1
            striker = next_bat
            next_bat += 1
            ran = 0
        elif e.startswith('wd'):
            k = int(e[2:] or 0)
            total += 1 + k
            extras += 1 + k
            ran = k
        elif e.startswith('nb'):
            k = int(e[2:] or 0)
            total += 1 + k
            extras += 1 + k
            ran = k
        elif e[0] in 'bl':
            k = int(e.lstrip('lb'))
            total += k
            extras += k
            legal += 1
            ran = k
        else:
            k = int(e)
            total += k
            legal += 1
            ran = k
        if ran % 2 == 1:
            striker, non = non, striker
        if e[:2] not in ('wd', 'nb') and legal % 6 == 0:
            striker, non = non, striker
    return [total, wickets, '%d.%d' % (legal // 6, legal % 6), extras, striker]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
    try:
        return solve(*args)
    except Exception as exc:
        return 'raised ' + type(exc).__name__
cases = [[('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['2', 'nb', 'lb1', '3', '1', 'nb', 'b4', 'nb'],),
   [14, 0, '0.5', 8, 2]),
  ('regression: no ball extras',
   (['3', 'nb4', 'b1', '0', '1', '0', 'wd4', '4', 'nb4', '1', 'wd', '0'],),
   [26, 0, '1.2', 9, 2]),
  ('variant scenario 1', (['3', '0', '4'],), [7, 0, '0.3', 0, 2]),
  ('variant scenario 2', (['4', '0', 'W', '1'],), [5, 1, '0.4', 0, 2])],
 [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['0', '1', 'nb4', '4', 'lb2', '1', 'lb2', 'wd', 'wd1', '0', '0', '6', '4', '0'],),
   [28, 0, '1.5', 8, 1]),
  ('variant scenario 1',
   (['4', '1', 'lb1', 'wd1', '1', '1', 'wd', 'wd', '2', '4', '2', '2', '1', '2', '2', '1'],),
   [28, 0, '2.1', 5, 2]),
  ('variant scenario 2', (['wd', '4', '1', '1'],), [7, 0, '0.3', 1, 1])],
 [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['nb',
     '1',
     '0',
     'lb2',
     '0',
     'nb4',
     'lb1',
     'b4',
     'lb1',
     'nb1',
     'lb1',
     '4',
     'lb2',
     '0',
     '6',
     'nb1',
     '0',
     '0',
     '6',
     'lb2'],),
   [40, 0, '2.4', 17, 1]),
  ('variant scenario 1',
   (['4', '0', '0', 'wd4', '4', '0', 'lb1', '0', 'wd1', 'wd4', '4', '4', '4', '4'],),
   [37, 0, '1.5', 13, 2]),
  ('variant scenario 2',
   (['0', '4', '0', 'nb1', '1', 'b1', 'nb', 'wd4', 'wd', '2', 'wd4', '0', '1', '1', 'nb'],),
   [25, 0, '1.3', 15, 1])],
 [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['0',
     'nb4',
     '3',
     '0',
     '0',
     '4',
     'W',
     'lb1',
     '4',
     'b4',
     '1',
     'wd',
     'W',
     'b4',
     '2',
     '0',
     '4',
     '1',
     'wd1',
     '4'],),
   [40, 2, '2.5', 13, 3]),
  ('variant scenario 1', (['0', '2', '1', '4', 'nb4', 'W', '0', '1', '0'],), [13, 1, '1.2', 1, 3]),
  ('variant scenario 2', (['1', '3', '4', '1', '4', 'nb', '2', '0', 'b1'],), [17, 0, '1.2', 2, 2])],
 [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['1', '0', '4', '4', '1', '1', '0', '0', 'nb1', '1', 'lb2', 'lb2', 'wd1'],),
   [20, 0, '1.5', 7, 2]),
  ('regression: no ball extras',
   (['1', '2', 'nb', 'wd4', '0', '1', 'wd4', 'nb1', 'wd1', '2', 'nb'],),
   [22, 0, '0.5', 15, 1]),
  ('variant scenario 1', (['b1', '4', '1'],), [6, 0, '0.3', 1, 1]),
  ('variant scenario 2',
   (['wd', '1', 'wd1', 'W', 'b1', '2', 'nb1', '1', '1', 'wd4', '2', 'wd', '0', '0', '2'],),
   [21, 1, '1.4', 11, 2])]]
for label, args, expected in cases[N - 1]:
    check(label, run(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
control maiden over[0, 0, '1.0', 0, 2][0, 0, '1.0', 0, 2]Passed
boundary single rotates strike[1, 0, '0.1', 0, 2][1, 0, '0.1', 0, 2]Passed
boundary wide is not a legal ball[5, 0, '0.1', 1, 1][5, 0, '0.1', 1, 1]Passed
control no-ball boundary[5, 0, '0.0', 5, 1][5, 0, '0.0', 1, 1]Failed
boundary wicket brings new striker[0, 1, '0.2', 0, 3][0, 1, '0.2', 0, 3]Passed
control leg byes[3, 0, '0.2', 1, 2][3, 0, '0.2', 1, 2]Passed
regression: no ball extras[14, 0, '0.5', 8, 2][14, 0, '0.5', 8, 2]Passed
regression: no ball extras[26, 0, '1.2', 17, 2][26, 0, '1.2', 9, 2]Failed
variant scenario 1[7, 0, '0.3', 0, 2][7, 0, '0.3', 0, 2]Passed
variant scenario 2[5, 1, '0.4', 0, 2][5, 1, '0.4', 0, 2]Passed

SHA-256 / 6d26d5c70ae02db9748da082fe6df586ad8715a423d8ebbe58fd5c06e625cb65

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    total = wickets = legal = extras = 0
    striker, non = 1, 2
    next_bat = 3
    for e in events:
        if e == 'W':
            wickets += 1
            legal += 1
            striker = next_bat
            next_bat += 1
            ran = 0
        elif e.startswith('wd'):
            k = int(e[2:] or 0)
            total += 1 + k
            extras += 1 + k
            ran = k
        elif e.startswith('nb'):
            k = int(e[2:] or 0)
            total += 1 + k
            extras += k
            ran = k
        elif e[0] in 'bl':
            k = int(e.lstrip('lb'))
            total += k
            extras += k
            legal += 1
            ran = k
        else:
            k = int(e)
            total += k
            legal += 1
            ran = k
        if ran % 2 == 1:
            striker, non = non, striker
        if e[:2] not in ('wd', 'nb') and legal % 6 == 0:
            striker, non = non, striker
    return [total, wickets, '%d.%d' % (legal // 6, legal % 6), extras, striker]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
    try:
        return solve(*args)
    except Exception as exc:
        return 'raised ' + type(exc).__name__
cases = [[('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['2', 'nb', 'lb1', '3', '1', 'nb', 'b4', 'nb'],),
   [14, 0, '0.5', 8, 2]),
  ('regression: no ball extras',
   (['3', 'nb4', 'b1', '0', '1', '0', 'wd4', '4', 'nb4', '1', 'wd', '0'],),
   [26, 0, '1.2', 9, 2]),
  ('variant scenario 1', (['3', '0', '4'],), [7, 0, '0.3', 0, 2]),
  ('variant scenario 2', (['4', '0', 'W', '1'],), [5, 1, '0.4', 0, 2])],
 [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['0', '1', 'nb4', '4', 'lb2', '1', 'lb2', 'wd', 'wd1', '0', '0', '6', '4', '0'],),
   [28, 0, '1.5', 8, 1]),
  ('variant scenario 1',
   (['4', '1', 'lb1', 'wd1', '1', '1', 'wd', 'wd', '2', '4', '2', '2', '1', '2', '2', '1'],),
   [28, 0, '2.1', 5, 2]),
  ('variant scenario 2', (['wd', '4', '1', '1'],), [7, 0, '0.3', 1, 1])],
 [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['nb',
     '1',
     '0',
     'lb2',
     '0',
     'nb4',
     'lb1',
     'b4',
     'lb1',
     'nb1',
     'lb1',
     '4',
     'lb2',
     '0',
     '6',
     'nb1',
     '0',
     '0',
     '6',
     'lb2'],),
   [40, 0, '2.4', 17, 1]),
  ('variant scenario 1',
   (['4', '0', '0', 'wd4', '4', '0', 'lb1', '0', 'wd1', 'wd4', '4', '4', '4', '4'],),
   [37, 0, '1.5', 13, 2]),
  ('variant scenario 2',
   (['0', '4', '0', 'nb1', '1', 'b1', 'nb', 'wd4', 'wd', '2', 'wd4', '0', '1', '1', 'nb'],),
   [25, 0, '1.3', 15, 1])],
 [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['0',
     'nb4',
     '3',
     '0',
     '0',
     '4',
     'W',
     'lb1',
     '4',
     'b4',
     '1',
     'wd',
     'W',
     'b4',
     '2',
     '0',
     '4',
     '1',
     'wd1',
     '4'],),
   [40, 2, '2.5', 13, 3]),
  ('variant scenario 1', (['0', '2', '1', '4', 'nb4', 'W', '0', '1', '0'],), [13, 1, '1.2', 1, 3]),
  ('variant scenario 2', (['1', '3', '4', '1', '4', 'nb', '2', '0', 'b1'],), [17, 0, '1.2', 2, 2])],
 [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['1', '0', '4', '4', '1', '1', '0', '0', 'nb1', '1', 'lb2', 'lb2', 'wd1'],),
   [20, 0, '1.5', 7, 2]),
  ('regression: no ball extras',
   (['1', '2', 'nb', 'wd4', '0', '1', 'wd4', 'nb1', 'wd1', '2', 'nb'],),
   [22, 0, '0.5', 15, 1]),
  ('variant scenario 1', (['b1', '4', '1'],), [6, 0, '0.3', 1, 1]),
  ('variant scenario 2',
   (['wd', '1', 'wd1', 'W', 'b1', '2', 'nb1', '1', '1', 'wd4', '2', 'wd', '0', '0', '2'],),
   [21, 1, '1.4', 11, 2])]]
for label, args, expected in cases[N - 1]:
    check(label, run(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
control maiden over[0, 0, '1.0', 0, 2][0, 0, '1.0', 0, 2]Passed
boundary single rotates strike[1, 0, '0.1', 0, 2][1, 0, '0.1', 0, 2]Passed
boundary wide is not a legal ball[5, 0, '0.1', 1, 1][5, 0, '0.1', 1, 1]Passed
control no-ball boundary[5, 0, '0.0', 4, 1][5, 0, '0.0', 1, 1]Failed
boundary wicket brings new striker[0, 1, '0.2', 0, 3][0, 1, '0.2', 0, 3]Passed
control leg byes[3, 0, '0.2', 1, 2][3, 0, '0.2', 1, 2]Passed
regression: no ball extras[14, 0, '0.5', 5, 2][14, 0, '0.5', 8, 2]Failed
regression: no ball extras[26, 0, '1.2', 15, 2][26, 0, '1.2', 9, 2]Failed
variant scenario 1[7, 0, '0.3', 0, 2][7, 0, '0.3', 0, 2]Passed
variant scenario 2[5, 1, '0.4', 0, 2][5, 1, '0.4', 0, 2]Passed

SHA-256 / 9fcbdbf90108c88421552133d149c6f6381a836c70847619042ee84067b4a0a2

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(events):
    total = wickets = legal = extras = 0
    striker, non = 1, 2
    next_bat = 3
    for e in events:
        if e == 'W':
            wickets += 1
            legal += 1
            striker = next_bat
            next_bat += 1
            ran = 0
        elif e.startswith('wd'):
            k = int(e[2:] or 0)
            total += 1 + k
            extras += 1 + k
            ran = k
        elif e.startswith('nb'):
            k = int(e[2:] or 0)
            total += 1 + k
            extras += 1
            ran = k
        elif e[0] in 'bl':
            k = int(e.lstrip('lb'))
            total += k
            extras += k
            legal += 1
            ran = k
        else:
            k = int(e)
            total += k
            legal += 1
            ran = k
        if ran % 2 == 1:
            striker, non = non, striker
        if e[:2] not in ('wd', 'nb') and legal % 6 == 0:
            striker, non = non, striker
    return [total, wickets, '%d.%d' % (legal // 6, legal % 6), extras, striker]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
def run(args):
    try:
        return solve(*args)
    except Exception as exc:
        return 'raised ' + type(exc).__name__
cases = [[('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['2', 'nb', 'lb1', '3', '1', 'nb', 'b4', 'nb'],),
   [14, 0, '0.5', 8, 2]),
  ('regression: no ball extras',
   (['3', 'nb4', 'b1', '0', '1', '0', 'wd4', '4', 'nb4', '1', 'wd', '0'],),
   [26, 0, '1.2', 9, 2]),
  ('variant scenario 1', (['3', '0', '4'],), [7, 0, '0.3', 0, 2]),
  ('variant scenario 2', (['4', '0', 'W', '1'],), [5, 1, '0.4', 0, 2])],
 [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['0', '1', 'nb4', '4', 'lb2', '1', 'lb2', 'wd', 'wd1', '0', '0', '6', '4', '0'],),
   [28, 0, '1.5', 8, 1]),
  ('variant scenario 1',
   (['4', '1', 'lb1', 'wd1', '1', '1', 'wd', 'wd', '2', '4', '2', '2', '1', '2', '2', '1'],),
   [28, 0, '2.1', 5, 2]),
  ('variant scenario 2', (['wd', '4', '1', '1'],), [7, 0, '0.3', 1, 1])],
 [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['nb',
     '1',
     '0',
     'lb2',
     '0',
     'nb4',
     'lb1',
     'b4',
     'lb1',
     'nb1',
     'lb1',
     '4',
     'lb2',
     '0',
     '6',
     'nb1',
     '0',
     '0',
     '6',
     'lb2'],),
   [40, 0, '2.4', 17, 1]),
  ('variant scenario 1',
   (['4', '0', '0', 'wd4', '4', '0', 'lb1', '0', 'wd1', 'wd4', '4', '4', '4', '4'],),
   [37, 0, '1.5', 13, 2]),
  ('variant scenario 2',
   (['0', '4', '0', 'nb1', '1', 'b1', 'nb', 'wd4', 'wd', '2', 'wd4', '0', '1', '1', 'nb'],),
   [25, 0, '1.3', 15, 1])],
 [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['0',
     'nb4',
     '3',
     '0',
     '0',
     '4',
     'W',
     'lb1',
     '4',
     'b4',
     '1',
     'wd',
     'W',
     'b4',
     '2',
     '0',
     '4',
     '1',
     'wd1',
     '4'],),
   [40, 2, '2.5', 13, 3]),
  ('variant scenario 1', (['0', '2', '1', '4', 'nb4', 'W', '0', '1', '0'],), [13, 1, '1.2', 1, 3]),
  ('variant scenario 2', (['1', '3', '4', '1', '4', 'nb', '2', '0', 'b1'],), [17, 0, '1.2', 2, 2])],
 [('control maiden over', (['0', '0', '0', '0', '0', '0'],), [0, 0, '1.0', 0, 2]),
  ('boundary single rotates strike', (['1'],), [1, 0, '0.1', 0, 2]),
  ('boundary wide is not a legal ball', (['wd', '4'],), [5, 0, '0.1', 1, 1]),
  ('control no-ball boundary', (['nb4'],), [5, 0, '0.0', 1, 1]),
  ('boundary wicket brings new striker', (['W', '0'],), [0, 1, '0.2', 0, 3]),
  ('control leg byes', (['lb1', '2'],), [3, 0, '0.2', 1, 2]),
  ('regression: no ball extras',
   (['1', '0', '4', '4', '1', '1', '0', '0', 'nb1', '1', 'lb2', 'lb2', 'wd1'],),
   [20, 0, '1.5', 7, 2]),
  ('regression: no ball extras',
   (['1', '2', 'nb', 'wd4', '0', '1', 'wd4', 'nb1', 'wd1', '2', 'nb'],),
   [22, 0, '0.5', 15, 1]),
  ('variant scenario 1', (['b1', '4', '1'],), [6, 0, '0.3', 1, 1]),
  ('variant scenario 2',
   (['wd', '1', 'wd1', 'W', 'b1', '2', 'nb1', '1', '1', 'wd4', '2', 'wd', '0', '0', '2'],),
   [21, 1, '1.4', 11, 2])]]
for label, args, expected in cases[N - 1]:
    check(label, run(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
control maiden over[0, 0, '1.0', 0, 2][0, 0, '1.0', 0, 2]Passed
boundary single rotates strike[1, 0, '0.1', 0, 2][1, 0, '0.1', 0, 2]Passed
boundary wide is not a legal ball[5, 0, '0.1', 1, 1][5, 0, '0.1', 1, 1]Passed
control no-ball boundary[5, 0, '0.0', 1, 1][5, 0, '0.0', 1, 1]Passed
boundary wicket brings new striker[0, 1, '0.2', 0, 3][0, 1, '0.2', 0, 3]Passed
control leg byes[3, 0, '0.2', 1, 2][3, 0, '0.2', 1, 2]Passed
regression: no ball extras[14, 0, '0.5', 8, 2][14, 0, '0.5', 8, 2]Passed
regression: no ball extras[26, 0, '1.2', 9, 2][26, 0, '1.2', 9, 2]Passed
variant scenario 1[7, 0, '0.3', 0, 2][7, 0, '0.3', 0, 2]Passed
variant scenario 2[5, 1, '0.4', 0, 2][5, 1, '0.4', 0, 2]Passed

SHA-256 / 4b568ebca8556b32c08afb9a90d38c36e622048feac6111a9071c27893e25524

Verification & scope

Stipulated, bounded toy contract stated in the contract field; not a claim of conformance with any governing body rulebook or operator house rules. 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:26.588574+00:00.

Case digest / f36b1064f5f041556438992070b536ad0f0dd3c1bd3e65641c063a249bd50b1d