FAILURE MAP
← Case archive

FA-84141 / Sports scoring and tiebreakers / Open access

Extra-inning games never become final · case 01

A game decided in the tenth inning stays in progress.

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

ROOT CAUSE

Completion after a full inning requires exactly the scheduled number of innings.

THE FAILURE

Completion after a full inning requires exactly the scheduled number of innings.

Unsuccessful approach: Requiring more than the scheduled innings forgets regulation-length games.

Case contract

Game status from a line score. away and home list runs per inning; home has either the same number of entries as away or one fewer (bottom half not yet played), otherwise return "invalid". When home is one short: if at least scheduled innings have started and home leads, the game is final (home wins without batting); otherwise in progress. When equal length: if at least scheduled innings are complete and the score is not tied, the game is final; ties continue into extra innings. Return ["final", "home"/"away", innings] or ["in progress", None, None].

Why this case matters

Scoreboards and settlement engines decide when a baseball game is official and who won.

1 / The failure

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

N = 1
observations = []
def solve(away, home, scheduled):
    A = sum(away)
    H = sum(home)
    na, nh = len(away), len(home)
    if nh not in (na, na - 1):
        return 'invalid'
    if nh == na - 1:
        if na >= scheduled and H > A:
            return ['final', 'home', na]
        return ['in progress', None, None]
    if na == scheduled and A != H:
        return ['final', 'home' if H > A else 'away', na]
    return ['in progress', None, None]
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 home leads skip bottom ninth',
   ([0, 0, 0, 0, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'home', 9]),
  ('boundary tied after nine',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control away wins in ten',
   ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'away', 10]),
  ('boundary mid-game', ([1, 0, 0], [0, 0], 9), ['in progress', None, None]),
  ('boundary home trails before bottom ninth',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control malformed line', ([1, 0], [0, 0, 0], 9), 'invalid'),
  ('regression: extra inning completion',
   ([3, 2, 1, 1, 0, 2, 0, 1, 0], [3, 1, 1, 2, 1, 3, 0, 0, 0], 9),
   ['final', 'home', 9]),
  ('regression: extra inning completion',
   ([1, 1, 0, 1, 1, 0, 3, 0], [1, 0, 3, 0, 0, 2, 0, 3], 7),
   ['final', 'home', 8]),
  ('variant scenario 1',
   ([0, 3, 2, 3, 1, 3, 0, 3, 0], [2, 2, 2, 3, 2, 1, 0, 2], 9),
   ['in progress', None, None]),
  ('variant scenario 2',
   ([3, 0, 0, 3, 1, 1, 0], [2, 0, 0, 3, 1, 1, 1], 7),
   ['in progress', None, None])],
 [('control home leads skip bottom ninth',
   ([0, 0, 0, 0, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'home', 9]),
  ('boundary tied after nine',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control away wins in ten',
   ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'away', 10]),
  ('boundary mid-game', ([1, 0, 0], [0, 0], 9), ['in progress', None, None]),
  ('boundary home trails before bottom ninth',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control malformed line', ([1, 0], [0, 0, 0], 9), 'invalid'),
  ('regression: extra inning completion',
   ([0, 3, 2, 3, 0, 0, 3, 1, 3, 0, 1, 2], [3, 1, 1, 0, 1, 0, 3, 2, 0, 0, 0, 0], 9),
   ['final', 'away', 12]),
  ('regression: extra inning completion',
   ([0, 1, 1, 0, 1, 1, 1, 1, 0], [1, 0, 2, 3, 0, 1, 0, 1, 3], 9),
   ['final', 'home', 9]),
  ('variant scenario 1', ([0, 1, 0, 1, 0, 0], [0, 2, 2, 0, 3, 0], 9), ['in progress', None, None]),
  ('variant scenario 2',
   ([0, 0, 0, 0, 2, 1, 0], [0, 1, 1, 0, 0, 3, 0], 9),
   ['in progress', None, None])],
 [('control home leads skip bottom ninth',
   ([0, 0, 0, 0, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'home', 9]),
  ('boundary tied after nine',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control away wins in ten',
   ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'away', 10]),
  ('boundary mid-game', ([1, 0, 0], [0, 0], 9), ['in progress', None, None]),
  ('boundary home trails before bottom ninth',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control malformed line', ([1, 0], [0, 0, 0], 9), 'invalid'),
  ('regression: extra inning completion',
   ([0, 1, 0, 3, 0, 0, 0, 1, 1, 1], [0, 2, 0, 0, 0, 0, 0, 3, 1, 0], 7),
   ['final', 'away', 10]),
  ('regression: extra inning completion',
   ([0, 0, 0, 0, 1, 0, 1, 2, 1], [0, 3, 1, 1, 1, 0, 1, 1, 0], 9),
   ['final', 'home', 9]),
  ('variant scenario 1',
   ([2, 3, 2, 0, 3, 1, 0], [0, 0, 1, 0, 1, 3], 9),
   ['in progress', None, None]),
  ('variant scenario 2',
   ([1, 1, 0, 3, 0, 0, 2, 0, 0, 1, 3], [3, 1, 1, 1, 2, 0, 1, 3, 0, 0], 9),
   ['final', 'home', 11])],
 [('control home leads skip bottom ninth',
   ([0, 0, 0, 0, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'home', 9]),
  ('boundary tied after nine',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control away wins in ten',
   ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'away', 10]),
  ('boundary mid-game', ([1, 0, 0], [0, 0], 9), ['in progress', None, None]),
  ('boundary home trails before bottom ninth',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control malformed line', ([1, 0], [0, 0, 0], 9), 'invalid'),
  ('regression: extra inning completion',
   ([0, 0, 3, 1, 3, 1, 3], [0, 1, 3, 0, 0, 1, 0], 7),
   ['final', 'away', 7]),
  ('regression: extra inning completion',
   ([1, 1, 0, 2, 0, 2, 0, 0, 3, 0, 1], [3, 0, 1, 2, 3, 1, 3, 1, 1, 2, 0], 9),
   ['final', 'home', 11]),
  ('variant scenario 1',
   ([0, 0, 0, 0, 0, 2, 1, 0, 1, 3, 3, 0], [0, 3, 0, 0, 2, 1, 0, 1, 0, 2, 1], 9),
   ['in progress', None, None]),
  ('variant scenario 2',
   ([3, 0, 1, 0, 1, 2, 0, 2, 3, 2], [2, 1, 0, 0, 0, 1, 1, 0, 3, 0], 7),
   ['final', 'away', 10])],
 [('control home leads skip bottom ninth',
   ([0, 0, 0, 0, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'home', 9]),
  ('boundary tied after nine',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control away wins in ten',
   ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'away', 10]),
  ('boundary mid-game', ([1, 0, 0], [0, 0], 9), ['in progress', None, None]),
  ('boundary home trails before bottom ninth',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control malformed line', ([1, 0], [0, 0, 0], 9), 'invalid'),
  ('regression: extra inning completion',
   ([3, 1, 1, 3, 1, 1, 2, 2], [1, 1, 1, 0, 3, 1, 0, 1], 7),
   ['final', 'away', 8]),
  ('regression: extra inning completion',
   ([0, 3, 1, 1, 2, 3, 1], [1, 2, 3, 0, 0, 0, 2], 7),
   ['final', 'away', 7]),
  ('variant scenario 1',
   ([0, 1, 0, 1, 3, 1, 1, 0, 3, 2, 1, 2], [2, 0, 3, 1, 0, 3, 0, 0, 1, 0, 2], 9),
   ['in progress', None, None]),
  ('variant scenario 2',
   ([2, 0, 1, 0, 1, 0, 2, 1, 3, 1, 2, 0], [1, 0, 0, 1, 1, 0, 0, 0, 0, 1], 9),
   'invalid')]]
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 home leads skip bottom ninth['final', 'home', 9]['final', 'home', 9]Passed
boundary tied after nine['in progress', None, None]['in progress', None, None]Passed
control away wins in ten['in progress', None, None]['final', 'away', 10]Failed
boundary mid-game['in progress', None, None]['in progress', None, None]Passed
boundary home trails before bottom ninth['in progress', None, None]['in progress', None, None]Passed
control malformed lineinvalidinvalidPassed
regression: extra inning completion['final', 'home', 9]['final', 'home', 9]Passed
regression: extra inning completion['in progress', None, None]['final', 'home', 8]Failed
variant scenario 1['in progress', None, None]['in progress', None, None]Passed
variant scenario 2['in progress', None, None]['in progress', None, None]Passed

SHA-256 / c1b1020a3bdf4991d788f91f5f3131715da47b144f5681a8a67e99d1a8e6c309

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(away, home, scheduled):
    A = sum(away)
    H = sum(home)
    na, nh = len(away), len(home)
    if nh not in (na, na - 1):
        return 'invalid'
    if nh == na - 1:
        if na >= scheduled and H > A:
            return ['final', 'home', na]
        return ['in progress', None, None]
    if na > scheduled and A != H:
        return ['final', 'home' if H > A else 'away', na]
    return ['in progress', None, None]
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 home leads skip bottom ninth',
   ([0, 0, 0, 0, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'home', 9]),
  ('boundary tied after nine',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control away wins in ten',
   ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'away', 10]),
  ('boundary mid-game', ([1, 0, 0], [0, 0], 9), ['in progress', None, None]),
  ('boundary home trails before bottom ninth',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control malformed line', ([1, 0], [0, 0, 0], 9), 'invalid'),
  ('regression: extra inning completion',
   ([3, 2, 1, 1, 0, 2, 0, 1, 0], [3, 1, 1, 2, 1, 3, 0, 0, 0], 9),
   ['final', 'home', 9]),
  ('regression: extra inning completion',
   ([1, 1, 0, 1, 1, 0, 3, 0], [1, 0, 3, 0, 0, 2, 0, 3], 7),
   ['final', 'home', 8]),
  ('variant scenario 1',
   ([0, 3, 2, 3, 1, 3, 0, 3, 0], [2, 2, 2, 3, 2, 1, 0, 2], 9),
   ['in progress', None, None]),
  ('variant scenario 2',
   ([3, 0, 0, 3, 1, 1, 0], [2, 0, 0, 3, 1, 1, 1], 7),
   ['in progress', None, None])],
 [('control home leads skip bottom ninth',
   ([0, 0, 0, 0, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'home', 9]),
  ('boundary tied after nine',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control away wins in ten',
   ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'away', 10]),
  ('boundary mid-game', ([1, 0, 0], [0, 0], 9), ['in progress', None, None]),
  ('boundary home trails before bottom ninth',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control malformed line', ([1, 0], [0, 0, 0], 9), 'invalid'),
  ('regression: extra inning completion',
   ([0, 3, 2, 3, 0, 0, 3, 1, 3, 0, 1, 2], [3, 1, 1, 0, 1, 0, 3, 2, 0, 0, 0, 0], 9),
   ['final', 'away', 12]),
  ('regression: extra inning completion',
   ([0, 1, 1, 0, 1, 1, 1, 1, 0], [1, 0, 2, 3, 0, 1, 0, 1, 3], 9),
   ['final', 'home', 9]),
  ('variant scenario 1', ([0, 1, 0, 1, 0, 0], [0, 2, 2, 0, 3, 0], 9), ['in progress', None, None]),
  ('variant scenario 2',
   ([0, 0, 0, 0, 2, 1, 0], [0, 1, 1, 0, 0, 3, 0], 9),
   ['in progress', None, None])],
 [('control home leads skip bottom ninth',
   ([0, 0, 0, 0, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'home', 9]),
  ('boundary tied after nine',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control away wins in ten',
   ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'away', 10]),
  ('boundary mid-game', ([1, 0, 0], [0, 0], 9), ['in progress', None, None]),
  ('boundary home trails before bottom ninth',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control malformed line', ([1, 0], [0, 0, 0], 9), 'invalid'),
  ('regression: extra inning completion',
   ([0, 1, 0, 3, 0, 0, 0, 1, 1, 1], [0, 2, 0, 0, 0, 0, 0, 3, 1, 0], 7),
   ['final', 'away', 10]),
  ('regression: extra inning completion',
   ([0, 0, 0, 0, 1, 0, 1, 2, 1], [0, 3, 1, 1, 1, 0, 1, 1, 0], 9),
   ['final', 'home', 9]),
  ('variant scenario 1',
   ([2, 3, 2, 0, 3, 1, 0], [0, 0, 1, 0, 1, 3], 9),
   ['in progress', None, None]),
  ('variant scenario 2',
   ([1, 1, 0, 3, 0, 0, 2, 0, 0, 1, 3], [3, 1, 1, 1, 2, 0, 1, 3, 0, 0], 9),
   ['final', 'home', 11])],
 [('control home leads skip bottom ninth',
   ([0, 0, 0, 0, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'home', 9]),
  ('boundary tied after nine',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control away wins in ten',
   ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'away', 10]),
  ('boundary mid-game', ([1, 0, 0], [0, 0], 9), ['in progress', None, None]),
  ('boundary home trails before bottom ninth',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control malformed line', ([1, 0], [0, 0, 0], 9), 'invalid'),
  ('regression: extra inning completion',
   ([0, 0, 3, 1, 3, 1, 3], [0, 1, 3, 0, 0, 1, 0], 7),
   ['final', 'away', 7]),
  ('regression: extra inning completion',
   ([1, 1, 0, 2, 0, 2, 0, 0, 3, 0, 1], [3, 0, 1, 2, 3, 1, 3, 1, 1, 2, 0], 9),
   ['final', 'home', 11]),
  ('variant scenario 1',
   ([0, 0, 0, 0, 0, 2, 1, 0, 1, 3, 3, 0], [0, 3, 0, 0, 2, 1, 0, 1, 0, 2, 1], 9),
   ['in progress', None, None]),
  ('variant scenario 2',
   ([3, 0, 1, 0, 1, 2, 0, 2, 3, 2], [2, 1, 0, 0, 0, 1, 1, 0, 3, 0], 7),
   ['final', 'away', 10])],
 [('control home leads skip bottom ninth',
   ([0, 0, 0, 0, 0, 0, 0, 0, 1], [2, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'home', 9]),
  ('boundary tied after nine',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control away wins in ten',
   ([0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['final', 'away', 10]),
  ('boundary mid-game', ([1, 0, 0], [0, 0], 9), ['in progress', None, None]),
  ('boundary home trails before bottom ninth',
   ([1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], 9),
   ['in progress', None, None]),
  ('control malformed line', ([1, 0], [0, 0, 0], 9), 'invalid'),
  ('regression: extra inning completion',
   ([3, 1, 1, 3, 1, 1, 2, 2], [1, 1, 1, 0, 3, 1, 0, 1], 7),
   ['final', 'away', 8]),
  ('regression: extra inning completion',
   ([0, 3, 1, 1, 2, 3, 1], [1, 2, 3, 0, 0, 0, 2], 7),
   ['final', 'away', 7]),
  ('variant scenario 1',
   ([0, 1, 0, 1, 3, 1, 1, 0, 3, 2, 1, 2], [2, 0, 3, 1, 0, 3, 0, 0, 1, 0, 2], 9),
   ['in progress', None, None]),
  ('variant scenario 2',
   ([2, 0, 1, 0, 1, 0, 2, 1, 3, 1, 2, 0], [1, 0, 0, 1, 1, 0, 0, 0, 0, 1], 9),
   'invalid')]]
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 home leads skip bottom ninth['final', 'home', 9]['final', 'home', 9]Passed
boundary tied after nine['in progress', None, None]['in progress', None, None]Passed
control away wins in ten['final', 'away', 10]['final', 'away', 10]Passed
boundary mid-game['in progress', None, None]['in progress', None, None]Passed
boundary home trails before bottom ninth['in progress', None, None]['in progress', None, None]Passed
control malformed lineinvalidinvalidPassed
regression: extra inning completion['in progress', None, None]['final', 'home', 9]Failed
regression: extra inning completion['final', 'home', 8]['final', 'home', 8]Passed
variant scenario 1['in progress', None, None]['in progress', None, None]Passed
variant scenario 2['in progress', None, None]['in progress', None, None]Passed

SHA-256 / aeb0731fa5d6de932f32cee953043581be79ad935e8f85cf0045f583179b6b82

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 10 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / f9490db094f33f1ccb719f822db3f59107506f3f9a6a62055a5a09215ad7d6c0