{"abstract":"B dormie situations display as \"B 3 up\".","category":"Sports scoring and tiebreakers","checks":10,"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":"Only flagging dormie with one hole to play misses dormie 2 and 3 situations.","family":"w2-sports-scoring-golf-match-play-status-dormie-detection","id":"FA-84196","implementations":{"attempt":{"sha256":"39e8650e4e062a2044214337163495e77300cc08659f1fcfb3172717c04acc47","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 == 1:\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: dormie detection', ('BAHBHBAABAAAHHBA',), 'A dormie 2'),\n  ('regression: dormie detection', ('ABBBBBAHABBHBA',), 'B dormie 4'),\n  ('variant scenario 1', ('HBHAABAHBBBBHABBAABH',), 'B wins 4&2'),\n  ('variant scenario 2', ('AHABABAA',), 'A 3 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: dormie detection', ('HABBHABHBABBHBA',), 'B dormie 3'),\n  ('variant scenario 1', ('AHAAABBHBAABA',), 'A 3 up'),\n  ('variant scenario 2', ('BBAAAABAB',), 'A 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: dormie detection', ('AABBBAHBAAAAABH',), 'A dormie 3'),\n  ('regression: dormie detection', ('ABABBHBBHAABBAB',), 'B dormie 3'),\n  ('variant scenario 1', ('AABAAAAAAAHBHBH',), 'A wins 8&7'),\n  ('variant scenario 2', ('HBAHBABABAA',), 'A 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: dormie detection', ('BBHABABABAHBBAB',), 'B dormie 3'),\n  ('variant scenario 1', ('BAAHBABA',), 'A 1 up'),\n  ('variant scenario 2', ('AABBABHAAAHAAAHBH',), 'A wins 6&4')],\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: dormie detection', ('AHAAAABABAABBBH',), 'A dormie 3'),\n  ('regression: dormie detection', ('BHABAAABHABBBBB',), 'B dormie 3'),\n  ('variant scenario 1', ('HHABAAABHA',), 'A 3 up'),\n  ('variant scenario 2', ('AHBBAAAHBHBAAHBABAH',), 'A wins 2 up')]]\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":"3b87a410c83140bcaf67af8516212cdd694408d11574d7dc6e1fbe0b2d56ac3d","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 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: dormie detection', ('BAHBHBAABAAAHHBA',), 'A dormie 2'),\n  ('regression: dormie detection', ('ABBBBBAHABBHBA',), 'B dormie 4'),\n  ('variant scenario 1', ('HBHAABAHBBBBHABBAABH',), 'B wins 4&2'),\n  ('variant scenario 2', ('AHABABAA',), 'A 3 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: dormie detection', ('HABBHABHBABBHBA',), 'B dormie 3'),\n  ('variant scenario 1', ('AHAAABBHBAABA',), 'A 3 up'),\n  ('variant scenario 2', ('BBAAAABAB',), 'A 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: dormie detection', ('AABBBAHBAAAAABH',), 'A dormie 3'),\n  ('regression: dormie detection', ('ABABBHBBHAABBAB',), 'B dormie 3'),\n  ('variant scenario 1', ('AABAAAAAAAHBHBH',), 'A wins 8&7'),\n  ('variant scenario 2', ('HBAHBABABAA',), 'A 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: dormie detection', ('BBHABABABAHBBAB',), 'B dormie 3'),\n  ('variant scenario 1', ('BAAHBABA',), 'A 1 up'),\n  ('variant scenario 2', ('AABBABHAAAHAAAHBH',), 'A wins 6&4')],\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: dormie detection', ('AHAAAABABAABBBH',), 'A dormie 3'),\n  ('regression: dormie detection', ('BHABAAABHABBBBB',), 'B dormie 3'),\n  ('variant scenario 1', ('HHABAAABHA',), 'A 3 up'),\n  ('variant scenario 2', ('AHBBAAAHBHBAAHBABAH',), 'A wins 2 up')]]\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-dormie-detection","generated_at":"2026-09-29T14:50:28.534885+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 dormie check compares the signed lead with the holes remaining.","sha256":"2d5518478e6dad92ed0253969ababb61ba9cfb0daaada6b3922108fea08e4660","title":"Dormie shown only for one side or only on the 18th tee · 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":40.029,"exit_code":1,"observations":[{"actual":"A 2 up","check":"control early lead","expected":"A 2 up","passed":true},{"actual":"A 3 up","check":"boundary dormie","expected":"A dormie 3","passed":false},{"actual":"B wins 3&2","check":"boundary closure three and two","expected":"B wins 3&2","passed":true},{"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":"A 2 up","check":"regression: dormie detection","expected":"A dormie 2","passed":false},{"actual":"B 4 up","check":"regression: dormie detection","expected":"B dormie 4","passed":false},{"actual":"B wins 4&2","check":"variant scenario 1","expected":"B wins 4&2","passed":true},{"actual":"A 3 up","check":"variant scenario 2","expected":"A 3 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 3 up\", \"expected\": \"A dormie 3\", \"passed\": false}, {\"check\": \"boundary closure three and two\", \"actual\": \"B wins 3&2\", \"expected\": \"B wins 3&2\", \"passed\": true}, {\"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: dormie detection\", \"actual\": \"A 2 up\", \"expected\": \"A dormie 2\", \"passed\": false}, {\"check\": \"regression: dormie detection\", \"actual\": \"B 4 up\", \"expected\": \"B dormie 4\", \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": \"B wins 4&2\", \"expected\": \"B wins 4&2\", \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": \"A 3 up\", \"expected\": \"A 3 up\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.919,"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 wins 3&2","check":"boundary closure three and two","expected":"B wins 3&2","passed":true},{"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":"A dormie 2","check":"regression: dormie detection","expected":"A dormie 2","passed":true},{"actual":"B 4 up","check":"regression: dormie detection","expected":"B dormie 4","passed":false},{"actual":"B wins 4&2","check":"variant scenario 1","expected":"B wins 4&2","passed":true},{"actual":"A 3 up","check":"variant scenario 2","expected":"A 3 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 wins 3&2\", \"expected\": \"B wins 3&2\", \"passed\": true}, {\"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: dormie detection\", \"actual\": \"A dormie 2\", \"expected\": \"A dormie 2\", \"passed\": true}, {\"check\": \"regression: dormie detection\", \"actual\": \"B 4 up\", \"expected\": \"B dormie 4\", \"passed\": false}, {\"check\": \"variant scenario 1\", \"actual\": \"B wins 4&2\", \"expected\": \"B wins 4&2\", \"passed\": true}, {\"check\": \"variant scenario 2\", \"actual\": \"A 3 up\", \"expected\": \"A 3 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."}}