{"abstract":"A +2 golfer is given strokes on the two hardest holes.","category":"Sports scoring and tiebreakers","checks":9,"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":"Restoring the sign but keeping the hardest holes (lowest stroke index) still gives back on the wrong holes.","family":"w2-sports-scoring-golf-stableford-allocation-plus-handicap","id":"FA-84166","implementations":{"attempt":{"sha256":"cdf64887c3654520871fac8ac6d3e079a8fcff7e030a861e0156dadfe47df264","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 <= -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: plus handicap',\n   ([[3, 11, 1],\n     [5, 5, 6],\n     [5, 7, 6],\n     [3, 1, 3],\n     [4, 17, None],\n     [5, 6, 7],\n     [3, 4, 2],\n     [5, 13, 5],\n     [4, 15, 3],\n     [3, 12, 3]],\n    -2),\n   [18, [4, 1, 1, 2, 0, 0, 3, 2, 3, 2]]),\n  ('variant scenario 1', ([[4, 17, 7], [3, 18, 3], [4, 12, 8]], 29), [3, [0, 3, 0]]),\n  ('variant scenario 2',\n   ([[4, 4, 5], [5, 11, 3], [4, 9, 5], [5, 15, 7], [3, 6, 7], [4, 2, 5]], 20),\n   [13, [2, 5, 2, 1, 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: plus handicap',\n   ([[5, 8, 7], [4, 4, 4], [4, 5, 4], [4, 2, 4], [5, 17, None], [5, 11, 9], [5, 18, 6], [3, 14, 7]],\n    -2),\n   [6, [0, 2, 2, 2, 0, 0, 0, 0]]),\n  ('variant scenario 1',\n   ([[4, 13, 3],\n     [5, 2, 4],\n     [4, 7, 6],\n     [4, 16, 4],\n     [5, 11, 4],\n     [4, 9, 7],\n     [3, 5, 1],\n     [4, 6, 5],\n     [5, 4, 5],\n     [4, 18, 7],\n     [3, 3, 4]],\n    20),\n   [29, [4, 5, 1, 3, 4, 0, 5, 2, 3, 0, 2]]),\n  ('variant scenario 2',\n   ([[4, 17, 5], [4, 15, 6], [3, 8, 1], [4, 2, 8], [5, 11, 8], [4, 10, 8]], 18),\n   [8, [2, 1, 5, 0, 0, 0]])],\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: plus handicap',\n   ([[4, 12, 5],\n     [4, 7, 7],\n     [4, 11, 2],\n     [5, 18, None],\n     [3, 2, 3],\n     [4, 14, 4],\n     [5, 16, 6],\n     [5, 10, 5],\n     [3, 15, 1],\n     [3, 5, 4]],\n    -2),\n   [17, [1, 0, 4, 0, 2, 2, 1, 2, 4, 1]]),\n  ('variant scenario 1',\n   ([[4, 14, 2], [5, 13, 9], [4, 3, 4], [3, 2, 7], [4, 17, 5], [3, 9, 4], [4, 7, 7]], 16),\n   [11, [5, 0, 3, 0, 1, 2, 0]]),\n  ('variant scenario 2',\n   ([[4, 1, 5], [3, 7, 6], [4, 5, 2], [5, 3, 5], [4, 10, 5], [4, 11, None], [4, 13, 5], [4, 8, 5]],\n    15),\n   [16, [2, 0, 5, 3, 2, 0, 2, 2]])],\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: plus handicap',\n   ([[4, 10, 2],\n     [4, 12, 8],\n     [3, 9, 6],\n     [5, 17, 5],\n     [3, 18, 7],\n     [4, 15, 4],\n     [4, 13, 4],\n     [4, 6, 4],\n     [4, 3, 3],\n     [4, 8, 5],\n     [4, 4, 5]],\n    -2),\n   [16, [4, 0, 0, 1, 0, 2, 2, 2, 3, 1, 1]]),\n  ('variant scenario 1',\n   ([[5, 16, 6],\n     [3, 13, 3],\n     [4, 10, 4],\n     [5, 4, 9],\n     [4, 12, 5],\n     [4, 15, 6],\n     [4, 11, 4],\n     [4, 5, 2],\n     [5, 2, 6],\n     [3, 14, 3],\n     [4, 7, None],\n     [5, 18, 6]],\n    -2),\n   [15, [1, 2, 2, 0, 1, 0, 2, 4, 1, 2, 0, 0]]),\n  ('variant scenario 2',\n   ([[5, 10, 5], [4, 18, 4], [4, 5, 3], [4, 15, 5], [4, 9, 6], [5, 12, 3], [4, 6, 4]], 16),\n   [20, [3, 2, 4, 2, 1, 5, 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: plus handicap',\n   ([[5, 2, 4], [5, 1, 3], [4, 6, 5], [5, 15, 6], [5, 5, 5], [5, 10, 9], [4, 3, 5]], -2),\n   [12, [3, 4, 1, 1, 2, 0, 1]]),\n  ('variant scenario 1', ([[4, 4, 5], [3, 1, 4], [4, 13, 4], [4, 9, 8]], 18), [7, [2, 2, 3, 0]]),\n  ('variant scenario 2', ([[5, 14, 5], [5, 18, 6], [4, 9, 3]], 18), [9, [3, 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":"d204ff477ef1e4f8795b6a9be662f7e8f9d9d4e3fe1d6f48867136784a3e44ce","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 <= -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: plus handicap',\n   ([[3, 11, 1],\n     [5, 5, 6],\n     [5, 7, 6],\n     [3, 1, 3],\n     [4, 17, None],\n     [5, 6, 7],\n     [3, 4, 2],\n     [5, 13, 5],\n     [4, 15, 3],\n     [3, 12, 3]],\n    -2),\n   [18, [4, 1, 1, 2, 0, 0, 3, 2, 3, 2]]),\n  ('variant scenario 1', ([[4, 17, 7], [3, 18, 3], [4, 12, 8]], 29), [3, [0, 3, 0]]),\n  ('variant scenario 2',\n   ([[4, 4, 5], [5, 11, 3], [4, 9, 5], [5, 15, 7], [3, 6, 7], [4, 2, 5]], 20),\n   [13, [2, 5, 2, 1, 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: plus handicap',\n   ([[5, 8, 7], [4, 4, 4], [4, 5, 4], [4, 2, 4], [5, 17, None], [5, 11, 9], [5, 18, 6], [3, 14, 7]],\n    -2),\n   [6, [0, 2, 2, 2, 0, 0, 0, 0]]),\n  ('variant scenario 1',\n   ([[4, 13, 3],\n     [5, 2, 4],\n     [4, 7, 6],\n     [4, 16, 4],\n     [5, 11, 4],\n     [4, 9, 7],\n     [3, 5, 1],\n     [4, 6, 5],\n     [5, 4, 5],\n     [4, 18, 7],\n     [3, 3, 4]],\n    20),\n   [29, [4, 5, 1, 3, 4, 0, 5, 2, 3, 0, 2]]),\n  ('variant scenario 2',\n   ([[4, 17, 5], [4, 15, 6], [3, 8, 1], [4, 2, 8], [5, 11, 8], [4, 10, 8]], 18),\n   [8, [2, 1, 5, 0, 0, 0]])],\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: plus handicap',\n   ([[4, 12, 5],\n     [4, 7, 7],\n     [4, 11, 2],\n     [5, 18, None],\n     [3, 2, 3],\n     [4, 14, 4],\n     [5, 16, 6],\n     [5, 10, 5],\n     [3, 15, 1],\n     [3, 5, 4]],\n    -2),\n   [17, [1, 0, 4, 0, 2, 2, 1, 2, 4, 1]]),\n  ('variant scenario 1',\n   ([[4, 14, 2], [5, 13, 9], [4, 3, 4], [3, 2, 7], [4, 17, 5], [3, 9, 4], [4, 7, 7]], 16),\n   [11, [5, 0, 3, 0, 1, 2, 0]]),\n  ('variant scenario 2',\n   ([[4, 1, 5], [3, 7, 6], [4, 5, 2], [5, 3, 5], [4, 10, 5], [4, 11, None], [4, 13, 5], [4, 8, 5]],\n    15),\n   [16, [2, 0, 5, 3, 2, 0, 2, 2]])],\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: plus handicap',\n   ([[4, 10, 2],\n     [4, 12, 8],\n     [3, 9, 6],\n     [5, 17, 5],\n     [3, 18, 7],\n     [4, 15, 4],\n     [4, 13, 4],\n     [4, 6, 4],\n     [4, 3, 3],\n     [4, 8, 5],\n     [4, 4, 5]],\n    -2),\n   [16, [4, 0, 0, 1, 0, 2, 2, 2, 3, 1, 1]]),\n  ('variant scenario 1',\n   ([[5, 16, 6],\n     [3, 13, 3],\n     [4, 10, 4],\n     [5, 4, 9],\n     [4, 12, 5],\n     [4, 15, 6],\n     [4, 11, 4],\n     [4, 5, 2],\n     [5, 2, 6],\n     [3, 14, 3],\n     [4, 7, None],\n     [5, 18, 6]],\n    -2),\n   [15, [1, 2, 2, 0, 1, 0, 2, 4, 1, 2, 0, 0]]),\n  ('variant scenario 2',\n   ([[5, 10, 5], [4, 18, 4], [4, 5, 3], [4, 15, 5], [4, 9, 6], [5, 12, 3], [4, 6, 4]], 16),\n   [20, [3, 2, 4, 2, 1, 5, 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: plus handicap',\n   ([[5, 2, 4], [5, 1, 3], [4, 6, 5], [5, 15, 6], [5, 5, 5], [5, 10, 9], [4, 3, 5]], -2),\n   [12, [3, 4, 1, 1, 2, 0, 1]]),\n  ('variant scenario 1', ([[4, 4, 5], [3, 1, 4], [4, 13, 4], [4, 9, 8]], 18), [7, [2, 2, 3, 0]]),\n  ('variant scenario 2', ([[5, 14, 5], [5, 18, 6], [4, 9, 3]], 18), [9, [3, 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":"9c7daf914159407343e96a1c607d33fcee20b6801f55607ffe6f492efab74ad9","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: plus handicap',\n   ([[3, 11, 1],\n     [5, 5, 6],\n     [5, 7, 6],\n     [3, 1, 3],\n     [4, 17, None],\n     [5, 6, 7],\n     [3, 4, 2],\n     [5, 13, 5],\n     [4, 15, 3],\n     [3, 12, 3]],\n    -2),\n   [18, [4, 1, 1, 2, 0, 0, 3, 2, 3, 2]]),\n  ('variant scenario 1', ([[4, 17, 7], [3, 18, 3], [4, 12, 8]], 29), [3, [0, 3, 0]]),\n  ('variant scenario 2',\n   ([[4, 4, 5], [5, 11, 3], [4, 9, 5], [5, 15, 7], [3, 6, 7], [4, 2, 5]], 20),\n   [13, [2, 5, 2, 1, 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: plus handicap',\n   ([[5, 8, 7], [4, 4, 4], [4, 5, 4], [4, 2, 4], [5, 17, None], [5, 11, 9], [5, 18, 6], [3, 14, 7]],\n    -2),\n   [6, [0, 2, 2, 2, 0, 0, 0, 0]]),\n  ('variant scenario 1',\n   ([[4, 13, 3],\n     [5, 2, 4],\n     [4, 7, 6],\n     [4, 16, 4],\n     [5, 11, 4],\n     [4, 9, 7],\n     [3, 5, 1],\n     [4, 6, 5],\n     [5, 4, 5],\n     [4, 18, 7],\n     [3, 3, 4]],\n    20),\n   [29, [4, 5, 1, 3, 4, 0, 5, 2, 3, 0, 2]]),\n  ('variant scenario 2',\n   ([[4, 17, 5], [4, 15, 6], [3, 8, 1], [4, 2, 8], [5, 11, 8], [4, 10, 8]], 18),\n   [8, [2, 1, 5, 0, 0, 0]])],\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: plus handicap',\n   ([[4, 12, 5],\n     [4, 7, 7],\n     [4, 11, 2],\n     [5, 18, None],\n     [3, 2, 3],\n     [4, 14, 4],\n     [5, 16, 6],\n     [5, 10, 5],\n     [3, 15, 1],\n     [3, 5, 4]],\n    -2),\n   [17, [1, 0, 4, 0, 2, 2, 1, 2, 4, 1]]),\n  ('variant scenario 1',\n   ([[4, 14, 2], [5, 13, 9], [4, 3, 4], [3, 2, 7], [4, 17, 5], [3, 9, 4], [4, 7, 7]], 16),\n   [11, [5, 0, 3, 0, 1, 2, 0]]),\n  ('variant scenario 2',\n   ([[4, 1, 5], [3, 7, 6], [4, 5, 2], [5, 3, 5], [4, 10, 5], [4, 11, None], [4, 13, 5], [4, 8, 5]],\n    15),\n   [16, [2, 0, 5, 3, 2, 0, 2, 2]])],\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: plus handicap',\n   ([[4, 10, 2],\n     [4, 12, 8],\n     [3, 9, 6],\n     [5, 17, 5],\n     [3, 18, 7],\n     [4, 15, 4],\n     [4, 13, 4],\n     [4, 6, 4],\n     [4, 3, 3],\n     [4, 8, 5],\n     [4, 4, 5]],\n    -2),\n   [16, [4, 0, 0, 1, 0, 2, 2, 2, 3, 1, 1]]),\n  ('variant scenario 1',\n   ([[5, 16, 6],\n     [3, 13, 3],\n     [4, 10, 4],\n     [5, 4, 9],\n     [4, 12, 5],\n     [4, 15, 6],\n     [4, 11, 4],\n     [4, 5, 2],\n     [5, 2, 6],\n     [3, 14, 3],\n     [4, 7, None],\n     [5, 18, 6]],\n    -2),\n   [15, [1, 2, 2, 0, 1, 0, 2, 4, 1, 2, 0, 0]]),\n  ('variant scenario 2',\n   ([[5, 10, 5], [4, 18, 4], [4, 5, 3], [4, 15, 5], [4, 9, 6], [5, 12, 3], [4, 6, 4]], 16),\n   [20, [3, 2, 4, 2, 1, 5, 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: plus handicap',\n   ([[5, 2, 4], [5, 1, 3], [4, 6, 5], [5, 15, 6], [5, 5, 5], [5, 10, 9], [4, 3, 5]], -2),\n   [12, [3, 4, 1, 1, 2, 0, 1]]),\n  ('variant scenario 1', ([[4, 4, 5], [3, 1, 4], [4, 13, 4], [4, 9, 8]], 18), [7, [2, 2, 3, 0]]),\n  ('variant scenario 2', ([[5, 14, 5], [5, 18, 6], [4, 9, 3]], 18), [9, [3, 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-plus-handicap","generated_at":"2026-09-29T14:50:28.465579+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":"Give back one stroke on holes whose stroke index exceeds 18 + H.","root_cause":"The plus-handicap branch drops the sign and allocates strokes like a normal handicap.","sha256":"3d729e951380fabf2260b919758527d1582a2f6eee333c13fd67c6e58af121d0","title":"Plus handicap receives strokes instead of giving them back · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.824,"exit_code":1,"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":[4,[2,2]],"check":"boundary plus handicap","expected":[3,[1,2]],"passed":false},{"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":[17,[4,1,1,1,0,0,3,2,3,2]],"check":"regression: plus handicap","expected":[18,[4,1,1,2,0,0,3,2,3,2]],"passed":false},{"actual":[3,[0,3,0]],"check":"variant scenario 1","expected":[3,[0,3,0]],"passed":true},{"actual":[13,[2,5,2,1,0,3]],"check":"variant scenario 2","expected":[13,[2,5,2,1,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\": [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\": [4, [2, 2]], \"expected\": [3, [1, 2]], \"passed\": false}, {\"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: plus handicap\", \"actual\": [17, [4, 1, 1, 1, 0, 0, 3, 2, 3, 2]], \"expected\": [18, [4, 1, 1, 2, 0, 0, 3, 2, 3, 2]], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [3, [0, 3, 0]], \"expected\": [3, [0, 3, 0]], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [13, [2, 5, 2, 1, 0, 3]], \"expected\": [13, [2, 5, 2, 1, 0, 3]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.341,"exit_code":1,"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":[4,[2,2]],"check":"boundary plus handicap","expected":[3,[1,2]],"passed":false},{"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":[19,[4,1,1,3,0,0,3,2,3,2]],"check":"regression: plus handicap","expected":[18,[4,1,1,2,0,0,3,2,3,2]],"passed":false},{"actual":[3,[0,3,0]],"check":"variant scenario 1","expected":[3,[0,3,0]],"passed":true},{"actual":[13,[2,5,2,1,0,3]],"check":"variant scenario 2","expected":[13,[2,5,2,1,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\": [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\": [4, [2, 2]], \"expected\": [3, [1, 2]], \"passed\": false}, {\"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: plus handicap\", \"actual\": [19, [4, 1, 1, 3, 0, 0, 3, 2, 3, 2]], \"expected\": [18, [4, 1, 1, 2, 0, 0, 3, 2, 3, 2]], \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": [3, [0, 3, 0]], \"expected\": [3, [0, 3, 0]], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [13, [2, 5, 2, 1, 0, 3]], \"expected\": [13, [2, 5, 2, 1, 0, 3]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.572,"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":[18,[4,1,1,2,0,0,3,2,3,2]],"check":"regression: plus handicap","expected":[18,[4,1,1,2,0,0,3,2,3,2]],"passed":true},{"actual":[3,[0,3,0]],"check":"variant scenario 1","expected":[3,[0,3,0]],"passed":true},{"actual":[13,[2,5,2,1,0,3]],"check":"variant scenario 2","expected":[13,[2,5,2,1,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: plus handicap\", \"actual\": [18, [4, 1, 1, 2, 0, 0, 3, 2, 3, 2]], \"expected\": [18, [4, 1, 1, 2, 0, 0, 3, 2, 3, 2]], \"passed\": true}, {\"check\": \"variant scenario 1\", \"actual\": [3, [0, 3, 0]], \"expected\": [3, [0, 3, 0]], \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": [13, [2, 5, 2, 1, 0, 3]], \"expected\": [13, [2, 5, 2, 1, 0, 3]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}