{"abstract":"A player 3 up with 3 to play is declared the winner.","category":"Sports scoring and tiebreakers","checks":9,"contract":"Eighteen-hole match play. holes is a string of hole results: A, B or H (halved). The match closes as soon as the lead exceeds the holes remaining: \"X wins L&R\" (L lead, R remaining), or \"X wins L up\" if it closes on the 18th. Later characters are ignored. After 18 holes level: \"halved\". Unfinished: \"all square\", \"X dormie R\" when the lead equals the holes remaining, otherwise \"X L up\".","contract_signature":"holes","evaluation_group":"w2-sports-scoring-golf-match-play-status","failed_approach":"Closing only when A leads leaves matches B has already won open.","family":"w2-sports-scoring-golf-match-play-status-closure-condition","id":"FA-84181","implementations":{"attempt":{"sha256":"3fc05eefa3722a167dc713b501b8ea6f171061d0fa3161a014ffe33e0b640be9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(holes):\n    lead = 0\n    played = 0\n    for h in holes:\n        played += 1\n        if h == 'A':\n            lead += 1\n        elif h == 'B':\n            lead -= 1\n        remaining = 18 - played\n        if lead > remaining:\n            side = 'A' if lead > 0 else 'B'\n            if remaining == 0:\n                return '%s wins %d up' % (side, abs(lead))\n            return '%s wins %d&%d' % (side, abs(lead), remaining)\n    if played == 18:\n        return 'halved'\n    remaining = 18 - played\n    if lead == 0:\n        return 'all square'\n    side = 'A' if lead > 0 else 'B'\n    if abs(lead) == remaining:\n        return '%s dormie %d' % (side, remaining)\n    return '%s %d up' % (side, abs(lead))\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 early lead', ('AAH',), 'A 2 up'),\n  ('boundary dormie', ('AAAHHHHHHHHHHHH',), 'A dormie 3'),\n  ('boundary closure three and two', ('BBBHHHHHHHHHHHHH',), 'B wins 3&2'),\n  ('boundary one up at eighteen', ('AHHHHHHHHHHHHHHHHH',), 'A wins 1 up'),\n  ('control halved match', ('ABABABABABABABABAB',), 'halved'),\n  ('control all square', ('HAB',), 'all square'),\n  ('regression: closure condition', ('BBHAABABABBHBBABA',), 'B wins 4&2'),\n  ('variant scenario 1', ('HBAABBABBBAAABAHBBAABB',), 'B wins 2 up'),\n  ('variant scenario 2', ('HABBAHHAAH',), 'A 2 up')],\n [('control early lead', ('AAH',), 'A 2 up'),\n  ('boundary dormie', ('AAAHHHHHHHHHHHH',), 'A dormie 3'),\n  ('boundary closure three and two', ('BBBHHHHHHHHHHHHH',), 'B wins 3&2'),\n  ('boundary one up at eighteen', ('AHHHHHHHHHHHHHHHHH',), 'A wins 1 up'),\n  ('control halved match', ('ABABABABABABABABAB',), 'halved'),\n  ('control all square', ('HAB',), 'all square'),\n  ('regression: closure condition', ('BBHAAHHBBABBBABBABH',), 'B wins 4&3'),\n  ('regression: closure condition', ('AAHAHABAAHABH',), 'A dormie 5'),\n  ('variant scenario 1', ('HBHBAHBHAHBBAAA',), 'all square'),\n  ('variant scenario 2', ('BABHBBBAAHA',), 'B 1 up')],\n [('control early lead', ('AAH',), 'A 2 up'),\n  ('boundary dormie', ('AAAHHHHHHHHHHHH',), 'A dormie 3'),\n  ('boundary closure three and two', ('BBBHHHHHHHHHHHHH',), 'B wins 3&2'),\n  ('boundary one up at eighteen', ('AHHHHHHHHHHHHHHHHH',), 'A wins 1 up'),\n  ('control halved match', ('ABABABABABABABABAB',), 'halved'),\n  ('control all square', ('HAB',), 'all square'),\n  ('regression: closure condition', ('AABHAHABBBAAABAB',), 'A dormie 2'),\n  ('regression: closure condition', ('AAHBABAHABBHBBBHABHA',), 'B wins 2 up'),\n  ('variant scenario 1', ('ABAHAAAHAAAAAAHHBBABA',), 'A wins 8&6'),\n  ('variant scenario 2', ('AHAHHABAABAAAABAH',), 'A wins 6&5')],\n [('control early lead', ('AAH',), 'A 2 up'),\n  ('boundary dormie', ('AAAHHHHHHHHHHHH',), 'A dormie 3'),\n  ('boundary closure three and two', ('BBBHHHHHHHHHHHHH',), 'B wins 3&2'),\n  ('boundary one up at eighteen', ('AHHHHHHHHHHHHHHHHH',), 'A wins 1 up'),\n  ('control halved match', ('ABABABABABABABABAB',), 'halved'),\n  ('control all square', ('HAB',), 'all square'),\n  ('regression: closure condition', ('BBBAAHHBAABBBHHBAB',), 'B wins 4&2'),\n  ('variant scenario 1', ('BHABBABABHAH',), 'B 1 up'),\n  ('variant scenario 2', ('ABHBABBBHHBBBAB',), 'B wins 6&5')],\n [('control early lead', ('AAH',), 'A 2 up'),\n  ('boundary dormie', ('AAAHHHHHHHHHHHH',), 'A dormie 3'),\n  ('boundary closure three and two', ('BBBHHHHHHHHHHHHH',), 'B wins 3&2'),\n  ('boundary one up at eighteen', ('AHHHHHHHHHHHHHHHHH',), 'A wins 1 up'),\n  ('control halved match', ('ABABABABABABABABAB',), 'halved'),\n  ('control all square', ('HAB',), 'all square'),\n  ('regression: closure condition', ('BBHABABABBABHHBBHB',), 'B wins 4&3'),\n  ('regression: closure condition', ('BAAHHAAHAHBBABAAAAA',), 'A wins 4&2'),\n  ('variant scenario 1', ('ABBBABHAAAH',), 'A 1 up'),\n  ('variant scenario 2', ('AABBHAAHBAAHAABABA',), 'A wins 5&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":"779a48ae4d056431ed267ef4c44baf6e555ee39757205232bb3c0b151bcf3c15","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(holes):\n    lead = 0\n    played = 0\n    for h in holes:\n        played += 1\n        if h == 'A':\n            lead += 1\n        elif h == 'B':\n            lead -= 1\n        remaining = 18 - played\n        if abs(lead) >= remaining:\n            side = 'A' if lead > 0 else 'B'\n            if remaining == 0:\n                return '%s wins %d up' % (side, abs(lead))\n            return '%s wins %d&%d' % (side, abs(lead), remaining)\n    if played == 18:\n        return 'halved'\n    remaining = 18 - played\n    if lead == 0:\n        return 'all square'\n    side = 'A' if lead > 0 else 'B'\n    if abs(lead) == remaining:\n        return '%s dormie %d' % (side, remaining)\n    return '%s %d up' % (side, abs(lead))\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 early lead', ('AAH',), 'A 2 up'),\n  ('boundary dormie', ('AAAHHHHHHHHHHHH',), 'A dormie 3'),\n  ('boundary closure three and two', ('BBBHHHHHHHHHHHHH',), 'B wins 3&2'),\n  ('boundary one up at eighteen', ('AHHHHHHHHHHHHHHHHH',), 'A wins 1 up'),\n  ('control halved match', ('ABABABABABABABABAB',), 'halved'),\n  ('control all square', ('HAB',), 'all square'),\n  ('regression: closure condition', ('BBHAABABABBHBBABA',), 'B wins 4&2'),\n  ('variant scenario 1', ('HBAABBABBBAAABAHBBAABB',), 'B wins 2 up'),\n  ('variant scenario 2', ('HABBAHHAAH',), 'A 2 up')],\n [('control early lead', ('AAH',), 'A 2 up'),\n  ('boundary dormie', ('AAAHHHHHHHHHHHH',), 'A dormie 3'),\n  ('boundary closure three and two', ('BBBHHHHHHHHHHHHH',), 'B wins 3&2'),\n  ('boundary one up at eighteen', ('AHHHHHHHHHHHHHHHHH',), 'A wins 1 up'),\n  ('control halved match', ('ABABABABABABABABAB',), 'halved'),\n  ('control all square', ('HAB',), 'all square'),\n  ('regression: closure condition', ('BBHAAHHBBABBBABBABH',), 'B wins 4&3'),\n  ('regression: closure condition', ('AAHAHABAAHABH',), 'A dormie 5'),\n  ('variant scenario 1', ('HBHBAHBHAHBBAAA',), 'all square'),\n  ('variant scenario 2', ('BABHBBBAAHA',), 'B 1 up')],\n [('control early lead', ('AAH',), 'A 2 up'),\n  ('boundary dormie', ('AAAHHHHHHHHHHHH',), 'A dormie 3'),\n  ('boundary closure three and two', ('BBBHHHHHHHHHHHHH',), 'B wins 3&2'),\n  ('boundary one up at eighteen', ('AHHHHHHHHHHHHHHHHH',), 'A wins 1 up'),\n  ('control halved match', ('ABABABABABABABABAB',), 'halved'),\n  ('control all square', ('HAB',), 'all square'),\n  ('regression: closure condition', ('AABHAHABBBAAABAB',), 'A dormie 2'),\n  ('regression: closure condition', ('AAHBABAHABBHBBBHABHA',), 'B wins 2 up'),\n  ('variant scenario 1', ('ABAHAAAHAAAAAAHHBBABA',), 'A wins 8&6'),\n  ('variant scenario 2', ('AHAHHABAABAAAABAH',), 'A wins 6&5')],\n [('control early lead', ('AAH',), 'A 2 up'),\n  ('boundary dormie', ('AAAHHHHHHHHHHHH',), 'A dormie 3'),\n  ('boundary closure three and two', ('BBBHHHHHHHHHHHHH',), 'B wins 3&2'),\n  ('boundary one up at eighteen', ('AHHHHHHHHHHHHHHHHH',), 'A wins 1 up'),\n  ('control halved match', ('ABABABABABABABABAB',), 'halved'),\n  ('control all square', ('HAB',), 'all square'),\n  ('regression: closure condition', ('BBBAAHHBAABBBHHBAB',), 'B wins 4&2'),\n  ('variant scenario 1', ('BHABBABABHAH',), 'B 1 up'),\n  ('variant scenario 2', ('ABHBABBBHHBBBAB',), 'B wins 6&5')],\n [('control early lead', ('AAH',), 'A 2 up'),\n  ('boundary dormie', ('AAAHHHHHHHHHHHH',), 'A dormie 3'),\n  ('boundary closure three and two', ('BBBHHHHHHHHHHHHH',), 'B wins 3&2'),\n  ('boundary one up at eighteen', ('AHHHHHHHHHHHHHHHHH',), 'A wins 1 up'),\n  ('control halved match', ('ABABABABABABABABAB',), 'halved'),\n  ('control all square', ('HAB',), 'all square'),\n  ('regression: closure condition', ('BBHABABABBABHHBBHB',), 'B wins 4&3'),\n  ('regression: closure condition', ('BAAHHAAHAHBBABAAAAA',), 'A wins 4&2'),\n  ('variant scenario 1', ('ABBBABHAAAH',), 'A 1 up'),\n  ('variant scenario 2', ('AABBHAAHBAAHAABABA',), 'A wins 5&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-match-play-status-closure-condition","generated_at":"2026-09-29T14:50:28.506238+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Ryder-Cup style boards and match-play brackets display closure notation like 3&2 and dormie.","root_cause":"The closure test uses lead >= remaining.","sha256":"3d62da27baea2a6ea9f23eeb5a72f27d1ef4d483f5a536b6edf14eae465d5a42","title":"Dormie treated as a closed match · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":37.306,"exit_code":1,"observations":[{"actual":"A 2 up","check":"control early lead","expected":"A 2 up","passed":true},{"actual":"A dormie 3","check":"boundary dormie","expected":"A dormie 3","passed":true},{"actual":"B 3 up","check":"boundary closure three and two","expected":"B wins 3&2","passed":false},{"actual":"A wins 1 up","check":"boundary one up at eighteen","expected":"A wins 1 up","passed":true},{"actual":"halved","check":"control halved match","expected":"halved","passed":true},{"actual":"all square","check":"control all square","expected":"all square","passed":true},{"actual":"B 3 up","check":"regression: closure condition","expected":"B wins 4&2","passed":false},{"actual":"B wins 0&-2","check":"variant scenario 1","expected":"B wins 2 up","passed":false},{"actual":"A 2 up","check":"variant scenario 2","expected":"A 2 up","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control early lead\", \"actual\": \"A 2 up\", \"expected\": \"A 2 up\", \"passed\": true}, {\"check\": \"boundary dormie\", \"actual\": \"A dormie 3\", \"expected\": \"A dormie 3\", \"passed\": true}, {\"check\": \"boundary closure three and two\", \"actual\": \"B 3 up\", \"expected\": \"B wins 3&2\", \"passed\": false}, {\"check\": \"boundary one up at eighteen\", \"actual\": \"A wins 1 up\", \"expected\": \"A wins 1 up\", \"passed\": true}, {\"check\": \"control halved match\", \"actual\": \"halved\", \"expected\": \"halved\", \"passed\": true}, {\"check\": \"control all square\", \"actual\": \"all square\", \"expected\": \"all square\", \"passed\": true}, {\"check\": \"regression: closure condition\", \"actual\": \"B 3 up\", \"expected\": \"B wins 4&2\", \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": \"B wins 0&-2\", \"expected\": \"B wins 2 up\", \"passed\": false}, {\"check\": \"variant scenario 2\", \"actual\": \"A 2 up\", \"expected\": \"A 2 up\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.791,"exit_code":1,"observations":[{"actual":"A 2 up","check":"control early lead","expected":"A 2 up","passed":true},{"actual":"A wins 3&3","check":"boundary dormie","expected":"A dormie 3","passed":false},{"actual":"B wins 3&3","check":"boundary closure three and two","expected":"B wins 3&2","passed":false},{"actual":"A wins 1&1","check":"boundary one up at eighteen","expected":"A wins 1 up","passed":false},{"actual":"A wins 1&1","check":"control halved match","expected":"halved","passed":false},{"actual":"all square","check":"control all square","expected":"all square","passed":true},{"actual":"B wins 4&4","check":"regression: closure condition","expected":"B wins 4&2","passed":false},{"actual":"B wins 1&1","check":"variant scenario 1","expected":"B wins 2 up","passed":false},{"actual":"A 2 up","check":"variant scenario 2","expected":"A 2 up","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"control early lead\", \"actual\": \"A 2 up\", \"expected\": \"A 2 up\", \"passed\": true}, {\"check\": \"boundary dormie\", \"actual\": \"A wins 3&3\", \"expected\": \"A dormie 3\", \"passed\": false}, {\"check\": \"boundary closure three and two\", \"actual\": \"B wins 3&3\", \"expected\": \"B wins 3&2\", \"passed\": false}, {\"check\": \"boundary one up at eighteen\", \"actual\": \"A wins 1&1\", \"expected\": \"A wins 1 up\", \"passed\": false}, {\"check\": \"control halved match\", \"actual\": \"A wins 1&1\", \"expected\": \"halved\", \"passed\": false}, {\"check\": \"control all square\", \"actual\": \"all square\", \"expected\": \"all square\", \"passed\": true}, {\"check\": \"regression: closure condition\", \"actual\": \"B wins 4&4\", \"expected\": \"B wins 4&2\", \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": \"B wins 1&1\", \"expected\": \"B wins 2 up\", \"passed\": false}, {\"check\": \"variant scenario 2\", \"actual\": \"A 2 up\", \"expected\": \"A 2 up\", \"passed\": true}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}