{"abstract":"Pocket queens are written \"QQo\" and do not match range keys.","category":"Poker hand evaluation","checks":8,"contract":"Input: two hole cards as strings (rank may be \"10\"; rank and suit case-insensitive). Return canonical hold'em notation: pairs \"QQ\", otherwise higher rank first with \"s\" for suited or \"o\" for offsuit (e.g. \"AKs\", \"T9o\"). Return \"invalid\" for duplicate cards or unknown ranks.","contract_signature":"x","evaluation_group":"w2-poker_hand_evaluation-starting-hand-notation","failed_approach":"Testing whole card strings for the pair branch never matches, so pairs fall through and get a marker.","family":"w2-poker_hand_evaluation-starting-hand-notation-pair-branch","id":"FA-82106","implementations":{"attempt":{"sha256":"c40d6ea631f7011b61f7e0518077faa39f4fab4e71e149c3ee6eb6fe60a84599","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    if len(x)!=2 or x[0].upper()==x[1].upper(): return 'invalid'\n    def rank(c):\n        t=c[:-1].upper()\n        return 'T' if t=='10' else t\n    a,b=rank(x[0]),rank(x[1])\n    if a not in list(R) or b not in list(R): return 'invalid'\n    if x[0]==x[1]: return a+b\n    hi,lo=sorted([a,b], key=R.index, reverse=True)\n    return hi+lo+('s' if x[0][-1].lower()==x[1][-1].lower() else 'o')\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('ace king suited', ['Ah', 'Kh'], 'AKs'), ('king ace offsuit order', ['Kd', 'Ah'], 'AKo'),\n  ('ten nine suited with 10', ['10s', '9s'], 'T9s'), ('nine ten mixed', ['9c', '10d'], 'T9o'),\n  ('pair of queens', ['Qh', 'Qs'], 'QQ'), ('duplicate card case', ['Ah', 'aH'], 'invalid'),\n  ('exact duplicate', ['7c', '7c'], 'invalid'),\n  ('pair of tens mixed tokens', ['10h', 'Td'], 'TT')],\n [('nine ten mixed', ['9c', '10d'], 'T9o'), ('pair of queens', ['Qh', 'Qs'], 'QQ'),\n  ('duplicate card case', ['Ah', 'aH'], 'invalid'), ('exact duplicate', ['7c', '7c'], 'invalid'),\n  ('queen ten', ['Tc', 'Qc'], 'QTs'), ('lower case ranks', ['kd', 'js'], 'KJo'),\n  ('suit case differs', ['Jh', 'TH'], 'JTs'), ('pair of tens mixed tokens', ['10h', 'Td'], 'TT')],\n [('pair of queens', ['Qh', 'Qs'], 'QQ'), ('queen ten', ['Tc', 'Qc'], 'QTs'),\n  ('lower case ranks', ['kd', 'js'], 'KJo'), ('suit case differs', ['Jh', 'TH'], 'JTs'),\n  ('empty rank', ['h', 'Kd'], 'invalid'), ('two-letter rank', ['KQh', '2d'], 'invalid'),\n  ('ten first suited', ['10h', 'Jh'], 'JTs'), ('pair of tens mixed tokens', ['10h', 'Td'], 'TT')],\n [('ace king suited', ['Ah', 'Kh'], 'AKs'), ('king ace offsuit order', ['Kd', 'Ah'], 'AKo'),\n  ('pair of queens', ['Qh', 'Qs'], 'QQ'), ('empty rank', ['h', 'Kd'], 'invalid'),\n  ('two-letter rank', ['KQh', '2d'], 'invalid'), ('ten first suited', ['10h', 'Jh'], 'JTs'),\n  ('deuce seven', ['2d', '7s'], '72o'), ('pair of tens mixed tokens', ['10h', 'Td'], 'TT')],\n [('ace king suited', ['Ah', 'Kh'], 'AKs'), ('king ace offsuit order', ['Kd', 'Ah'], 'AKo'),\n  ('ten nine suited with 10', ['10s', '9s'], 'T9s'), ('nine ten mixed', ['9c', '10d'], 'T9o'),\n  ('pair of queens', ['Qh', 'Qs'], 'QQ'), ('duplicate card case', ['Ah', 'aH'], 'invalid'),\n  ('deuce seven', ['2d', '7s'], '72o'), ('pair of tens mixed tokens', ['10h', 'Td'], 'TT')]]\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":"a43a672bb7a9f349b56b7202048bf672826cf03720079333671fc184812afd22","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    R='23456789TJQKA'\n    if len(x)!=2 or x[0].upper()==x[1].upper(): return 'invalid'\n    def rank(c):\n        t=c[:-1].upper()\n        return 'T' if t=='10' else t\n    a,b=rank(x[0]),rank(x[1])\n    if a not in list(R) or b not in list(R): return 'invalid'\n    if a==b: return a+b+'o'\n    hi,lo=sorted([a,b], key=R.index, reverse=True)\n    return hi+lo+('s' if x[0][-1].lower()==x[1][-1].lower() else 'o')\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('ace king suited', ['Ah', 'Kh'], 'AKs'), ('king ace offsuit order', ['Kd', 'Ah'], 'AKo'),\n  ('ten nine suited with 10', ['10s', '9s'], 'T9s'), ('nine ten mixed', ['9c', '10d'], 'T9o'),\n  ('pair of queens', ['Qh', 'Qs'], 'QQ'), ('duplicate card case', ['Ah', 'aH'], 'invalid'),\n  ('exact duplicate', ['7c', '7c'], 'invalid'),\n  ('pair of tens mixed tokens', ['10h', 'Td'], 'TT')],\n [('nine ten mixed', ['9c', '10d'], 'T9o'), ('pair of queens', ['Qh', 'Qs'], 'QQ'),\n  ('duplicate card case', ['Ah', 'aH'], 'invalid'), ('exact duplicate', ['7c', '7c'], 'invalid'),\n  ('queen ten', ['Tc', 'Qc'], 'QTs'), ('lower case ranks', ['kd', 'js'], 'KJo'),\n  ('suit case differs', ['Jh', 'TH'], 'JTs'), ('pair of tens mixed tokens', ['10h', 'Td'], 'TT')],\n [('pair of queens', ['Qh', 'Qs'], 'QQ'), ('queen ten', ['Tc', 'Qc'], 'QTs'),\n  ('lower case ranks', ['kd', 'js'], 'KJo'), ('suit case differs', ['Jh', 'TH'], 'JTs'),\n  ('empty rank', ['h', 'Kd'], 'invalid'), ('two-letter rank', ['KQh', '2d'], 'invalid'),\n  ('ten first suited', ['10h', 'Jh'], 'JTs'), ('pair of tens mixed tokens', ['10h', 'Td'], 'TT')],\n [('ace king suited', ['Ah', 'Kh'], 'AKs'), ('king ace offsuit order', ['Kd', 'Ah'], 'AKo'),\n  ('pair of queens', ['Qh', 'Qs'], 'QQ'), ('empty rank', ['h', 'Kd'], 'invalid'),\n  ('two-letter rank', ['KQh', '2d'], 'invalid'), ('ten first suited', ['10h', 'Jh'], 'JTs'),\n  ('deuce seven', ['2d', '7s'], '72o'), ('pair of tens mixed tokens', ['10h', 'Td'], 'TT')],\n [('ace king suited', ['Ah', 'Kh'], 'AKs'), ('king ace offsuit order', ['Kd', 'Ah'], 'AKo'),\n  ('ten nine suited with 10', ['10s', '9s'], 'T9s'), ('nine ten mixed', ['9c', '10d'], 'T9o'),\n  ('pair of queens', ['Qh', 'Qs'], 'QQ'), ('duplicate card case', ['Ah', 'aH'], 'invalid'),\n  ('deuce seven', ['2d', '7s'], '72o'), ('pair of tens mixed tokens', ['10h', 'Td'], 'TT')]]\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-starting-hand-notation-pair-branch","generated_at":"2026-09-29T14:50:08.922991+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Range tools, solvers and hand histories key statistics on this notation.","root_cause":"The pair branch appends a suitedness marker although pairs are always written without one.","sha256":"c3e3c39090191bdde71ba0e1484cc70b3249e3b525e9c76e2b3c1ee350c4e9e0","title":"Pocket pairs carry an offsuit marker · 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":41.456,"exit_code":1,"observations":[{"actual":"AKs","check":"ace king suited","expected":"AKs","passed":true},{"actual":"AKo","check":"king ace offsuit order","expected":"AKo","passed":true},{"actual":"T9s","check":"ten nine suited with 10","expected":"T9s","passed":true},{"actual":"T9o","check":"nine ten mixed","expected":"T9o","passed":true},{"actual":"QQo","check":"pair of queens","expected":"QQ","passed":false},{"actual":"invalid","check":"duplicate card case","expected":"invalid","passed":true},{"actual":"invalid","check":"exact duplicate","expected":"invalid","passed":true},{"actual":"TTo","check":"pair of tens mixed tokens","expected":"TT","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ace king suited\", \"actual\": \"AKs\", \"expected\": \"AKs\", \"passed\": true}, {\"check\": \"king ace offsuit order\", \"actual\": \"AKo\", \"expected\": \"AKo\", \"passed\": true}, {\"check\": \"ten nine suited with 10\", \"actual\": \"T9s\", \"expected\": \"T9s\", \"passed\": true}, {\"check\": \"nine ten mixed\", \"actual\": \"T9o\", \"expected\": \"T9o\", \"passed\": true}, {\"check\": \"pair of queens\", \"actual\": \"QQo\", \"expected\": \"QQ\", \"passed\": false}, {\"check\": \"duplicate card case\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"exact duplicate\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"pair of tens mixed tokens\", \"actual\": \"TTo\", \"expected\": \"TT\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.326,"exit_code":1,"observations":[{"actual":"AKs","check":"ace king suited","expected":"AKs","passed":true},{"actual":"AKo","check":"king ace offsuit order","expected":"AKo","passed":true},{"actual":"T9s","check":"ten nine suited with 10","expected":"T9s","passed":true},{"actual":"T9o","check":"nine ten mixed","expected":"T9o","passed":true},{"actual":"QQo","check":"pair of queens","expected":"QQ","passed":false},{"actual":"invalid","check":"duplicate card case","expected":"invalid","passed":true},{"actual":"invalid","check":"exact duplicate","expected":"invalid","passed":true},{"actual":"TTo","check":"pair of tens mixed tokens","expected":"TT","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ace king suited\", \"actual\": \"AKs\", \"expected\": \"AKs\", \"passed\": true}, {\"check\": \"king ace offsuit order\", \"actual\": \"AKo\", \"expected\": \"AKo\", \"passed\": true}, {\"check\": \"ten nine suited with 10\", \"actual\": \"T9s\", \"expected\": \"T9s\", \"passed\": true}, {\"check\": \"nine ten mixed\", \"actual\": \"T9o\", \"expected\": \"T9o\", \"passed\": true}, {\"check\": \"pair of queens\", \"actual\": \"QQo\", \"expected\": \"QQ\", \"passed\": false}, {\"check\": \"duplicate card case\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"exact duplicate\", \"actual\": \"invalid\", \"expected\": \"invalid\", \"passed\": true}, {\"check\": \"pair of tens mixed tokens\", \"actual\": \"TTo\", \"expected\": \"TT\", \"passed\": false}], \"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."}}