{"abstract":"A 5-handicap player gets no stroke on stroke index 5.","category":"Sports scoring and tiebreakers","checks":10,"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].","evaluation_group":"w2-sports-scoring-golf-stableford-allocation","failed_approach":"Allocating to the easiest holes (highest stroke indexes) inverts the stroke table.","family":"w2-sports-scoring-golf-stableford-allocation-allocation-boundary","id":"FA-84156","implementations":{"attempt":{"sha256":"7303aa2b0d2b8c59655ccd0ec38fba5924e281c2ed596c5c4db3d857e1246536","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(holes, handicap):\n    per = []\n    for par, si, strokes in holes:\n        if handicap >= 0:\n            received = handicap // 18 + (1 if si > 18 - handicap % 18 else 0)\n        else:\n            received = -1 if si > 18 + handicap else 0\n        if strokes is None:\n            per.append(0)\n            continue\n        per.append(max(0, 2 + par - (strokes - received)))\n    return [sum(per), per]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[3, 18, 6], [5, 7, 8], [4, 1, None], [3, 4, 4], [3, 5, 4]], 20),\n   [4, [0, 0, 0, 2, 2]]),\n  ('regression: allocation boundary',\n   ([[3, 7, 6], [3, 5, 3], [4, 14, 7], [3, 3, 6], [4, 11, 8], [4, 9, None], [5, 16, 7], [5, 2, 6]],\n    25),\n   [10, [1, 4, 0, 1, 0, 0, 1, 3]]),\n  ('variant scenario 1', ([[4, 4, 7], [4, 10, 5], [3, 12, 1]], 18), [7, [0, 2, 5]]),\n  ('variant scenario 2',\n   ([[3, 7, 3], [4, 8, 6], [3, 18, 3], [5, 17, 7], [5, 9, 4]], 5),\n   [7, [2, 0, 2, 0, 3]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[5, 18, 6],\n     [3, 9, 5],\n     [4, 5, 5],\n     [4, 15, 7],\n     [4, 7, 2],\n     [4, 4, 4],\n     [3, 13, 2],\n     [5, 10, 5],\n     [5, 1, 9],\n     [4, 6, 7]],\n    11),\n   [18, [1, 1, 2, 0, 5, 3, 3, 3, 0, 0]]),\n  ('regression: allocation boundary',\n   ([[4, 15, 2], [4, 17, 4], [5, 10, 5], [4, 18, 5], [3, 2, 2], [4, 16, 8], [3, 14, 4], [4, 9, 2]],\n    20),\n   [25, [5, 3, 3, 2, 5, 0, 2, 5]]),\n  ('variant scenario 1',\n   ([[5, 17, 9], [5, 1, 6], [3, 16, 3], [4, 2, 4], [5, 18, 3], [4, 15, 7], [4, 3, 7]], 0),\n   [9, [0, 1, 2, 2, 4, 0, 0]]),\n  ('variant scenario 2',\n   ([[5, 18, 8],\n     [3, 10, 3],\n     [3, 17, 7],\n     [4, 3, 4],\n     [4, 8, 5],\n     [4, 4, 4],\n     [3, 14, 2],\n     [5, 6, 5],\n     [4, 1, 2]],\n    18),\n   [23, [0, 3, 0, 3, 2, 3, 4, 3, 5]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[4, 18, 8], [3, 16, 5], [3, 5, 1], [5, 17, 4], [3, 12, 7], [3, 9, 5], [4, 7, 5]], 8),\n   [10, [0, 0, 5, 3, 0, 0, 2]]),\n  ('regression: allocation boundary',\n   ([[4, 15, 6], [3, 2, 1], [4, 13, 7], [5, 16, None], [3, 10, 3], [4, 5, 5], [4, 11, 2]], 20),\n   [17, [1, 6, 0, 0, 3, 2, 5]]),\n  ('variant scenario 1', ([[4, 11, 3], [4, 1, 6], [3, 13, 3], [4, 12, 4]], -2), [7, [3, 0, 2, 2]]),\n  ('variant scenario 2', ([[4, 6, 4], [5, 7, 4], [3, 2, 7], [4, 8, 2]], 18), [12, [3, 4, 0, 5]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[4, 3, 5], [5, 9, 5], [5, 14, 9], [3, 4, 4], [3, 12, 3], [3, 2, 4], [5, 10, 9]], 2),\n   [8, [1, 2, 0, 1, 2, 2, 0]]),\n  ('variant scenario 1',\n   ([[4, 11, 2], [4, 12, 5], [4, 10, None], [5, 4, 4], [5, 18, 4], [5, 13, 5], [5, 1, 5]], 18),\n   [21, [5, 2, 0, 4, 4, 3, 3]]),\n  ('variant scenario 2',\n   ([[5, 14, 4], [4, 12, 3], [5, 8, 5], [5, 10, 6], [5, 16, 6]], 6),\n   [10, [3, 3, 2, 1, 1]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[4, 18, 6],\n     [5, 7, 5],\n     [3, 14, 5],\n     [5, 4, 5],\n     [5, 11, 5],\n     [5, 3, 5],\n     [4, 5, 7],\n     [4, 1, 4],\n     [4, 2, None],\n     [4, 17, 4],\n     [3, 16, 2],\n     [3, 9, 2],\n     [4, 6, 8],\n     [4, 10, 5]],\n    15),\n   [27, [0, 3, 1, 3, 3, 3, 0, 3, 0, 2, 3, 4, 0, 2]]),\n  ('regression: allocation boundary',\n   ([[4, 11, 5],\n     [4, 13, 3],\n     [5, 9, 5],\n     [5, 3, 6],\n     [4, 6, 6],\n     [4, 17, 4],\n     [3, 5, 3],\n     [4, 8, 5],\n     [4, 15, 3],\n     [4, 14, 2]],\n    31),\n   [36, [3, 5, 4, 3, 2, 3, 4, 3, 4, 5]]),\n  ('variant scenario 1',\n   ([[4, 10, 4],\n     [4, 12, 6],\n     [3, 1, 2],\n     [4, 9, 4],\n     [3, 17, 2],\n     [4, 16, 5],\n     [5, 5, 5],\n     [4, 6, 4],\n     [4, 7, 7],\n     [5, 2, 8],\n     [5, 4, 9]],\n    18),\n   [23, [3, 1, 4, 3, 4, 2, 3, 3, 0, 0, 0]]),\n  ('variant scenario 2',\n   ([[4, 5, 3], [5, 15, 4], [5, 3, None], [4, 12, 5], [3, 6, 4], [3, 13, 2]], 14),\n   [15, [4, 3, 0, 2, 2, 4]])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"ecf41c1fbbebc45209fedfd439f93aa4f76d47a81607ce3903103226f2356bd8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(holes, handicap):\n    per = []\n    for par, si, strokes in holes:\n        if handicap >= 0:\n            received = handicap // 18 + (1 if si < handicap % 18 else 0)\n        else:\n            received = -1 if si > 18 + handicap else 0\n        if strokes is None:\n            per.append(0)\n            continue\n        per.append(max(0, 2 + par - (strokes - received)))\n    return [sum(per), per]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[3, 18, 6], [5, 7, 8], [4, 1, None], [3, 4, 4], [3, 5, 4]], 20),\n   [4, [0, 0, 0, 2, 2]]),\n  ('regression: allocation boundary',\n   ([[3, 7, 6], [3, 5, 3], [4, 14, 7], [3, 3, 6], [4, 11, 8], [4, 9, None], [5, 16, 7], [5, 2, 6]],\n    25),\n   [10, [1, 4, 0, 1, 0, 0, 1, 3]]),\n  ('variant scenario 1', ([[4, 4, 7], [4, 10, 5], [3, 12, 1]], 18), [7, [0, 2, 5]]),\n  ('variant scenario 2',\n   ([[3, 7, 3], [4, 8, 6], [3, 18, 3], [5, 17, 7], [5, 9, 4]], 5),\n   [7, [2, 0, 2, 0, 3]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[5, 18, 6],\n     [3, 9, 5],\n     [4, 5, 5],\n     [4, 15, 7],\n     [4, 7, 2],\n     [4, 4, 4],\n     [3, 13, 2],\n     [5, 10, 5],\n     [5, 1, 9],\n     [4, 6, 7]],\n    11),\n   [18, [1, 1, 2, 0, 5, 3, 3, 3, 0, 0]]),\n  ('regression: allocation boundary',\n   ([[4, 15, 2], [4, 17, 4], [5, 10, 5], [4, 18, 5], [3, 2, 2], [4, 16, 8], [3, 14, 4], [4, 9, 2]],\n    20),\n   [25, [5, 3, 3, 2, 5, 0, 2, 5]]),\n  ('variant scenario 1',\n   ([[5, 17, 9], [5, 1, 6], [3, 16, 3], [4, 2, 4], [5, 18, 3], [4, 15, 7], [4, 3, 7]], 0),\n   [9, [0, 1, 2, 2, 4, 0, 0]]),\n  ('variant scenario 2',\n   ([[5, 18, 8],\n     [3, 10, 3],\n     [3, 17, 7],\n     [4, 3, 4],\n     [4, 8, 5],\n     [4, 4, 4],\n     [3, 14, 2],\n     [5, 6, 5],\n     [4, 1, 2]],\n    18),\n   [23, [0, 3, 0, 3, 2, 3, 4, 3, 5]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[4, 18, 8], [3, 16, 5], [3, 5, 1], [5, 17, 4], [3, 12, 7], [3, 9, 5], [4, 7, 5]], 8),\n   [10, [0, 0, 5, 3, 0, 0, 2]]),\n  ('regression: allocation boundary',\n   ([[4, 15, 6], [3, 2, 1], [4, 13, 7], [5, 16, None], [3, 10, 3], [4, 5, 5], [4, 11, 2]], 20),\n   [17, [1, 6, 0, 0, 3, 2, 5]]),\n  ('variant scenario 1', ([[4, 11, 3], [4, 1, 6], [3, 13, 3], [4, 12, 4]], -2), [7, [3, 0, 2, 2]]),\n  ('variant scenario 2', ([[4, 6, 4], [5, 7, 4], [3, 2, 7], [4, 8, 2]], 18), [12, [3, 4, 0, 5]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[4, 3, 5], [5, 9, 5], [5, 14, 9], [3, 4, 4], [3, 12, 3], [3, 2, 4], [5, 10, 9]], 2),\n   [8, [1, 2, 0, 1, 2, 2, 0]]),\n  ('variant scenario 1',\n   ([[4, 11, 2], [4, 12, 5], [4, 10, None], [5, 4, 4], [5, 18, 4], [5, 13, 5], [5, 1, 5]], 18),\n   [21, [5, 2, 0, 4, 4, 3, 3]]),\n  ('variant scenario 2',\n   ([[5, 14, 4], [4, 12, 3], [5, 8, 5], [5, 10, 6], [5, 16, 6]], 6),\n   [10, [3, 3, 2, 1, 1]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[4, 18, 6],\n     [5, 7, 5],\n     [3, 14, 5],\n     [5, 4, 5],\n     [5, 11, 5],\n     [5, 3, 5],\n     [4, 5, 7],\n     [4, 1, 4],\n     [4, 2, None],\n     [4, 17, 4],\n     [3, 16, 2],\n     [3, 9, 2],\n     [4, 6, 8],\n     [4, 10, 5]],\n    15),\n   [27, [0, 3, 1, 3, 3, 3, 0, 3, 0, 2, 3, 4, 0, 2]]),\n  ('regression: allocation boundary',\n   ([[4, 11, 5],\n     [4, 13, 3],\n     [5, 9, 5],\n     [5, 3, 6],\n     [4, 6, 6],\n     [4, 17, 4],\n     [3, 5, 3],\n     [4, 8, 5],\n     [4, 15, 3],\n     [4, 14, 2]],\n    31),\n   [36, [3, 5, 4, 3, 2, 3, 4, 3, 4, 5]]),\n  ('variant scenario 1',\n   ([[4, 10, 4],\n     [4, 12, 6],\n     [3, 1, 2],\n     [4, 9, 4],\n     [3, 17, 2],\n     [4, 16, 5],\n     [5, 5, 5],\n     [4, 6, 4],\n     [4, 7, 7],\n     [5, 2, 8],\n     [5, 4, 9]],\n    18),\n   [23, [3, 1, 4, 3, 4, 2, 3, 3, 0, 0, 0]]),\n  ('variant scenario 2',\n   ([[4, 5, 3], [5, 15, 4], [5, 3, None], [4, 12, 5], [3, 6, 4], [3, 13, 2]], 14),\n   [15, [4, 3, 0, 2, 2, 4]])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"b77a12631fdc521f77cce6e541bee6cd5087c5f32e0d6d7194946b28306aa33a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(holes, handicap):\n    per = []\n    for par, si, strokes in holes:\n        if handicap >= 0:\n            received = handicap // 18 + (1 if si <= handicap % 18 else 0)\n        else:\n            received = -1 if si > 18 + handicap else 0\n        if strokes is None:\n            per.append(0)\n            continue\n        per.append(max(0, 2 + par - (strokes - received)))\n    return [sum(per), per]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ndef run(args):\n    try:\n        return solve(*args)\n    except Exception as exc:\n        return 'raised ' + type(exc).__name__\ncases = [[('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[3, 18, 6], [5, 7, 8], [4, 1, None], [3, 4, 4], [3, 5, 4]], 20),\n   [4, [0, 0, 0, 2, 2]]),\n  ('regression: allocation boundary',\n   ([[3, 7, 6], [3, 5, 3], [4, 14, 7], [3, 3, 6], [4, 11, 8], [4, 9, None], [5, 16, 7], [5, 2, 6]],\n    25),\n   [10, [1, 4, 0, 1, 0, 0, 1, 3]]),\n  ('variant scenario 1', ([[4, 4, 7], [4, 10, 5], [3, 12, 1]], 18), [7, [0, 2, 5]]),\n  ('variant scenario 2',\n   ([[3, 7, 3], [4, 8, 6], [3, 18, 3], [5, 17, 7], [5, 9, 4]], 5),\n   [7, [2, 0, 2, 0, 3]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[5, 18, 6],\n     [3, 9, 5],\n     [4, 5, 5],\n     [4, 15, 7],\n     [4, 7, 2],\n     [4, 4, 4],\n     [3, 13, 2],\n     [5, 10, 5],\n     [5, 1, 9],\n     [4, 6, 7]],\n    11),\n   [18, [1, 1, 2, 0, 5, 3, 3, 3, 0, 0]]),\n  ('regression: allocation boundary',\n   ([[4, 15, 2], [4, 17, 4], [5, 10, 5], [4, 18, 5], [3, 2, 2], [4, 16, 8], [3, 14, 4], [4, 9, 2]],\n    20),\n   [25, [5, 3, 3, 2, 5, 0, 2, 5]]),\n  ('variant scenario 1',\n   ([[5, 17, 9], [5, 1, 6], [3, 16, 3], [4, 2, 4], [5, 18, 3], [4, 15, 7], [4, 3, 7]], 0),\n   [9, [0, 1, 2, 2, 4, 0, 0]]),\n  ('variant scenario 2',\n   ([[5, 18, 8],\n     [3, 10, 3],\n     [3, 17, 7],\n     [4, 3, 4],\n     [4, 8, 5],\n     [4, 4, 4],\n     [3, 14, 2],\n     [5, 6, 5],\n     [4, 1, 2]],\n    18),\n   [23, [0, 3, 0, 3, 2, 3, 4, 3, 5]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[4, 18, 8], [3, 16, 5], [3, 5, 1], [5, 17, 4], [3, 12, 7], [3, 9, 5], [4, 7, 5]], 8),\n   [10, [0, 0, 5, 3, 0, 0, 2]]),\n  ('regression: allocation boundary',\n   ([[4, 15, 6], [3, 2, 1], [4, 13, 7], [5, 16, None], [3, 10, 3], [4, 5, 5], [4, 11, 2]], 20),\n   [17, [1, 6, 0, 0, 3, 2, 5]]),\n  ('variant scenario 1', ([[4, 11, 3], [4, 1, 6], [3, 13, 3], [4, 12, 4]], -2), [7, [3, 0, 2, 2]]),\n  ('variant scenario 2', ([[4, 6, 4], [5, 7, 4], [3, 2, 7], [4, 8, 2]], 18), [12, [3, 4, 0, 5]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[4, 3, 5], [5, 9, 5], [5, 14, 9], [3, 4, 4], [3, 12, 3], [3, 2, 4], [5, 10, 9]], 2),\n   [8, [1, 2, 0, 1, 2, 2, 0]]),\n  ('variant scenario 1',\n   ([[4, 11, 2], [4, 12, 5], [4, 10, None], [5, 4, 4], [5, 18, 4], [5, 13, 5], [5, 1, 5]], 18),\n   [21, [5, 2, 0, 4, 4, 3, 3]]),\n  ('variant scenario 2',\n   ([[5, 14, 4], [4, 12, 3], [5, 8, 5], [5, 10, 6], [5, 16, 6]], 6),\n   [10, [3, 3, 2, 1, 1]])],\n [('control scratch par', ([[4, 1, 4], [3, 18, 3]], 0), [4, [2, 2]]),\n  ('boundary stroke index equals remainder', ([[4, 5, 5], [4, 6, 5]], 5), [3, [2, 1]]),\n  ('boundary second shot above 18', ([[4, 2, 6], [4, 3, 6]], 20), [3, [2, 1]]),\n  ('boundary plus handicap', ([[4, 18, 4], [4, 17, 4]], -1), [3, [1, 2]]),\n  ('control blob hole', ([[5, 1, 9], [4, 2, None]], 10), [0, [0, 0]]),\n  ('control net albatross', ([[5, 1, 4]], 18), [4, [4]]),\n  ('regression: allocation boundary',\n   ([[4, 18, 6],\n     [5, 7, 5],\n     [3, 14, 5],\n     [5, 4, 5],\n     [5, 11, 5],\n     [5, 3, 5],\n     [4, 5, 7],\n     [4, 1, 4],\n     [4, 2, None],\n     [4, 17, 4],\n     [3, 16, 2],\n     [3, 9, 2],\n     [4, 6, 8],\n     [4, 10, 5]],\n    15),\n   [27, [0, 3, 1, 3, 3, 3, 0, 3, 0, 2, 3, 4, 0, 2]]),\n  ('regression: allocation boundary',\n   ([[4, 11, 5],\n     [4, 13, 3],\n     [5, 9, 5],\n     [5, 3, 6],\n     [4, 6, 6],\n     [4, 17, 4],\n     [3, 5, 3],\n     [4, 8, 5],\n     [4, 15, 3],\n     [4, 14, 2]],\n    31),\n   [36, [3, 5, 4, 3, 2, 3, 4, 3, 4, 5]]),\n  ('variant scenario 1',\n   ([[4, 10, 4],\n     [4, 12, 6],\n     [3, 1, 2],\n     [4, 9, 4],\n     [3, 17, 2],\n     [4, 16, 5],\n     [5, 5, 5],\n     [4, 6, 4],\n     [4, 7, 7],\n     [5, 2, 8],\n     [5, 4, 9]],\n    18),\n   [23, [3, 1, 4, 3, 4, 2, 3, 3, 0, 0, 0]]),\n  ('variant scenario 2',\n   ([[4, 5, 3], [5, 15, 4], [5, 3, None], [4, 12, 5], [3, 6, 4], [3, 13, 2]], 14),\n   [15, [4, 3, 0, 2, 2, 4]])]]\nfor label, args, expected in cases[N - 1]:\n    check(label, run(args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-sports-scoring-golf-stableford-allocation-allocation-boundary","generated_at":"2026-09-29T14:50:28.331411+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Club competition software computes Stableford totals from gross cards and course handicaps.","repair":"Allocate on stroke index <= H % 18.","root_cause":"The allocation uses si < H % 18.","sha256":"55fb6a587c97e7ece6b9913f9e0ae709c9e165fc269257e60a0e16c6930dbc8f","title":"Handicap stroke missing on the last allocated index · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.841,"exit_code":1,"observations":[{"actual":[4,[2,2]],"check":"control scratch par","expected":[4,[2,2]],"passed":true},{"actual":[2,[1,1]],"check":"boundary stroke index equals remainder","expected":[3,[2,1]],"passed":false},{"actual":[2,[1,1]],"check":"boundary second shot above 18","expected":[3,[2,1]],"passed":false},{"actual":[3,[1,2]],"check":"boundary plus handicap","expected":[3,[1,2]],"passed":true},{"actual":[0,[0,0]],"check":"control blob hole","expected":[0,[0,0]],"passed":true},{"actual":[4,[4]],"check":"control net albatross","expected":[4,[4]],"passed":true},{"actual":[5,[1,0,0,2,2]],"check":"regression: allocation boundary","expected":[4,[0,0,0,2,2]],"passed":false},{"actual":[8,[0,3,1,0,0,0,2,2]],"check":"regression: allocation boundary","expected":[10,[1,4,0,1,0,0,1,3]],"passed":false},{"actual":[7,[0,2,5]],"check":"variant scenario 1","expected":[7,[0,2,5]],"passed":true},{"actual":[9,[2,0,3,1,3]],"check":"variant scenario 2","expected":[7,[2,0,2,0,3]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control scratch par\", \"actual\": [4, [2, 2]], \"expected\": [4, [2, 2]], \"passed\": true}, {\"check\": \"boundary stroke index equals remainder\", \"actual\": [2, [1, 1]], \"expected\": [3, [2, 1]], \"passed\": false}, {\"check\": \"boundary second shot above 18\", \"actual\": [2, [1, 1]], \"expected\": [3, [2, 1]], \"passed\": false}, {\"check\": \"boundary plus handicap\", \"actual\": [3, [1, 2]], \"expected\": [3, [1, 2]], \"passed\": true}, {\"check\": \"control blob hole\", \"actual\": [0, [0, 0]], \"expected\": [0, [0, 0]], \"passed\": true}, {\"check\": \"control net albatross\", \"actual\": [4, [4]], \"expected\": [4, [4]], \"passed\": true}, {\"check\": \"regression: allocation boundary\", \"actual\": [5, [1, 0, 0, 2, 2]], \"expected\": [4, [0, 0, 0, 2, 2]], \"passed\": false}, {\"check\": \"regression: allocation boundary\", \"actual\": [8, [0, 3, 1, 0, 0, 0, 2, 2]], \"expected\": [10, [1, 4, 0, 1, 0, 0, 1, 3]], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [7, [0, 2, 5]], \"expected\": [7, [0, 2, 5]], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [9, [2, 0, 3, 1, 3]], \"expected\": [7, [2, 0, 2, 0, 3]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.844,"exit_code":1,"observations":[{"actual":[4,[2,2]],"check":"control scratch par","expected":[4,[2,2]],"passed":true},{"actual":[2,[1,1]],"check":"boundary stroke index equals remainder","expected":[3,[2,1]],"passed":false},{"actual":[2,[1,1]],"check":"boundary second shot above 18","expected":[3,[2,1]],"passed":false},{"actual":[3,[1,2]],"check":"boundary plus handicap","expected":[3,[1,2]],"passed":true},{"actual":[0,[0,0]],"check":"control blob hole","expected":[0,[0,0]],"passed":true},{"actual":[4,[4]],"check":"control net albatross","expected":[4,[4]],"passed":true},{"actual":[4,[0,0,0,2,2]],"check":"regression: allocation boundary","expected":[4,[0,0,0,2,2]],"passed":true},{"actual":[9,[0,4,0,1,0,0,1,3]],"check":"regression: allocation boundary","expected":[10,[1,4,0,1,0,0,1,3]],"passed":false},{"actual":[7,[0,2,5]],"check":"variant scenario 1","expected":[7,[0,2,5]],"passed":true},{"actual":[7,[2,0,2,0,3]],"check":"variant scenario 2","expected":[7,[2,0,2,0,3]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control scratch par\", \"actual\": [4, [2, 2]], \"expected\": [4, [2, 2]], \"passed\": true}, {\"check\": \"boundary stroke index equals remainder\", \"actual\": [2, [1, 1]], \"expected\": [3, [2, 1]], \"passed\": false}, {\"check\": \"boundary second shot above 18\", \"actual\": [2, [1, 1]], \"expected\": [3, [2, 1]], \"passed\": false}, {\"check\": \"boundary plus handicap\", \"actual\": [3, [1, 2]], \"expected\": [3, [1, 2]], \"passed\": true}, {\"check\": \"control blob hole\", \"actual\": [0, [0, 0]], \"expected\": [0, [0, 0]], \"passed\": true}, {\"check\": \"control net albatross\", \"actual\": [4, [4]], \"expected\": [4, [4]], \"passed\": true}, {\"check\": \"regression: allocation boundary\", \"actual\": [4, [0, 0, 0, 2, 2]], \"expected\": [4, [0, 0, 0, 2, 2]], \"passed\": true}, {\"check\": \"regression: allocation boundary\", \"actual\": [9, [0, 4, 0, 1, 0, 0, 1, 3]], \"expected\": [10, [1, 4, 0, 1, 0, 0, 1, 3]], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [7, [0, 2, 5]], \"expected\": [7, [0, 2, 5]], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [7, [2, 0, 2, 0, 3]], \"expected\": [7, [2, 0, 2, 0, 3]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.945,"exit_code":0,"observations":[{"actual":[4,[2,2]],"check":"control scratch par","expected":[4,[2,2]],"passed":true},{"actual":[3,[2,1]],"check":"boundary stroke index equals remainder","expected":[3,[2,1]],"passed":true},{"actual":[3,[2,1]],"check":"boundary second shot above 18","expected":[3,[2,1]],"passed":true},{"actual":[3,[1,2]],"check":"boundary plus handicap","expected":[3,[1,2]],"passed":true},{"actual":[0,[0,0]],"check":"control blob hole","expected":[0,[0,0]],"passed":true},{"actual":[4,[4]],"check":"control net albatross","expected":[4,[4]],"passed":true},{"actual":[4,[0,0,0,2,2]],"check":"regression: allocation boundary","expected":[4,[0,0,0,2,2]],"passed":true},{"actual":[10,[1,4,0,1,0,0,1,3]],"check":"regression: allocation boundary","expected":[10,[1,4,0,1,0,0,1,3]],"passed":true},{"actual":[7,[0,2,5]],"check":"variant scenario 1","expected":[7,[0,2,5]],"passed":true},{"actual":[7,[2,0,2,0,3]],"check":"variant scenario 2","expected":[7,[2,0,2,0,3]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control scratch par\", \"actual\": [4, [2, 2]], \"expected\": [4, [2, 2]], \"passed\": true}, {\"check\": \"boundary stroke index equals remainder\", \"actual\": [3, [2, 1]], \"expected\": [3, [2, 1]], \"passed\": true}, {\"check\": \"boundary second shot above 18\", \"actual\": [3, [2, 1]], \"expected\": [3, [2, 1]], \"passed\": true}, {\"check\": \"boundary plus handicap\", \"actual\": [3, [1, 2]], \"expected\": [3, [1, 2]], \"passed\": true}, {\"check\": \"control blob hole\", \"actual\": [0, [0, 0]], \"expected\": [0, [0, 0]], \"passed\": true}, {\"check\": \"control net albatross\", \"actual\": [4, [4]], \"expected\": [4, [4]], \"passed\": true}, {\"check\": \"regression: allocation boundary\", \"actual\": [4, [0, 0, 0, 2, 2]], \"expected\": [4, [0, 0, 0, 2, 2]], \"passed\": true}, {\"check\": \"regression: allocation boundary\", \"actual\": [10, [1, 4, 0, 1, 0, 0, 1, 3]], \"expected\": [10, [1, 4, 0, 1, 0, 0, 1, 3]], \"passed\": true}, {\"check\": \"variant scenario 1\", \"actual\": [7, [0, 2, 5]], \"expected\": [7, [0, 2, 5]], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [7, [2, 0, 2, 0, 3]], \"expected\": [7, [2, 0, 2, 0, 3]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}