FAILURE MAP
← Case archive

FA-84016 / Sports scoring and tiebreakers / Open access

Completed overs displayed as decimal thirds or 0.6 · case 01

After seven legal balls the overs read "1.2" or an over boundary reads "0.6".

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

ROOT CAUSE

Overs are displayed as legal / 6 formatted with one decimal.

VERIFIED REPAIR

Display completed overs and remaining balls as "O.B".

Unsuccessful approach: Showing the sixth ball as "x.6" instead of rolling to the next over is still wrong.

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
            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, '%.1f' % (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: overs display',
   (['0', 'nb', 'W', '0', 'b1', '0', '1', '1', '1', 'W', 'nb', 'nb4'],),
   [11, 2, '1.3', 4, 4]),
  ('regression: overs display',
   (['3', 'b4', '6', 'wd', '1', 'nb4', '0', '1'],),
   [21, 0, '1.0', 6, 1]),
  ('variant scenario 1', (['nb', '1', 'b1'],), [3, 0, '0.2', 2, 1]),
  ('variant scenario 2',
   (['wd4', '2', '0', 'nb', '2', '1', 'wd1', '2', 'W', 'lb1', '6'],),
   [22, 1, '1.2', 9, 3])],
 [('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: overs display', (['lb1', '4', '0', '0'],), [5, 0, '0.4', 1, 2]),
  ('regression: overs display',
   (['b4', 'wd1', 'wd', 'wd4', 'W', 'nb', '4', 'b4', 'b1', '0'],),
   [22, 1, '1.0', 18, 3]),
  ('variant scenario 1', (['0', 'nb4', 'wd4', 'b4'],), [14, 0, '0.2', 10, 1]),
  ('variant scenario 2',
   (['wd', 'wd', '0', '0', '4', '0', '6', '1', '0', '0', 'W', 'b1'],),
   [14, 1, '1.4', 3, 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: overs display', (['2', '1', 'nb1', '4', 'nb1', 'lb2'],), [13, 0, '0.4', 4, 2]),
  ('regression: overs display', (['6', '3', '0', '0', 'b1', '4'],), [14, 0, '1.0', 1, 2]),
  ('variant scenario 1',
   (['b1', 'nb1', '4', 'wd', '1', 'nb1', '0', 'wd1', 'W', '4', '1', '0', '0'],),
   [18, 1, '1.3', 6, 3]),
  ('variant scenario 2',
   (['wd',
     '4',
     '4',
     'nb',
     '0',
     '0',
     '3',
     '0',
     'nb',
     '2',
     '1',
     'nb4',
     '0',
     '4',
     '4',
     '0',
     'b4',
     '4'],),
   [38, 0, '2.2', 8, 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: overs display', (['nb4', '0', '3', '0', 'nb1', '0'],), [10, 0, '0.4', 2, 1]),
  ('regression: overs display',
   (['0', '1', '0', 'wd4', 'lb2', 'nb', '4', '0', '0', 'lb2', 'lb1', '0', '1', '4'],),
   [21, 0, '2.0', 11, 2]),
  ('variant scenario 1',
   (['W',
     '0',
     'nb1',
     'nb',
     'lb2',
     '0',
     'b4',
     'nb4',
     'W',
     '4',
     '1',
     '1',
     'wd',
     '0',
     'W',
     '4',
     '0',
     'lb2',
     '1',
     'b4',
     '2'],),
   [34, 3, '2.5', 16, 5]),
  ('variant scenario 2', (['2', '4', '1', '4', '6'],), [17, 0, '0.5', 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: overs display',
   (['1',
     '1',
     '1',
     '1',
     'nb',
     'lb1',
     'nb4',
     '1',
     '4',
     'b1',
     'wd1',
     '4',
     '2',
     '0',
     '1',
     '1',
     'nb',
     '0',
     '1',
     'wd4',
     'nb1'],),
   [36, 0, '2.3', 13, 1]),
  ('regression: overs display',
   (['wd4', 'nb', 'wd1', '0', '2', '6', '2', '4', '1', 'nb'],),
   [24, 0, '1.0', 9, 2]),
  ('variant scenario 1',
   (['4',
     '0',
     '0',
     '2',
     'nb4',
     'wd',
     'nb1',
     '0',
     '3',
     'nb',
     '2',
     '6',
     '0',
     '6',
     '6',
     '1',
     '0',
     '1'],),
   [40, 0, '2.2', 4, 1]),
  ('variant scenario 2',
   (['1', '3', '4', '0', '0', '0', '1', '4', 'b4', 'lb2', '6', 'b1', '1', '1', '0', 'W'],),
   [28, 1, '2.4', 7, 3])]]
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.2', 0, 2][1, 0, '0.1', 0, 2]Failed
boundary wide is not a legal ball[5, 0, '0.2', 1, 1][5, 0, '0.1', 1, 1]Failed
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.3', 0, 3][0, 1, '0.2', 0, 3]Failed
control leg byes[3, 0, '0.3', 1, 2][3, 0, '0.2', 1, 2]Failed
regression: overs display[11, 2, '1.5', 4, 4][11, 2, '1.3', 4, 4]Failed
regression: overs display[21, 0, '1.0', 6, 1][21, 0, '1.0', 6, 1]Passed
variant scenario 1[3, 0, '0.3', 2, 1][3, 0, '0.2', 2, 1]Failed
variant scenario 2[22, 1, '1.3', 9, 3][22, 1, '1.2', 9, 3]Failed

SHA-256 / 42b98c0c5bd8b9a0a4c3fadeb23b769e517c0f9bdd25f37fcf8d9c6ca87d26b8

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 += 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 - 1) // 6, (legal - 1) % 6 + 1) if legal else '0.0'), 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: overs display',
   (['0', 'nb', 'W', '0', 'b1', '0', '1', '1', '1', 'W', 'nb', 'nb4'],),
   [11, 2, '1.3', 4, 4]),
  ('regression: overs display',
   (['3', 'b4', '6', 'wd', '1', 'nb4', '0', '1'],),
   [21, 0, '1.0', 6, 1]),
  ('variant scenario 1', (['nb', '1', 'b1'],), [3, 0, '0.2', 2, 1]),
  ('variant scenario 2',
   (['wd4', '2', '0', 'nb', '2', '1', 'wd1', '2', 'W', 'lb1', '6'],),
   [22, 1, '1.2', 9, 3])],
 [('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: overs display', (['lb1', '4', '0', '0'],), [5, 0, '0.4', 1, 2]),
  ('regression: overs display',
   (['b4', 'wd1', 'wd', 'wd4', 'W', 'nb', '4', 'b4', 'b1', '0'],),
   [22, 1, '1.0', 18, 3]),
  ('variant scenario 1', (['0', 'nb4', 'wd4', 'b4'],), [14, 0, '0.2', 10, 1]),
  ('variant scenario 2',
   (['wd', 'wd', '0', '0', '4', '0', '6', '1', '0', '0', 'W', 'b1'],),
   [14, 1, '1.4', 3, 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: overs display', (['2', '1', 'nb1', '4', 'nb1', 'lb2'],), [13, 0, '0.4', 4, 2]),
  ('regression: overs display', (['6', '3', '0', '0', 'b1', '4'],), [14, 0, '1.0', 1, 2]),
  ('variant scenario 1',
   (['b1', 'nb1', '4', 'wd', '1', 'nb1', '0', 'wd1', 'W', '4', '1', '0', '0'],),
   [18, 1, '1.3', 6, 3]),
  ('variant scenario 2',
   (['wd',
     '4',
     '4',
     'nb',
     '0',
     '0',
     '3',
     '0',
     'nb',
     '2',
     '1',
     'nb4',
     '0',
     '4',
     '4',
     '0',
     'b4',
     '4'],),
   [38, 0, '2.2', 8, 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: overs display', (['nb4', '0', '3', '0', 'nb1', '0'],), [10, 0, '0.4', 2, 1]),
  ('regression: overs display',
   (['0', '1', '0', 'wd4', 'lb2', 'nb', '4', '0', '0', 'lb2', 'lb1', '0', '1', '4'],),
   [21, 0, '2.0', 11, 2]),
  ('variant scenario 1',
   (['W',
     '0',
     'nb1',
     'nb',
     'lb2',
     '0',
     'b4',
     'nb4',
     'W',
     '4',
     '1',
     '1',
     'wd',
     '0',
     'W',
     '4',
     '0',
     'lb2',
     '1',
     'b4',
     '2'],),
   [34, 3, '2.5', 16, 5]),
  ('variant scenario 2', (['2', '4', '1', '4', '6'],), [17, 0, '0.5', 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: overs display',
   (['1',
     '1',
     '1',
     '1',
     'nb',
     'lb1',
     'nb4',
     '1',
     '4',
     'b1',
     'wd1',
     '4',
     '2',
     '0',
     '1',
     '1',
     'nb',
     '0',
     '1',
     'wd4',
     'nb1'],),
   [36, 0, '2.3', 13, 1]),
  ('regression: overs display',
   (['wd4', 'nb', 'wd1', '0', '2', '6', '2', '4', '1', 'nb'],),
   [24, 0, '1.0', 9, 2]),
  ('variant scenario 1',
   (['4',
     '0',
     '0',
     '2',
     'nb4',
     'wd',
     'nb1',
     '0',
     '3',
     'nb',
     '2',
     '6',
     '0',
     '6',
     '6',
     '1',
     '0',
     '1'],),
   [40, 0, '2.2', 4, 1]),
  ('variant scenario 2',
   (['1', '3', '4', '0', '0', '0', '1', '4', 'b4', 'lb2', '6', 'b1', '1', '1', '0', 'W'],),
   [28, 1, '2.4', 7, 3])]]
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, '0.6', 0, 2][0, 0, '1.0', 0, 2]Failed
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: overs display[11, 2, '1.3', 4, 4][11, 2, '1.3', 4, 4]Passed
regression: overs display[21, 0, '0.6', 6, 1][21, 0, '1.0', 6, 1]Failed
variant scenario 1[3, 0, '0.2', 2, 1][3, 0, '0.2', 2, 1]Passed
variant scenario 2[22, 1, '1.2', 9, 3][22, 1, '1.2', 9, 3]Passed

SHA-256 / ecf4e5867777b25e6f073949460ac7cdd8a8328ef2041dc85e284ab1dea4fd59

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: overs display',
   (['0', 'nb', 'W', '0', 'b1', '0', '1', '1', '1', 'W', 'nb', 'nb4'],),
   [11, 2, '1.3', 4, 4]),
  ('regression: overs display',
   (['3', 'b4', '6', 'wd', '1', 'nb4', '0', '1'],),
   [21, 0, '1.0', 6, 1]),
  ('variant scenario 1', (['nb', '1', 'b1'],), [3, 0, '0.2', 2, 1]),
  ('variant scenario 2',
   (['wd4', '2', '0', 'nb', '2', '1', 'wd1', '2', 'W', 'lb1', '6'],),
   [22, 1, '1.2', 9, 3])],
 [('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: overs display', (['lb1', '4', '0', '0'],), [5, 0, '0.4', 1, 2]),
  ('regression: overs display',
   (['b4', 'wd1', 'wd', 'wd4', 'W', 'nb', '4', 'b4', 'b1', '0'],),
   [22, 1, '1.0', 18, 3]),
  ('variant scenario 1', (['0', 'nb4', 'wd4', 'b4'],), [14, 0, '0.2', 10, 1]),
  ('variant scenario 2',
   (['wd', 'wd', '0', '0', '4', '0', '6', '1', '0', '0', 'W', 'b1'],),
   [14, 1, '1.4', 3, 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: overs display', (['2', '1', 'nb1', '4', 'nb1', 'lb2'],), [13, 0, '0.4', 4, 2]),
  ('regression: overs display', (['6', '3', '0', '0', 'b1', '4'],), [14, 0, '1.0', 1, 2]),
  ('variant scenario 1',
   (['b1', 'nb1', '4', 'wd', '1', 'nb1', '0', 'wd1', 'W', '4', '1', '0', '0'],),
   [18, 1, '1.3', 6, 3]),
  ('variant scenario 2',
   (['wd',
     '4',
     '4',
     'nb',
     '0',
     '0',
     '3',
     '0',
     'nb',
     '2',
     '1',
     'nb4',
     '0',
     '4',
     '4',
     '0',
     'b4',
     '4'],),
   [38, 0, '2.2', 8, 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: overs display', (['nb4', '0', '3', '0', 'nb1', '0'],), [10, 0, '0.4', 2, 1]),
  ('regression: overs display',
   (['0', '1', '0', 'wd4', 'lb2', 'nb', '4', '0', '0', 'lb2', 'lb1', '0', '1', '4'],),
   [21, 0, '2.0', 11, 2]),
  ('variant scenario 1',
   (['W',
     '0',
     'nb1',
     'nb',
     'lb2',
     '0',
     'b4',
     'nb4',
     'W',
     '4',
     '1',
     '1',
     'wd',
     '0',
     'W',
     '4',
     '0',
     'lb2',
     '1',
     'b4',
     '2'],),
   [34, 3, '2.5', 16, 5]),
  ('variant scenario 2', (['2', '4', '1', '4', '6'],), [17, 0, '0.5', 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: overs display',
   (['1',
     '1',
     '1',
     '1',
     'nb',
     'lb1',
     'nb4',
     '1',
     '4',
     'b1',
     'wd1',
     '4',
     '2',
     '0',
     '1',
     '1',
     'nb',
     '0',
     '1',
     'wd4',
     'nb1'],),
   [36, 0, '2.3', 13, 1]),
  ('regression: overs display',
   (['wd4', 'nb', 'wd1', '0', '2', '6', '2', '4', '1', 'nb'],),
   [24, 0, '1.0', 9, 2]),
  ('variant scenario 1',
   (['4',
     '0',
     '0',
     '2',
     'nb4',
     'wd',
     'nb1',
     '0',
     '3',
     'nb',
     '2',
     '6',
     '0',
     '6',
     '6',
     '1',
     '0',
     '1'],),
   [40, 0, '2.2', 4, 1]),
  ('variant scenario 2',
   (['1', '3', '4', '0', '0', '0', '1', '4', 'b4', 'lb2', '6', 'b1', '1', '1', '0', 'W'],),
   [28, 1, '2.4', 7, 3])]]
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: overs display[11, 2, '1.3', 4, 4][11, 2, '1.3', 4, 4]Passed
regression: overs display[21, 0, '1.0', 6, 1][21, 0, '1.0', 6, 1]Passed
variant scenario 1[3, 0, '0.2', 2, 1][3, 0, '0.2', 2, 1]Passed
variant scenario 2[22, 1, '1.2', 9, 3][22, 1, '1.2', 9, 3]Passed

SHA-256 / 20fab86325825bd49c09ced870c6ccacb8e2cc3c68067dca27252537faad66ee

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

Case digest / 45796b25d5a0335250044ea0e489abdd257aed00fddbea4aee9ec48f6fad4a12