{"abstract":"An ace of hearts dealt both in hand and on the board produces a hand instead of \"invalid\".","category":"Poker hand evaluation","checks":8,"contract":"Input: {\"variant\": \"plo\" (4 hole cards) or \"plo5\" (5 hole cards), \"hole\": [...], \"board\": 3 to 5 cards}. The hand must use exactly two hole cards and exactly three board cards. Return the best category name, or \"invalid\" for a wrong hole count, a board outside 3-5 cards, or a duplicated card.","evaluation_group":"w2-poker_hand_evaluation-omaha-best-category","failed_approach":"Checking only the board still misses hole-board and hole-hole duplicates.","family":"w2-poker_hand_evaluation-omaha-best-category-duplicate-card-scope","id":"FA-82011","implementations":{"attempt":{"sha256":"335b90966da5f7f0fb4922e39948bf5f19d21370b1bf1c21cfd5c7c801b909af","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport collections\nimport itertools\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    def key5(h):\n        vals=sorted((R.index(c[0])+2 for c in h), reverse=True)\n        cnt=collections.Counter(vals)\n        order=sorted(cnt, key=lambda v:(cnt[v],v), reverse=True)\n        shape=sorted(cnt.values(), reverse=True)\n        flush=len({c[1] for c in h})==1\n        straight=len(cnt)==5 and (vals[0]-vals[4]==4 or vals==[14,5,4,3,2])\n        top=5 if vals==[14,5,4,3,2] else vals[0]\n        if straight and flush: return (8,[top])\n        if shape==[4,1]: return (7,order)\n        if shape==[3,2]: return (6,order)\n        if flush: return (5,vals)\n        if straight: return (4,[top])\n        if shape==[3,1,1]: return (3,order)\n        if shape==[2,2,1]: return (2,order)\n        if shape==[2,1,1,1]: return (1,order)\n        return (0,vals)\n    \n    NAMES=['high card','one pair','two pair','three of a kind','straight','flush','full house','four of a kind','straight flush']\n    hole=x['hole']; board=x['board']\n    if len(hole)!={'plo':4,'plo5':5}[x['variant']]: return 'invalid'\n    if not 3<=len(board)<=5: return 'invalid'\n    allc=hole+board\n    if len(set(board))!=len(board): return 'invalid'\n    cands=[hc+bc for hc in itertools.combinations(hole,2) for bc in itertools.combinations(board,3)]\n    return NAMES[max(key5(c) for c in cands)[0]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('board flush one suited hole card',\n   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},\n   'high card'),\n  ('board straight',\n   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},\n   'one pair'),\n  ('four aces in hand',\n   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},\n   'one pair'),\n  ('real flush',\n   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},\n   'flush'),\n  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'three of a kind'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')],\n [('real flush',\n   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},\n   'flush'),\n  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'three of a kind'),\n  ('turn board',\n   {'board': ['Tc', 'Jd', '2c', '5h'], 'hole': ['8h', '9d', 'Kc', 'Ks'], 'variant': 'plo'},\n   'one pair'),\n  ('two card board', {'board': ['Ac', '7d'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'invalid'),\n  ('plo5 five holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},\n   'three of a kind'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')],\n [('two card board', {'board': ['Ac', '7d'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'invalid'),\n  ('plo5 five holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},\n   'three of a kind'),\n  ('plo with five holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo'},\n   'invalid'),\n  ('plo5 with four holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo5'}, 'invalid'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('six card board',\n   {'board': ['Qh', 'Jh', '2c', '3c', '4c', '5c'],\n    'hole': ['Ah', 'Ad', 'Kc', 'Ks'],\n    'variant': 'plo'},\n   'invalid')],\n [('board flush one suited hole card',\n   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},\n   'high card'),\n  ('board straight',\n   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},\n   'one pair'),\n  ('plo5 with four holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo5'}, 'invalid'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('six card board',\n   {'board': ['Qh', 'Jh', '2c', '3c', '4c', '5c'],\n    'hole': ['Ah', 'Ad', 'Kc', 'Ks'],\n    'variant': 'plo'},\n   'invalid'),\n  ('full house two pairs in hand',\n   {'board': ['Kc', '7d', '2c', '3h', '9s'], 'hole': ['Kh', 'Kd', '7c', '7s'], 'variant': 'plo'},\n   'three of a kind')],\n [('board flush one suited hole card',\n   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},\n   'high card'),\n  ('board straight',\n   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},\n   'one pair'),\n  ('four aces in hand',\n   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},\n   'one pair'),\n  ('real flush',\n   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},\n   'flush'),\n  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'three of a kind'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'error:' + type(exc).__name__\n    check(label, actual, 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":"cbdf073f7e22d987a55cf8b676930d6046939014c097bb09b0aaa716615621fe","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport collections\nimport itertools\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    def key5(h):\n        vals=sorted((R.index(c[0])+2 for c in h), reverse=True)\n        cnt=collections.Counter(vals)\n        order=sorted(cnt, key=lambda v:(cnt[v],v), reverse=True)\n        shape=sorted(cnt.values(), reverse=True)\n        flush=len({c[1] for c in h})==1\n        straight=len(cnt)==5 and (vals[0]-vals[4]==4 or vals==[14,5,4,3,2])\n        top=5 if vals==[14,5,4,3,2] else vals[0]\n        if straight and flush: return (8,[top])\n        if shape==[4,1]: return (7,order)\n        if shape==[3,2]: return (6,order)\n        if flush: return (5,vals)\n        if straight: return (4,[top])\n        if shape==[3,1,1]: return (3,order)\n        if shape==[2,2,1]: return (2,order)\n        if shape==[2,1,1,1]: return (1,order)\n        return (0,vals)\n    \n    NAMES=['high card','one pair','two pair','three of a kind','straight','flush','full house','four of a kind','straight flush']\n    hole=x['hole']; board=x['board']\n    if len(hole)!={'plo':4,'plo5':5}[x['variant']]: return 'invalid'\n    if not 3<=len(board)<=5: return 'invalid'\n    allc=hole+board\n    if len(set(hole))!=len(hole): return 'invalid'\n    cands=[hc+bc for hc in itertools.combinations(hole,2) for bc in itertools.combinations(board,3)]\n    return NAMES[max(key5(c) for c in cands)[0]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('board flush one suited hole card',\n   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},\n   'high card'),\n  ('board straight',\n   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},\n   'one pair'),\n  ('four aces in hand',\n   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},\n   'one pair'),\n  ('real flush',\n   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},\n   'flush'),\n  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'three of a kind'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')],\n [('real flush',\n   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},\n   'flush'),\n  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'three of a kind'),\n  ('turn board',\n   {'board': ['Tc', 'Jd', '2c', '5h'], 'hole': ['8h', '9d', 'Kc', 'Ks'], 'variant': 'plo'},\n   'one pair'),\n  ('two card board', {'board': ['Ac', '7d'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'invalid'),\n  ('plo5 five holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},\n   'three of a kind'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')],\n [('two card board', {'board': ['Ac', '7d'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'invalid'),\n  ('plo5 five holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},\n   'three of a kind'),\n  ('plo with five holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo'},\n   'invalid'),\n  ('plo5 with four holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo5'}, 'invalid'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('six card board',\n   {'board': ['Qh', 'Jh', '2c', '3c', '4c', '5c'],\n    'hole': ['Ah', 'Ad', 'Kc', 'Ks'],\n    'variant': 'plo'},\n   'invalid')],\n [('board flush one suited hole card',\n   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},\n   'high card'),\n  ('board straight',\n   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},\n   'one pair'),\n  ('plo5 with four holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo5'}, 'invalid'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('six card board',\n   {'board': ['Qh', 'Jh', '2c', '3c', '4c', '5c'],\n    'hole': ['Ah', 'Ad', 'Kc', 'Ks'],\n    'variant': 'plo'},\n   'invalid'),\n  ('full house two pairs in hand',\n   {'board': ['Kc', '7d', '2c', '3h', '9s'], 'hole': ['Kh', 'Kd', '7c', '7s'], 'variant': 'plo'},\n   'three of a kind')],\n [('board flush one suited hole card',\n   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},\n   'high card'),\n  ('board straight',\n   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},\n   'one pair'),\n  ('four aces in hand',\n   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},\n   'one pair'),\n  ('real flush',\n   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},\n   'flush'),\n  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'three of a kind'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'error:' + type(exc).__name__\n    check(label, actual, 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":"79ffe7056db241f1f2d1c9a60b1e09cfbccd5aeae417b842cc95cb591674d9f9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport collections\nimport itertools\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    def key5(h):\n        vals=sorted((R.index(c[0])+2 for c in h), reverse=True)\n        cnt=collections.Counter(vals)\n        order=sorted(cnt, key=lambda v:(cnt[v],v), reverse=True)\n        shape=sorted(cnt.values(), reverse=True)\n        flush=len({c[1] for c in h})==1\n        straight=len(cnt)==5 and (vals[0]-vals[4]==4 or vals==[14,5,4,3,2])\n        top=5 if vals==[14,5,4,3,2] else vals[0]\n        if straight and flush: return (8,[top])\n        if shape==[4,1]: return (7,order)\n        if shape==[3,2]: return (6,order)\n        if flush: return (5,vals)\n        if straight: return (4,[top])\n        if shape==[3,1,1]: return (3,order)\n        if shape==[2,2,1]: return (2,order)\n        if shape==[2,1,1,1]: return (1,order)\n        return (0,vals)\n    \n    NAMES=['high card','one pair','two pair','three of a kind','straight','flush','full house','four of a kind','straight flush']\n    hole=x['hole']; board=x['board']\n    if len(hole)!={'plo':4,'plo5':5}[x['variant']]: return 'invalid'\n    if not 3<=len(board)<=5: return 'invalid'\n    allc=hole+board\n    if len(set(allc))!=len(allc): return 'invalid'\n    cands=[hc+bc for hc in itertools.combinations(hole,2) for bc in itertools.combinations(board,3)]\n    return NAMES[max(key5(c) for c in cands)[0]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('board flush one suited hole card',\n   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},\n   'high card'),\n  ('board straight',\n   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},\n   'one pair'),\n  ('four aces in hand',\n   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},\n   'one pair'),\n  ('real flush',\n   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},\n   'flush'),\n  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'three of a kind'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')],\n [('real flush',\n   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},\n   'flush'),\n  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'three of a kind'),\n  ('turn board',\n   {'board': ['Tc', 'Jd', '2c', '5h'], 'hole': ['8h', '9d', 'Kc', 'Ks'], 'variant': 'plo'},\n   'one pair'),\n  ('two card board', {'board': ['Ac', '7d'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'invalid'),\n  ('plo5 five holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},\n   'three of a kind'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')],\n [('two card board', {'board': ['Ac', '7d'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'invalid'),\n  ('plo5 five holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo5'},\n   'three of a kind'),\n  ('plo with five holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks', '2d'], 'variant': 'plo'},\n   'invalid'),\n  ('plo5 with four holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo5'}, 'invalid'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('six card board',\n   {'board': ['Qh', 'Jh', '2c', '3c', '4c', '5c'],\n    'hole': ['Ah', 'Ad', 'Kc', 'Ks'],\n    'variant': 'plo'},\n   'invalid')],\n [('board flush one suited hole card',\n   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},\n   'high card'),\n  ('board straight',\n   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},\n   'one pair'),\n  ('plo5 with four holes',\n   {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo5'}, 'invalid'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('six card board',\n   {'board': ['Qh', 'Jh', '2c', '3c', '4c', '5c'],\n    'hole': ['Ah', 'Ad', 'Kc', 'Ks'],\n    'variant': 'plo'},\n   'invalid'),\n  ('full house two pairs in hand',\n   {'board': ['Kc', '7d', '2c', '3h', '9s'], 'hole': ['Kh', 'Kd', '7c', '7s'], 'variant': 'plo'},\n   'three of a kind')],\n [('board flush one suited hole card',\n   {'board': ['2h', '5h', '7h', '9h', 'Th'], 'hole': ['Ah', 'Kd', 'Qc', 'Js'], 'variant': 'plo'},\n   'high card'),\n  ('board straight',\n   {'board': ['9h', 'Td', 'Jc', 'Qs', 'Kh'], 'hole': ['2c', '2d', '3c', '3s'], 'variant': 'plo'},\n   'one pair'),\n  ('four aces in hand',\n   {'board': ['2h', '7d', '9c', 'Js', '4h'], 'hole': ['Ah', 'Ad', 'Ac', 'As'], 'variant': 'plo'},\n   'one pair'),\n  ('real flush',\n   {'board': ['2h', '5h', '7h', '9d', 'Tc'], 'hole': ['Ah', 'Kh', 'Qc', 'Js'], 'variant': 'plo'},\n   'flush'),\n  ('flop only', {'board': ['Ac', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'},\n   'three of a kind'),\n  ('duplicate across hole and board',\n   {'board': ['Ah', '7d', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate inside hole',\n   {'board': ['Qh', '7d', '2c'], 'hole': ['Ah', 'Ah', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid'),\n  ('duplicate on board',\n   {'board': ['Qh', 'Qh', '2c'], 'hole': ['Ah', 'Ad', 'Kc', 'Ks'], 'variant': 'plo'}, 'invalid')]]\nfor label, args, expected in fixtures[N-1]:\n    try:\n        actual = solve(args)\n    except Exception as exc:\n        actual = 'error:' + type(exc).__name__\n    check(label, actual, 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":"A deterministic toy model with an explicitly stated contract; card strings are rank+suit (for example \"As\", \"Td\"); no claim of conformance to any casino or tournament rulebook. 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-poker_hand_evaluation-omaha-best-category-duplicate-card-scope","generated_at":"2026-09-29T14:50:08.231193+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Poker engines settle real money pots from these comparisons; a single misranked hand pays the wrong seat.","repair":"Check for duplicates across the combined hole and board cards.","root_cause":"Duplicate detection only inspects the hole cards.","sha256":"5b0fd81ec095bdd8fc6fc481a1978d05fba18aacb20c067cbbed80b420aab5dc","title":"Card shared by hole and board goes undetected · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.903,"exit_code":1,"observations":[{"actual":"high card","check":"board flush one suited hole card","expected":"high card","passed":true},{"actual":"one pair","check":"board straight","expected":"one pair","passed":true},{"actual":"one pair","check":"four aces in hand","expected":"one pair","passed":true},{"actual":"flush","check":"real flush","expected":"flush","passed":true},{"actual":"three of a kind","check":"flop only","expected":"three of a kind","passed":true},{"actual":"three of a kind","check":"duplicate across hole and board","expected":"invalid","passed":false},{"actual":"one pair","check":"duplicate inside hole","expected":"invalid","passed":false},{"actual":"invalid","check":"duplicate on board","expected":"invalid","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"board flush one suited hole card\", \"actual\": \"high card\", \"expected\": \"high card\", \"passed\": true}, {\"check\": \"board straight\", \"actual\": \"one pair\", \"expected\": \"one pair\", \"passed\": true}, {\"check\": \"four aces in hand\", \"actual\": \"one pair\", \"expected\": \"one pair\", \"passed\": true}, {\"check\": \"real flush\", \"actual\": \"flush\", \"expected\": \"flush\", \"passed\": true}, {\"check\": \"flop only\", \"actual\": \"three of a kind\", \"expected\": \"three of a kind\", \"passed\": true}, {\"check\": \"duplicate across hole and board\", \"actual\": \"three of a kind\", \"expected\": \"invalid\", \"passed\": false}, {\"check\": \"duplicate inside hole\", \"actual\": \"one pair\", \"expected\": \"invalid\", \"passed\": false}, {\"check\": \"duplicate on board\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.993,"exit_code":1,"observations":[{"actual":"high card","check":"board flush one suited hole card","expected":"high card","passed":true},{"actual":"one pair","check":"board straight","expected":"one pair","passed":true},{"actual":"one pair","check":"four aces in hand","expected":"one pair","passed":true},{"actual":"flush","check":"real flush","expected":"flush","passed":true},{"actual":"three of a kind","check":"flop only","expected":"three of a kind","passed":true},{"actual":"three of a kind","check":"duplicate across hole and board","expected":"invalid","passed":false},{"actual":"invalid","check":"duplicate inside hole","expected":"invalid","passed":true},{"actual":"two pair","check":"duplicate on board","expected":"invalid","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"board flush one suited hole card\", \"actual\": \"high card\", \"expected\": \"high card\", \"passed\": true}, {\"check\": \"board straight\", \"actual\": \"one pair\", \"expected\": \"one pair\", \"passed\": true}, {\"check\": \"four aces in hand\", \"actual\": \"one pair\", \"expected\": \"one pair\", \"passed\": true}, {\"check\": \"real flush\", \"actual\": \"flush\", \"expected\": \"flush\", \"passed\": true}, {\"check\": \"flop only\", \"actual\": \"three of a kind\", \"expected\": \"three of a kind\", \"passed\": true}, {\"check\": \"duplicate across hole and board\", \"actual\": \"three of a kind\", \"expected\": \"invalid\", \"passed\": false}, {\"check\": \"duplicate inside hole\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"duplicate on board\", \"actual\": \"two pair\", \"expected\": \"invalid\", \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.564,"exit_code":0,"observations":[{"actual":"high card","check":"board flush one suited hole card","expected":"high card","passed":true},{"actual":"one pair","check":"board straight","expected":"one pair","passed":true},{"actual":"one pair","check":"four aces in hand","expected":"one pair","passed":true},{"actual":"flush","check":"real flush","expected":"flush","passed":true},{"actual":"three of a kind","check":"flop only","expected":"three of a kind","passed":true},{"actual":"invalid","check":"duplicate across hole and board","expected":"invalid","passed":true},{"actual":"invalid","check":"duplicate inside hole","expected":"invalid","passed":true},{"actual":"invalid","check":"duplicate on board","expected":"invalid","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"board flush one suited hole card\", \"actual\": \"high card\", \"expected\": \"high card\", \"passed\": true}, {\"check\": \"board straight\", \"actual\": \"one pair\", \"expected\": \"one pair\", \"passed\": true}, {\"check\": \"four aces in hand\", \"actual\": \"one pair\", \"expected\": \"one pair\", \"passed\": true}, {\"check\": \"real flush\", \"actual\": \"flush\", \"expected\": \"flush\", \"passed\": true}, {\"check\": \"flop only\", \"actual\": \"three of a kind\", \"expected\": \"three of a kind\", \"passed\": true}, {\"check\": \"duplicate across hole and board\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"duplicate inside hole\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"duplicate on board\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}