{"abstract":"Any hand holding an ace and a trey or a seven is reported as containing a pair.","category":"Poker hand evaluation","checks":8,"contract":"Input: five cards \"Rs\" (rank may be written \"10\" for ten; suits ignored, repeated ranks allowed up to four). Each rank maps to a distinct prime (2 for deuce ... 41 for ace); the product of the five primes is factored back into rank multiplicities, and the sorted multiplicity pattern names the rank shape: four of a kind, full house, three of a kind, two pair, one pair or high card.","evaluation_group":"w2-poker_hand_evaluation-prime-product-shape","failed_approach":"Replacing 39 with 49 is still composite (7 x 7) and turns every ace into a pair of sevens.","family":"w2-poker_hand_evaluation-prime-product-shape-ace-prime-entry","id":"FA-81956","implementations":{"attempt":{"sha256":"ec48fa47a33f46654949a9a040d00c98a8e0f1b729c5450e985916cdfbc7ed53","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    P=[2,3,5,7,11,13,17,19,23,29,31,37,49]\n    prod=1\n    for c in x:\n        prod*=P[R.index('T' if c[:-1]=='10' else c[:-1])]\n    exps=[]\n    for p in P:\n        e=0\n        while prod%p==0:\n            prod//=p\n            e+=1\n        if e: exps.append(e)\n    exps.sort(reverse=True)\n    names={(4,1):'four of a kind',(3,2):'full house',(3,1,1):'three of a kind',(2,2,1):'two pair',(2,1,1,1):'one pair',(1,1,1,1,1):'high card'}\n    return names[tuple(exps)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('ace high', ['Ah', 'Kd', '9c', '7s', '4h'], 'high card'),\n  ('pair of aces', ['Ah', 'Ad', '9c', '7s', '4h'], 'one pair'),\n  ('full house', ['Kh', 'Kd', '2c', '2s', '2h'], 'full house'),\n  ('quads', ['9h', '9d', '9c', '9s', '2h'], 'four of a kind'),\n  ('trips deuces', ['2h', '2d', '2c', 'Ks', 'Qh'], 'three of a kind'),\n  ('high card low', ['2h', '3d', '5c', '7s', '9h'], 'high card'),\n  ('pair of deuces', ['2h', '2d', '5c', '7s', '9h'], 'one pair'),\n  ('ten token pair', ['10h', 'Td', '8c', '6s', '4h'], 'one pair')],\n [('ace high', ['Ah', 'Kd', '9c', '7s', '4h'], 'high card'),\n  ('pair of aces', ['Ah', 'Ad', '9c', '7s', '4h'], 'one pair'),\n  ('ace with three', ['Ah', '3d', '9c', '7s', '4h'], 'high card'),\n  ('ace with king', ['Ah', 'Kd', 'Qc', '7s', '4h'], 'high card'),\n  ('high card low', ['2h', '3d', '5c', '7s', '9h'], 'high card'),\n  ('pair of deuces', ['2h', '2d', '5c', '7s', '9h'], 'one pair'),\n  ('ten token pair', ['10h', 'Td', '8c', '6s', '4h'], 'one pair'),\n  ('ten token full house', ['10h', '10d', 'Tc', '6s', '6h'], 'full house')],\n [('ace high', ['Ah', 'Kd', '9c', '7s', '4h'], 'high card'),\n  ('pair of aces', ['Ah', 'Ad', '9c', '7s', '4h'], 'one pair'),\n  ('ace with three', ['Ah', '3d', '9c', '7s', '4h'], 'high card'),\n  ('ace with king', ['Ah', 'Kd', 'Qc', '7s', '4h'], 'high card'),\n  ('ace with seven pair', ['Ah', '7d', '7c', '2s', '4h'], 'one pair'),\n  ('two pair', ['Jh', 'Jd', '4c', '4s', 'Ah'], 'two pair'),\n  ('deuce and ace', ['2h', 'Ad', '8c', '6s', '4h'], 'high card'),\n  ('ten token full house', ['10h', '10d', 'Tc', '6s', '6h'], 'full house')],\n [('ace with three', ['Ah', '3d', '9c', '7s', '4h'], 'high card'),\n  ('ace with king', ['Ah', 'Kd', 'Qc', '7s', '4h'], 'high card'),\n  ('ace with seven pair', ['Ah', '7d', '7c', '2s', '4h'], 'one pair'),\n  ('full house', ['Kh', 'Kd', '2c', '2s', '2h'], 'full house'),\n  ('quads', ['9h', '9d', '9c', '9s', '2h'], 'four of a kind'),\n  ('two pair', ['Jh', 'Jd', '4c', '4s', 'Ah'], 'two pair'),\n  ('deuce and ace', ['2h', 'Ad', '8c', '6s', '4h'], 'high card'),\n  ('ten token with ace', ['10h', 'Ad', '8c', '6s', '4h'], 'high card')],\n [('ace with seven pair', ['Ah', '7d', '7c', '2s', '4h'], 'one pair'),\n  ('full house', ['Kh', 'Kd', '2c', '2s', '2h'], 'full house'),\n  ('quads', ['9h', '9d', '9c', '9s', '2h'], 'four of a kind'),\n  ('two pair', ['Jh', 'Jd', '4c', '4s', 'Ah'], 'two pair'),\n  ('trips deuces', ['2h', '2d', '2c', 'Ks', 'Qh'], 'three of a kind'),\n  ('deuce and ace', ['2h', 'Ad', '8c', '6s', '4h'], 'high card'),\n  ('high card low', ['2h', '3d', '5c', '7s', '9h'], 'high card'),\n  ('ten token with ace', ['10h', 'Ad', '8c', '6s', '4h'], 'high card')]]\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":"309bef81a73e4727af49d7aa47daf6b12671273327b3321c8213bb22446fc24b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    P=[2,3,5,7,11,13,17,19,23,29,31,37,39]\n    prod=1\n    for c in x:\n        prod*=P[R.index('T' if c[:-1]=='10' else c[:-1])]\n    exps=[]\n    for p in P:\n        e=0\n        while prod%p==0:\n            prod//=p\n            e+=1\n        if e: exps.append(e)\n    exps.sort(reverse=True)\n    names={(4,1):'four of a kind',(3,2):'full house',(3,1,1):'three of a kind',(2,2,1):'two pair',(2,1,1,1):'one pair',(1,1,1,1,1):'high card'}\n    return names[tuple(exps)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('ace high', ['Ah', 'Kd', '9c', '7s', '4h'], 'high card'),\n  ('pair of aces', ['Ah', 'Ad', '9c', '7s', '4h'], 'one pair'),\n  ('full house', ['Kh', 'Kd', '2c', '2s', '2h'], 'full house'),\n  ('quads', ['9h', '9d', '9c', '9s', '2h'], 'four of a kind'),\n  ('trips deuces', ['2h', '2d', '2c', 'Ks', 'Qh'], 'three of a kind'),\n  ('high card low', ['2h', '3d', '5c', '7s', '9h'], 'high card'),\n  ('pair of deuces', ['2h', '2d', '5c', '7s', '9h'], 'one pair'),\n  ('ten token pair', ['10h', 'Td', '8c', '6s', '4h'], 'one pair')],\n [('ace high', ['Ah', 'Kd', '9c', '7s', '4h'], 'high card'),\n  ('pair of aces', ['Ah', 'Ad', '9c', '7s', '4h'], 'one pair'),\n  ('ace with three', ['Ah', '3d', '9c', '7s', '4h'], 'high card'),\n  ('ace with king', ['Ah', 'Kd', 'Qc', '7s', '4h'], 'high card'),\n  ('high card low', ['2h', '3d', '5c', '7s', '9h'], 'high card'),\n  ('pair of deuces', ['2h', '2d', '5c', '7s', '9h'], 'one pair'),\n  ('ten token pair', ['10h', 'Td', '8c', '6s', '4h'], 'one pair'),\n  ('ten token full house', ['10h', '10d', 'Tc', '6s', '6h'], 'full house')],\n [('ace high', ['Ah', 'Kd', '9c', '7s', '4h'], 'high card'),\n  ('pair of aces', ['Ah', 'Ad', '9c', '7s', '4h'], 'one pair'),\n  ('ace with three', ['Ah', '3d', '9c', '7s', '4h'], 'high card'),\n  ('ace with king', ['Ah', 'Kd', 'Qc', '7s', '4h'], 'high card'),\n  ('ace with seven pair', ['Ah', '7d', '7c', '2s', '4h'], 'one pair'),\n  ('two pair', ['Jh', 'Jd', '4c', '4s', 'Ah'], 'two pair'),\n  ('deuce and ace', ['2h', 'Ad', '8c', '6s', '4h'], 'high card'),\n  ('ten token full house', ['10h', '10d', 'Tc', '6s', '6h'], 'full house')],\n [('ace with three', ['Ah', '3d', '9c', '7s', '4h'], 'high card'),\n  ('ace with king', ['Ah', 'Kd', 'Qc', '7s', '4h'], 'high card'),\n  ('ace with seven pair', ['Ah', '7d', '7c', '2s', '4h'], 'one pair'),\n  ('full house', ['Kh', 'Kd', '2c', '2s', '2h'], 'full house'),\n  ('quads', ['9h', '9d', '9c', '9s', '2h'], 'four of a kind'),\n  ('two pair', ['Jh', 'Jd', '4c', '4s', 'Ah'], 'two pair'),\n  ('deuce and ace', ['2h', 'Ad', '8c', '6s', '4h'], 'high card'),\n  ('ten token with ace', ['10h', 'Ad', '8c', '6s', '4h'], 'high card')],\n [('ace with seven pair', ['Ah', '7d', '7c', '2s', '4h'], 'one pair'),\n  ('full house', ['Kh', 'Kd', '2c', '2s', '2h'], 'full house'),\n  ('quads', ['9h', '9d', '9c', '9s', '2h'], 'four of a kind'),\n  ('two pair', ['Jh', 'Jd', '4c', '4s', 'Ah'], 'two pair'),\n  ('trips deuces', ['2h', '2d', '2c', 'Ks', 'Qh'], 'three of a kind'),\n  ('deuce and ace', ['2h', 'Ad', '8c', '6s', '4h'], 'high card'),\n  ('high card low', ['2h', '3d', '5c', '7s', '9h'], 'high card'),\n  ('ten token with ace', ['10h', 'Ad', '8c', '6s', '4h'], 'high card')]]\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":"1a9d6ae9fb02a94bc760c748f321c814a73b20fd0052e132715ce3242785cb9c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    P=[2,3,5,7,11,13,17,19,23,29,31,37,41]\n    prod=1\n    for c in x:\n        prod*=P[R.index('T' if c[:-1]=='10' else c[:-1])]\n    exps=[]\n    for p in P:\n        e=0\n        while prod%p==0:\n            prod//=p\n            e+=1\n        if e: exps.append(e)\n    exps.sort(reverse=True)\n    names={(4,1):'four of a kind',(3,2):'full house',(3,1,1):'three of a kind',(2,2,1):'two pair',(2,1,1,1):'one pair',(1,1,1,1,1):'high card'}\n    return names[tuple(exps)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('ace high', ['Ah', 'Kd', '9c', '7s', '4h'], 'high card'),\n  ('pair of aces', ['Ah', 'Ad', '9c', '7s', '4h'], 'one pair'),\n  ('full house', ['Kh', 'Kd', '2c', '2s', '2h'], 'full house'),\n  ('quads', ['9h', '9d', '9c', '9s', '2h'], 'four of a kind'),\n  ('trips deuces', ['2h', '2d', '2c', 'Ks', 'Qh'], 'three of a kind'),\n  ('high card low', ['2h', '3d', '5c', '7s', '9h'], 'high card'),\n  ('pair of deuces', ['2h', '2d', '5c', '7s', '9h'], 'one pair'),\n  ('ten token pair', ['10h', 'Td', '8c', '6s', '4h'], 'one pair')],\n [('ace high', ['Ah', 'Kd', '9c', '7s', '4h'], 'high card'),\n  ('pair of aces', ['Ah', 'Ad', '9c', '7s', '4h'], 'one pair'),\n  ('ace with three', ['Ah', '3d', '9c', '7s', '4h'], 'high card'),\n  ('ace with king', ['Ah', 'Kd', 'Qc', '7s', '4h'], 'high card'),\n  ('high card low', ['2h', '3d', '5c', '7s', '9h'], 'high card'),\n  ('pair of deuces', ['2h', '2d', '5c', '7s', '9h'], 'one pair'),\n  ('ten token pair', ['10h', 'Td', '8c', '6s', '4h'], 'one pair'),\n  ('ten token full house', ['10h', '10d', 'Tc', '6s', '6h'], 'full house')],\n [('ace high', ['Ah', 'Kd', '9c', '7s', '4h'], 'high card'),\n  ('pair of aces', ['Ah', 'Ad', '9c', '7s', '4h'], 'one pair'),\n  ('ace with three', ['Ah', '3d', '9c', '7s', '4h'], 'high card'),\n  ('ace with king', ['Ah', 'Kd', 'Qc', '7s', '4h'], 'high card'),\n  ('ace with seven pair', ['Ah', '7d', '7c', '2s', '4h'], 'one pair'),\n  ('two pair', ['Jh', 'Jd', '4c', '4s', 'Ah'], 'two pair'),\n  ('deuce and ace', ['2h', 'Ad', '8c', '6s', '4h'], 'high card'),\n  ('ten token full house', ['10h', '10d', 'Tc', '6s', '6h'], 'full house')],\n [('ace with three', ['Ah', '3d', '9c', '7s', '4h'], 'high card'),\n  ('ace with king', ['Ah', 'Kd', 'Qc', '7s', '4h'], 'high card'),\n  ('ace with seven pair', ['Ah', '7d', '7c', '2s', '4h'], 'one pair'),\n  ('full house', ['Kh', 'Kd', '2c', '2s', '2h'], 'full house'),\n  ('quads', ['9h', '9d', '9c', '9s', '2h'], 'four of a kind'),\n  ('two pair', ['Jh', 'Jd', '4c', '4s', 'Ah'], 'two pair'),\n  ('deuce and ace', ['2h', 'Ad', '8c', '6s', '4h'], 'high card'),\n  ('ten token with ace', ['10h', 'Ad', '8c', '6s', '4h'], 'high card')],\n [('ace with seven pair', ['Ah', '7d', '7c', '2s', '4h'], 'one pair'),\n  ('full house', ['Kh', 'Kd', '2c', '2s', '2h'], 'full house'),\n  ('quads', ['9h', '9d', '9c', '9s', '2h'], 'four of a kind'),\n  ('two pair', ['Jh', 'Jd', '4c', '4s', 'Ah'], 'two pair'),\n  ('trips deuces', ['2h', '2d', '2c', 'Ks', 'Qh'], 'three of a kind'),\n  ('deuce and ace', ['2h', 'Ad', '8c', '6s', '4h'], 'high card'),\n  ('high card low', ['2h', '3d', '5c', '7s', '9h'], 'high card'),\n  ('ten token with ace', ['10h', 'Ad', '8c', '6s', '4h'], 'high card')]]\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\", \"10h\"); 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-prime-product-shape-ace-prime-entry","generated_at":"2026-09-29T14:50:07.659032+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Prime-product hashing is how table-driven evaluators identify non-flush rank multisets.","repair":"Use a table of thirteen distinct primes; the ace is 41.","root_cause":"The ace entry of the prime table is 39 = 3 x 13, so an ace factors into the trey prime and the seven prime.","sha256":"5942fadd1517ce5cc64045755734b80636e34d791febf7d7984e04ece7f83458","title":"Composite prime table entry fakes a pair · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.632,"exit_code":1,"observations":[{"actual":"error:KeyError","check":"ace high","expected":"high card","passed":false},{"actual":"error:KeyError","check":"pair of aces","expected":"one pair","passed":false},{"actual":"full house","check":"full house","expected":"full house","passed":true},{"actual":"four of a kind","check":"quads","expected":"four of a kind","passed":true},{"actual":"three of a kind","check":"trips deuces","expected":"three of a kind","passed":true},{"actual":"high card","check":"high card low","expected":"high card","passed":true},{"actual":"one pair","check":"pair of deuces","expected":"one pair","passed":true},{"actual":"one pair","check":"ten token pair","expected":"one pair","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ace high\", \"actual\": \"error:KeyError\", \"expected\": \"high card\", \"passed\": false}, {\"check\": \"pair of aces\", \"actual\": \"error:KeyError\", \"expected\": \"one pair\", \"passed\": false}, {\"check\": \"full house\", \"actual\": \"full house\", \"expected\": \"full house\", \"passed\": true}, {\"check\": \"quads\", \"actual\": \"four of a kind\", \"expected\": \"four of a kind\", \"passed\": true}, {\"check\": \"trips deuces\", \"actual\": \"three of a kind\", \"expected\": \"three of a kind\", \"passed\": true}, {\"check\": \"high card low\", \"actual\": \"high card\", \"expected\": \"high card\", \"passed\": true}, {\"check\": \"pair of deuces\", \"actual\": \"one pair\", \"expected\": \"one pair\", \"passed\": true}, {\"check\": \"ten token pair\", \"actual\": \"one pair\", \"expected\": \"one pair\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.1,"exit_code":1,"observations":[{"actual":"error:KeyError","check":"ace high","expected":"high card","passed":false},{"actual":"error:KeyError","check":"pair of aces","expected":"one pair","passed":false},{"actual":"full house","check":"full house","expected":"full house","passed":true},{"actual":"four of a kind","check":"quads","expected":"four of a kind","passed":true},{"actual":"three of a kind","check":"trips deuces","expected":"three of a kind","passed":true},{"actual":"high card","check":"high card low","expected":"high card","passed":true},{"actual":"one pair","check":"pair of deuces","expected":"one pair","passed":true},{"actual":"one pair","check":"ten token pair","expected":"one pair","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ace high\", \"actual\": \"error:KeyError\", \"expected\": \"high card\", \"passed\": false}, {\"check\": \"pair of aces\", \"actual\": \"error:KeyError\", \"expected\": \"one pair\", \"passed\": false}, {\"check\": \"full house\", \"actual\": \"full house\", \"expected\": \"full house\", \"passed\": true}, {\"check\": \"quads\", \"actual\": \"four of a kind\", \"expected\": \"four of a kind\", \"passed\": true}, {\"check\": \"trips deuces\", \"actual\": \"three of a kind\", \"expected\": \"three of a kind\", \"passed\": true}, {\"check\": \"high card low\", \"actual\": \"high card\", \"expected\": \"high card\", \"passed\": true}, {\"check\": \"pair of deuces\", \"actual\": \"one pair\", \"expected\": \"one pair\", \"passed\": true}, {\"check\": \"ten token pair\", \"actual\": \"one pair\", \"expected\": \"one pair\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.324,"exit_code":0,"observations":[{"actual":"high card","check":"ace high","expected":"high card","passed":true},{"actual":"one pair","check":"pair of aces","expected":"one pair","passed":true},{"actual":"full house","check":"full house","expected":"full house","passed":true},{"actual":"four of a kind","check":"quads","expected":"four of a kind","passed":true},{"actual":"three of a kind","check":"trips deuces","expected":"three of a kind","passed":true},{"actual":"high card","check":"high card low","expected":"high card","passed":true},{"actual":"one pair","check":"pair of deuces","expected":"one pair","passed":true},{"actual":"one pair","check":"ten token pair","expected":"one pair","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ace high\", \"actual\": \"high card\", \"expected\": \"high card\", \"passed\": true}, {\"check\": \"pair of aces\", \"actual\": \"one pair\", \"expected\": \"one pair\", \"passed\": true}, {\"check\": \"full house\", \"actual\": \"full house\", \"expected\": \"full house\", \"passed\": true}, {\"check\": \"quads\", \"actual\": \"four of a kind\", \"expected\": \"four of a kind\", \"passed\": true}, {\"check\": \"trips deuces\", \"actual\": \"three of a kind\", \"expected\": \"three of a kind\", \"passed\": true}, {\"check\": \"high card low\", \"actual\": \"high card\", \"expected\": \"high card\", \"passed\": true}, {\"check\": \"pair of deuces\", \"actual\": \"one pair\", \"expected\": \"one pair\", \"passed\": true}, {\"check\": \"ten token pair\", \"actual\": \"one pair\", \"expected\": \"one pair\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}