FAILURE MAP
← Case archive

FA-84176 / Sports scoring and tiebreakers / Open access

No-return hole crashes or vanishes from the card · case 01

A hole marked with no score raises an error or disappears from the per-hole list.

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

ROOT CAUSE

The None strokes value reaches the arithmetic.

VERIFIED REPAIR

Record 0 points for a hole with no score and keep the hole in the list.

Unsuccessful approach: Skipping the hole keeps the total right but misaligns the per-hole points.

Case contract

Stableford points with stroke allocation. holes rows are [par, stroke_index, strokes] with stroke index 1-18 and strokes None for a hole with no score. A handicap H >= 0 receives H // 18 strokes on every hole plus one more on holes with stroke index <= H % 18. A plus handicap (H < 0) gives back one stroke on holes with stroke index > 18 + H. Points = max(0, 2 + par - (strokes - received)); a hole with no score earns 0. Return [total, per-hole points].

Why this case matters

Club competition software computes Stableford totals from gross cards and course handicaps.

1 / The failure

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

N = 1
observations = []
def solve(holes, handicap):
    per = []
    for par, si, strokes in holes:
        if handicap >= 0:
            received = handicap // 18 + (1 if si <= handicap % 18 else 0)
        else:
            received = -1 if si > 18 + handicap else 0
        per.append(max(0, 2 + par - (strokes - received)))
    return [sum(per), per]
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 scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole',
   ([[5, 11, 6],
     [4, 4, 7],
     [3, 9, 4],
     [5, 1, 9],
     [3, 5, None],
     [4, 3, 3],
     [4, 16, 5],
     [3, 7, 4],
     [3, 12, 6]],
    20),
   [12, [2, 0, 2, 0, 0, 4, 2, 2, 0]]),
  ('variant scenario 1',
   ([[3, 10, 4], [4, 5, 7], [3, 15, 6], [3, 6, 2], [4, 8, 4], [4, 7, 4], [4, 14, 7]], 18),
   [12, [2, 0, 0, 4, 3, 3, 0]]),
  ('variant scenario 2', ([[5, 11, 5], [4, 3, 5], [4, 15, 8]], 18), [5, [3, 2, 0]])],
 [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole', ([[3, 6, 1], [4, 2, 5], [4, 9, None]], 2), [6, [4, 2, 0]]),
  ('variant scenario 1',
   ([[5, 10, 6],
     [5, 13, 7],
     [5, 12, None],
     [3, 2, 5],
     [4, 18, 4],
     [4, 7, 2],
     [5, 16, None],
     [3, 6, 3],
     [4, 8, 2],
     [4, 4, 4]],
    18),
   [23, [2, 1, 0, 1, 3, 5, 0, 3, 5, 3]]),
  ('variant scenario 2',
   ([[4, 15, None], [4, 17, 6], [4, 13, 5], [4, 1, 4], [4, 16, 4], [4, 7, 8]], 20),
   [10, [0, 1, 2, 4, 3, 0]])],
 [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole',
   ([[5, 16, 6], [3, 11, 2], [5, 3, 5], [4, 10, 6], [5, 18, None], [4, 5, 5], [4, 8, 5]], 6),
   [10, [1, 3, 3, 0, 0, 2, 1]]),
  ('variant scenario 1',
   ([[4, 6, 4], [4, 5, 8], [5, 3, 4], [3, 8, 4], [4, 12, 2], [5, 17, 8], [3, 15, 4], [4, 14, 2]],
    8),
   [18, [3, 0, 4, 2, 4, 0, 1, 4]]),
  ('variant scenario 2',
   ([[4, 10, 6],
     [4, 2, 6],
     [3, 14, 4],
     [4, 6, 8],
     [5, 9, 6],
     [4, 5, 5],
     [3, 17, 2],
     [3, 12, 4],
     [5, 8, 3],
     [5, 15, 7]],
    2),
   [12, [0, 1, 1, 0, 1, 1, 3, 1, 4, 0]])],
 [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole',
   ([[4, 3, 5],
     [5, 16, 3],
     [4, 11, 7],
     [3, 18, 6],
     [4, 9, 8],
     [5, 10, None],
     [5, 1, 8],
     [4, 5, 8],
     [5, 15, 9],
     [4, 6, 2],
     [5, 12, 9]],
    -2),
   [9, [1, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0]]),
  ('variant scenario 1',
   ([[3, 9, 5],
     [3, 10, 1],
     [4, 14, 2],
     [5, 11, 5],
     [4, 16, 3],
     [5, 15, 9],
     [3, 8, 3],
     [4, 13, 4],
     [3, 3, 6],
     [4, 17, 4],
     [5, 4, 5],
     [3, 2, 4]],
    -2),
   [21, [0, 4, 4, 2, 3, 0, 2, 2, 0, 1, 2, 1]]),
  ('variant scenario 2',
   ([[4, 13, 5],
     [3, 11, 5],
     [4, 18, 6],
     [5, 14, 9],
     [4, 17, 5],
     [5, 7, 4],
     [5, 3, 9],
     [5, 4, 6],
     [3, 16, 4],
     [3, 10, 1],
     [4, 8, 2]],
    20),
   [24, [2, 1, 1, 0, 2, 4, 0, 2, 2, 5, 5]])],
 [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole',
   ([[4, 7, 5],
     [3, 3, 4],
     [3, 5, 4],
     [3, 4, 4],
     [3, 12, 7],
     [5, 8, 8],
     [4, 10, None],
     [5, 6, None],
     [4, 16, 6],
     [5, 15, 6],
     [3, 11, 1]],
    23),
   [19, [2, 3, 3, 3, 0, 0, 0, 0, 1, 2, 5]]),
  ('variant scenario 1', ([[4, 2, 3], [4, 1, 4], [4, 9, 2]], 18), [12, [4, 3, 5]]),
  ('variant scenario 2',
   ([[5, 5, 6], [4, 16, 3], [4, 11, 5], [4, 10, 5], [4, 6, 8]], -2),
   [6, [1, 3, 1, 1, 0]])]]
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 scratch par[4, [2, 2]][4, [2, 2]]Passed
boundary stroke index equals remainder[3, [2, 1]][3, [2, 1]]Passed
boundary second shot above 18[3, [2, 1]][3, [2, 1]]Passed
boundary plus handicap[3, [1, 2]][3, [1, 2]]Passed
control blob holeraised TypeError[0, [0, 0]]Failed
control net albatross[4, [4]][4, [4]]Passed
regression: no score holeraised TypeError[12, [2, 0, 2, 0, 0, 4, 2, 2, 0]]Failed
variant scenario 1[12, [2, 0, 0, 4, 3, 3, 0]][12, [2, 0, 0, 4, 3, 3, 0]]Passed
variant scenario 2[5, [3, 2, 0]][5, [3, 2, 0]]Passed

SHA-256 / 3439d3ec07f9ee72d3186a7646bcceb52be459b43cea8f4874eb3101de5056e5

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(holes, handicap):
    per = []
    for par, si, strokes in holes:
        if handicap >= 0:
            received = handicap // 18 + (1 if si <= handicap % 18 else 0)
        else:
            received = -1 if si > 18 + handicap else 0
        if strokes is None:
            continue
        per.append(max(0, 2 + par - (strokes - received)))
    return [sum(per), per]
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 scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole',
   ([[5, 11, 6],
     [4, 4, 7],
     [3, 9, 4],
     [5, 1, 9],
     [3, 5, None],
     [4, 3, 3],
     [4, 16, 5],
     [3, 7, 4],
     [3, 12, 6]],
    20),
   [12, [2, 0, 2, 0, 0, 4, 2, 2, 0]]),
  ('variant scenario 1',
   ([[3, 10, 4], [4, 5, 7], [3, 15, 6], [3, 6, 2], [4, 8, 4], [4, 7, 4], [4, 14, 7]], 18),
   [12, [2, 0, 0, 4, 3, 3, 0]]),
  ('variant scenario 2', ([[5, 11, 5], [4, 3, 5], [4, 15, 8]], 18), [5, [3, 2, 0]])],
 [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole', ([[3, 6, 1], [4, 2, 5], [4, 9, None]], 2), [6, [4, 2, 0]]),
  ('variant scenario 1',
   ([[5, 10, 6],
     [5, 13, 7],
     [5, 12, None],
     [3, 2, 5],
     [4, 18, 4],
     [4, 7, 2],
     [5, 16, None],
     [3, 6, 3],
     [4, 8, 2],
     [4, 4, 4]],
    18),
   [23, [2, 1, 0, 1, 3, 5, 0, 3, 5, 3]]),
  ('variant scenario 2',
   ([[4, 15, None], [4, 17, 6], [4, 13, 5], [4, 1, 4], [4, 16, 4], [4, 7, 8]], 20),
   [10, [0, 1, 2, 4, 3, 0]])],
 [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole',
   ([[5, 16, 6], [3, 11, 2], [5, 3, 5], [4, 10, 6], [5, 18, None], [4, 5, 5], [4, 8, 5]], 6),
   [10, [1, 3, 3, 0, 0, 2, 1]]),
  ('variant scenario 1',
   ([[4, 6, 4], [4, 5, 8], [5, 3, 4], [3, 8, 4], [4, 12, 2], [5, 17, 8], [3, 15, 4], [4, 14, 2]],
    8),
   [18, [3, 0, 4, 2, 4, 0, 1, 4]]),
  ('variant scenario 2',
   ([[4, 10, 6],
     [4, 2, 6],
     [3, 14, 4],
     [4, 6, 8],
     [5, 9, 6],
     [4, 5, 5],
     [3, 17, 2],
     [3, 12, 4],
     [5, 8, 3],
     [5, 15, 7]],
    2),
   [12, [0, 1, 1, 0, 1, 1, 3, 1, 4, 0]])],
 [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole',
   ([[4, 3, 5],
     [5, 16, 3],
     [4, 11, 7],
     [3, 18, 6],
     [4, 9, 8],
     [5, 10, None],
     [5, 1, 8],
     [4, 5, 8],
     [5, 15, 9],
     [4, 6, 2],
     [5, 12, 9]],
    -2),
   [9, [1, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0]]),
  ('variant scenario 1',
   ([[3, 9, 5],
     [3, 10, 1],
     [4, 14, 2],
     [5, 11, 5],
     [4, 16, 3],
     [5, 15, 9],
     [3, 8, 3],
     [4, 13, 4],
     [3, 3, 6],
     [4, 17, 4],
     [5, 4, 5],
     [3, 2, 4]],
    -2),
   [21, [0, 4, 4, 2, 3, 0, 2, 2, 0, 1, 2, 1]]),
  ('variant scenario 2',
   ([[4, 13, 5],
     [3, 11, 5],
     [4, 18, 6],
     [5, 14, 9],
     [4, 17, 5],
     [5, 7, 4],
     [5, 3, 9],
     [5, 4, 6],
     [3, 16, 4],
     [3, 10, 1],
     [4, 8, 2]],
    20),
   [24, [2, 1, 1, 0, 2, 4, 0, 2, 2, 5, 5]])],
 [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole',
   ([[4, 7, 5],
     [3, 3, 4],
     [3, 5, 4],
     [3, 4, 4],
     [3, 12, 7],
     [5, 8, 8],
     [4, 10, None],
     [5, 6, None],
     [4, 16, 6],
     [5, 15, 6],
     [3, 11, 1]],
    23),
   [19, [2, 3, 3, 3, 0, 0, 0, 0, 1, 2, 5]]),
  ('variant scenario 1', ([[4, 2, 3], [4, 1, 4], [4, 9, 2]], 18), [12, [4, 3, 5]]),
  ('variant scenario 2',
   ([[5, 5, 6], [4, 16, 3], [4, 11, 5], [4, 10, 5], [4, 6, 8]], -2),
   [6, [1, 3, 1, 1, 0]])]]
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 scratch par[4, [2, 2]][4, [2, 2]]Passed
boundary stroke index equals remainder[3, [2, 1]][3, [2, 1]]Passed
boundary second shot above 18[3, [2, 1]][3, [2, 1]]Passed
boundary plus handicap[3, [1, 2]][3, [1, 2]]Passed
control blob hole[0, [0]][0, [0, 0]]Failed
control net albatross[4, [4]][4, [4]]Passed
regression: no score hole[12, [2, 0, 2, 0, 4, 2, 2, 0]][12, [2, 0, 2, 0, 0, 4, 2, 2, 0]]Failed
variant scenario 1[12, [2, 0, 0, 4, 3, 3, 0]][12, [2, 0, 0, 4, 3, 3, 0]]Passed
variant scenario 2[5, [3, 2, 0]][5, [3, 2, 0]]Passed

SHA-256 / 3f037902859b433bc703979a8550e3f30a8825443d7e130af48977352846ea7d

3 / The verified repair

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

N = 1
observations = []
def solve(holes, handicap):
    per = []
    for par, si, strokes in holes:
        if handicap >= 0:
            received = handicap // 18 + (1 if si <= handicap % 18 else 0)
        else:
            received = -1 if si > 18 + handicap else 0
        if strokes is None:
            per.append(0)
            continue
        per.append(max(0, 2 + par - (strokes - received)))
    return [sum(per), per]
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 scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole',
   ([[5, 11, 6],
     [4, 4, 7],
     [3, 9, 4],
     [5, 1, 9],
     [3, 5, None],
     [4, 3, 3],
     [4, 16, 5],
     [3, 7, 4],
     [3, 12, 6]],
    20),
   [12, [2, 0, 2, 0, 0, 4, 2, 2, 0]]),
  ('variant scenario 1',
   ([[3, 10, 4], [4, 5, 7], [3, 15, 6], [3, 6, 2], [4, 8, 4], [4, 7, 4], [4, 14, 7]], 18),
   [12, [2, 0, 0, 4, 3, 3, 0]]),
  ('variant scenario 2', ([[5, 11, 5], [4, 3, 5], [4, 15, 8]], 18), [5, [3, 2, 0]])],
 [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole', ([[3, 6, 1], [4, 2, 5], [4, 9, None]], 2), [6, [4, 2, 0]]),
  ('variant scenario 1',
   ([[5, 10, 6],
     [5, 13, 7],
     [5, 12, None],
     [3, 2, 5],
     [4, 18, 4],
     [4, 7, 2],
     [5, 16, None],
     [3, 6, 3],
     [4, 8, 2],
     [4, 4, 4]],
    18),
   [23, [2, 1, 0, 1, 3, 5, 0, 3, 5, 3]]),
  ('variant scenario 2',
   ([[4, 15, None], [4, 17, 6], [4, 13, 5], [4, 1, 4], [4, 16, 4], [4, 7, 8]], 20),
   [10, [0, 1, 2, 4, 3, 0]])],
 [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole',
   ([[5, 16, 6], [3, 11, 2], [5, 3, 5], [4, 10, 6], [5, 18, None], [4, 5, 5], [4, 8, 5]], 6),
   [10, [1, 3, 3, 0, 0, 2, 1]]),
  ('variant scenario 1',
   ([[4, 6, 4], [4, 5, 8], [5, 3, 4], [3, 8, 4], [4, 12, 2], [5, 17, 8], [3, 15, 4], [4, 14, 2]],
    8),
   [18, [3, 0, 4, 2, 4, 0, 1, 4]]),
  ('variant scenario 2',
   ([[4, 10, 6],
     [4, 2, 6],
     [3, 14, 4],
     [4, 6, 8],
     [5, 9, 6],
     [4, 5, 5],
     [3, 17, 2],
     [3, 12, 4],
     [5, 8, 3],
     [5, 15, 7]],
    2),
   [12, [0, 1, 1, 0, 1, 1, 3, 1, 4, 0]])],
 [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole',
   ([[4, 3, 5],
     [5, 16, 3],
     [4, 11, 7],
     [3, 18, 6],
     [4, 9, 8],
     [5, 10, None],
     [5, 1, 8],
     [4, 5, 8],
     [5, 15, 9],
     [4, 6, 2],
     [5, 12, 9]],
    -2),
   [9, [1, 4, 0, 0, 0, 0, 0, 0, 0, 4, 0]]),
  ('variant scenario 1',
   ([[3, 9, 5],
     [3, 10, 1],
     [4, 14, 2],
     [5, 11, 5],
     [4, 16, 3],
     [5, 15, 9],
     [3, 8, 3],
     [4, 13, 4],
     [3, 3, 6],
     [4, 17, 4],
     [5, 4, 5],
     [3, 2, 4]],
    -2),
   [21, [0, 4, 4, 2, 3, 0, 2, 2, 0, 1, 2, 1]]),
  ('variant scenario 2',
   ([[4, 13, 5],
     [3, 11, 5],
     [4, 18, 6],
     [5, 14, 9],
     [4, 17, 5],
     [5, 7, 4],
     [5, 3, 9],
     [5, 4, 6],
     [3, 16, 4],
     [3, 10, 1],
     [4, 8, 2]],
    20),
   [24, [2, 1, 1, 0, 2, 4, 0, 2, 2, 5, 5]])],
 [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),
  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),
  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),
  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),
  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),
  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),
  ('regression: no score hole',
   ([[4, 7, 5],
     [3, 3, 4],
     [3, 5, 4],
     [3, 4, 4],
     [3, 12, 7],
     [5, 8, 8],
     [4, 10, None],
     [5, 6, None],
     [4, 16, 6],
     [5, 15, 6],
     [3, 11, 1]],
    23),
   [19, [2, 3, 3, 3, 0, 0, 0, 0, 1, 2, 5]]),
  ('variant scenario 1', ([[4, 2, 3], [4, 1, 4], [4, 9, 2]], 18), [12, [4, 3, 5]]),
  ('variant scenario 2',
   ([[5, 5, 6], [4, 16, 3], [4, 11, 5], [4, 10, 5], [4, 6, 8]], -2),
   [6, [1, 3, 1, 1, 0]])]]
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 scratch par[4, [2, 2]][4, [2, 2]]Passed
boundary stroke index equals remainder[3, [2, 1]][3, [2, 1]]Passed
boundary second shot above 18[3, [2, 1]][3, [2, 1]]Passed
boundary plus handicap[3, [1, 2]][3, [1, 2]]Passed
control blob hole[0, [0, 0]][0, [0, 0]]Passed
control net albatross[4, [4]][4, [4]]Passed
regression: no score hole[12, [2, 0, 2, 0, 0, 4, 2, 2, 0]][12, [2, 0, 2, 0, 0, 4, 2, 2, 0]]Passed
variant scenario 1[12, [2, 0, 0, 4, 3, 3, 0]][12, [2, 0, 0, 4, 3, 3, 0]]Passed
variant scenario 2[5, [3, 2, 0]][5, [3, 2, 0]]Passed

SHA-256 / 25cf52d8829631d1459af47b1561274cfd783176242452c1e3fd74b2e5563737

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

Case digest / 24f88e327272e3f66103563cfc3f180e207cb2be62d7358f694929b7025d1adc