{"abstract":"The dealer keeps drawing on 17 and busts more often.","category":"Card game rule engines","checks":8,"contract":"Input [dealer_cards, shoe, rule]. Dealer draws from the front of the shoe while total < 17, and under H17 also on soft 17; aces count 11 when that does not bust. Stop if the shoe runs out. Return [final_cards, total].","contract_signature":"x","evaluation_group":"w2-card-game-rule-engines-dealer-draw","failed_approach":"Refusing to hit any soft total below 17 leaves the dealer standing on hands like A-2.","family":"w2-card-game-rule-engines-dealer-draw-standing-threshold","id":"FA-83396","implementations":{"attempt":{"sha256":"24cec09c4c0e09e7346e81be080770b5791958a0114f8dc78ce66a03e2c4953b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    cards, shoe, rule = x\n    hand = list(cards)\n    pos = 0\n    def value(h):\n        t = 0\n        a = 0\n        for c in h:\n            if c[0] == 'A':\n                a += 1\n                t += 1\n            elif c[0] in 'TJQK':\n                t += 10\n            else:\n                t += int(c[0])\n        soft = a > 0 and t + 10 <= 21\n        return (t + 10 if soft else t), soft\n    while True:\n        t, soft = value(hand)\n        if t < 17 and not soft or (t == 17 and soft and rule == 'H17'):\n            if pos >= len(shoe):\n                break\n            hand.append(shoe[pos])\n            pos += 1\n        else:\n            break\n    t, soft = value(hand)\n    return [hand, t]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[['JH', '5D'], ['7D', 'KH', '2H', '6D', 'QS', 'KS'], 'H17'], [['JH', '5D', '7D'], 22]], [[['KS', '7S'], ['TC', 'JH', 'AD', '3D', 'KC', 'QD'], 'H17'], [['KS', '7S'], 17]], [[['QS', 'JS'], ['6H', '6D', '3C', '3S', '9D', 'QD'], 'S17'], [['QS', 'JS'], 20]], [[['3H', '7D'], ['3S', '9S', '4D', '2H', '6C', '9H'], 'S17'], [['3H', '7D', '3S', '9S'], 22]], [[['3C', '2D'], ['QS', 'QH', '2C', '8D', 'KC', 'JC'], 'S17'], [['3C', '2D', 'QS', 'QH'], 25]], [[['TC', '6H'], ['TH', '5C', '2D', '7S', '2S', '3S'], 'H17'], [['TC', '6H', 'TH'], 26]], [[['JD', 'TD'], ['2D', '5S', '8D', '6D', 'QH', '6S'], 'H17'], [['JD', 'TD'], 20]], [[['AS', 'AH'], ['4C', 'AD', '9C'], 'H17'], [['AS', 'AH', '4C', 'AD', '9C'], 16]]], [[[['KS', '2D'], ['7D', '7H', '8S', '4H', '8H', 'KC'], 'S17'], [['KS', '2D', '7D'], 19]], [[['TH', '8S'], ['QC', 'QS', 'KH', 'JH', '3D', 'QH'], 'S17'], [['TH', '8S'], 18]], [[['8C', 'QS'], ['AS', 'KC', '5C', '6C', '9S', '6S'], 'S17'], [['8C', 'QS'], 18]], [[['TC', '7H'], ['2S', '8C', 'JC', '7S', '2H', '8H'], 'H17'], [['TC', '7H'], 17]], [[['2C', 'QS'], ['QD', '7D', '9D', '7C', 'KH', 'AS'], 'S17'], [['2C', 'QS', 'QD'], 22]], [[['KC', '9C'], ['2H', 'JD', '2C', 'KS', 'AC', '7C'], 'S17'], [['KC', '9C'], 19]], [[['8D', '4H'], ['5H', '2S', 'TS', 'QH', 'TD', '9H'], 'H17'], [['8D', '4H', '5H'], 17]], [[['AS', 'AD'], ['5C', '9D', '5S', '3H'], 'S17'], [['AS', 'AD', '5C'], 17]]], [[[['7S', 'AS'], ['8S', 'JC', '6S', '6C', '8H', '3D'], 'H17'], [['7S', 'AS'], 18]], [[['JS', 'QC'], ['AH', '4S', '6C', 'TS', '5D', 'QD'], 'S17'], [['JS', 'QC'], 20]], [[['5C', '7S'], ['4C', 'KH', '9H', 'QC', 'KD', '3D'], 'H17'], [['5C', '7S', '4C', 'KH'], 26]], [[['JD', '7S'], ['7D', 'KH', '5D', '9H', '4D', '3H'], 'S17'], [['JD', '7S'], 17]], [[['KC', 'QH'], ['5H', 'JS', '9S', '6H', '5D', '3C'], 'H17'], [['KC', 'QH'], 20]], [[['TH', '5S'], ['7H', 'JD', '4C', '6D', '7D', 'QC'], 'H17'], [['TH', '5S', '7H'], 22]], [[['3C', 'TD'], ['4S', '4C', '6S', '6D', '4H', '2S'], 'S17'], [['3C', 'TD', '4S'], 17]], [[['AH', 'AD'], ['9H', '7D', '7C', 'TC', '2D', '9C'], 'H17'], [['AH', 'AD', '9H'], 21]]], [[[['9H', '7D'], ['QD', '8C', '6D', 'AD', 'JD', 'AS'], 'H17'], [['9H', '7D', 'QD'], 26]], [[['8D', '4H'], ['5H', '2S', 'TS', 'QH', 'TD', '9H'], 'H17'], [['8D', '4H', '5H'], 17]], [[['2D', 'KC'], ['9D', 'AD', 'QC', 'TD', '6C', 'TC'], 'S17'], [['2D', 'KC', '9D'], 21]], [[['5D', '3S'], ['JC', '7S', '4S', '6H', '2D', 'KC'], 'H17'], [['5D', '3S', 'JC'], 18]], [[['8C', 'JS'], ['2C', '2S', '9C', '3C', '4D', 'TH'], 'S17'], [['8C', 'JS'], 18]], [[['5C', 'QD'], ['2H', 'TD', 'TC', '8C', '2C', 'QS'], 'H17'], [['5C', 'QD', '2H'], 17]], [[['KD', '7S'], ['JH', 'TC', '3D', 'JD', 'KC', '2S'], 'S17'], [['KD', '7S'], 17]], [[['3D', 'AS'], ['7D', 'KS', 'JH', 'TC', 'TD', '4S'], 'S17'], [['3D', 'AS', '7D'], 21]]], [[[['3C', 'TD'], ['4S', '4C', '6S', '6D', '4H', '2S'], 'S17'], [['3C', 'TD', '4S'], 17]], [[['QS', 'JS'], ['8H', '2C', '6H', '5C', 'AH', 'QH'], 'S17'], [['QS', 'JS'], 20]], [[['2C', '9D'], ['7H', '2S', '3S', '4H', '2D', '4S'], 'H17'], [['2C', '9D', '7H'], 18]], [[['3S', '9D'], ['2D', 'KC', '3D', 'TD', 'AS', 'TH'], 'S17'], [['3S', '9D', '2D', 'KC'], 24]], [[['4D', '7S'], ['3S', '8S', '8D', 'QC', 'AH', 'JC'], 'S17'], [['4D', '7S', '3S', '8S'], 22]], [[['7C', '6S'], ['5S', '7D', '9H', '3C', '4S', 'JH'], 'H17'], [['7C', '6S', '5S'], 18]], [[['7D', '3D'], ['6D', 'AC', '8D', '2C', '4H', '2D'], 'S17'], [['7D', '3D', '6D', 'AC'], 17]], [[['5S', 'AH'], ['AC', '4D', '2C'], 'H17'], [['5S', 'AH', 'AC', '4D'], 21]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"dealer hand case %d\" % i, solve(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":"280cf4f4497dbba9d91fe36986e34af7bceac3abdf6bb4aebabb9f31bccabdeb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    cards, shoe, rule = x\n    hand = list(cards)\n    pos = 0\n    def value(h):\n        t = 0\n        a = 0\n        for c in h:\n            if c[0] == 'A':\n                a += 1\n                t += 1\n            elif c[0] in 'TJQK':\n                t += 10\n            else:\n                t += int(c[0])\n        soft = a > 0 and t + 10 <= 21\n        return (t + 10 if soft else t), soft\n    while True:\n        t, soft = value(hand)\n        if t <= 17 or (t == 17 and soft and rule == 'H17'):\n            if pos >= len(shoe):\n                break\n            hand.append(shoe[pos])\n            pos += 1\n        else:\n            break\n    t, soft = value(hand)\n    return [hand, t]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[['JH', '5D'], ['7D', 'KH', '2H', '6D', 'QS', 'KS'], 'H17'], [['JH', '5D', '7D'], 22]], [[['KS', '7S'], ['TC', 'JH', 'AD', '3D', 'KC', 'QD'], 'H17'], [['KS', '7S'], 17]], [[['QS', 'JS'], ['6H', '6D', '3C', '3S', '9D', 'QD'], 'S17'], [['QS', 'JS'], 20]], [[['3H', '7D'], ['3S', '9S', '4D', '2H', '6C', '9H'], 'S17'], [['3H', '7D', '3S', '9S'], 22]], [[['3C', '2D'], ['QS', 'QH', '2C', '8D', 'KC', 'JC'], 'S17'], [['3C', '2D', 'QS', 'QH'], 25]], [[['TC', '6H'], ['TH', '5C', '2D', '7S', '2S', '3S'], 'H17'], [['TC', '6H', 'TH'], 26]], [[['JD', 'TD'], ['2D', '5S', '8D', '6D', 'QH', '6S'], 'H17'], [['JD', 'TD'], 20]], [[['AS', 'AH'], ['4C', 'AD', '9C'], 'H17'], [['AS', 'AH', '4C', 'AD', '9C'], 16]]], [[[['KS', '2D'], ['7D', '7H', '8S', '4H', '8H', 'KC'], 'S17'], [['KS', '2D', '7D'], 19]], [[['TH', '8S'], ['QC', 'QS', 'KH', 'JH', '3D', 'QH'], 'S17'], [['TH', '8S'], 18]], [[['8C', 'QS'], ['AS', 'KC', '5C', '6C', '9S', '6S'], 'S17'], [['8C', 'QS'], 18]], [[['TC', '7H'], ['2S', '8C', 'JC', '7S', '2H', '8H'], 'H17'], [['TC', '7H'], 17]], [[['2C', 'QS'], ['QD', '7D', '9D', '7C', 'KH', 'AS'], 'S17'], [['2C', 'QS', 'QD'], 22]], [[['KC', '9C'], ['2H', 'JD', '2C', 'KS', 'AC', '7C'], 'S17'], [['KC', '9C'], 19]], [[['8D', '4H'], ['5H', '2S', 'TS', 'QH', 'TD', '9H'], 'H17'], [['8D', '4H', '5H'], 17]], [[['AS', 'AD'], ['5C', '9D', '5S', '3H'], 'S17'], [['AS', 'AD', '5C'], 17]]], [[[['7S', 'AS'], ['8S', 'JC', '6S', '6C', '8H', '3D'], 'H17'], [['7S', 'AS'], 18]], [[['JS', 'QC'], ['AH', '4S', '6C', 'TS', '5D', 'QD'], 'S17'], [['JS', 'QC'], 20]], [[['5C', '7S'], ['4C', 'KH', '9H', 'QC', 'KD', '3D'], 'H17'], [['5C', '7S', '4C', 'KH'], 26]], [[['JD', '7S'], ['7D', 'KH', '5D', '9H', '4D', '3H'], 'S17'], [['JD', '7S'], 17]], [[['KC', 'QH'], ['5H', 'JS', '9S', '6H', '5D', '3C'], 'H17'], [['KC', 'QH'], 20]], [[['TH', '5S'], ['7H', 'JD', '4C', '6D', '7D', 'QC'], 'H17'], [['TH', '5S', '7H'], 22]], [[['3C', 'TD'], ['4S', '4C', '6S', '6D', '4H', '2S'], 'S17'], [['3C', 'TD', '4S'], 17]], [[['AH', 'AD'], ['9H', '7D', '7C', 'TC', '2D', '9C'], 'H17'], [['AH', 'AD', '9H'], 21]]], [[[['9H', '7D'], ['QD', '8C', '6D', 'AD', 'JD', 'AS'], 'H17'], [['9H', '7D', 'QD'], 26]], [[['8D', '4H'], ['5H', '2S', 'TS', 'QH', 'TD', '9H'], 'H17'], [['8D', '4H', '5H'], 17]], [[['2D', 'KC'], ['9D', 'AD', 'QC', 'TD', '6C', 'TC'], 'S17'], [['2D', 'KC', '9D'], 21]], [[['5D', '3S'], ['JC', '7S', '4S', '6H', '2D', 'KC'], 'H17'], [['5D', '3S', 'JC'], 18]], [[['8C', 'JS'], ['2C', '2S', '9C', '3C', '4D', 'TH'], 'S17'], [['8C', 'JS'], 18]], [[['5C', 'QD'], ['2H', 'TD', 'TC', '8C', '2C', 'QS'], 'H17'], [['5C', 'QD', '2H'], 17]], [[['KD', '7S'], ['JH', 'TC', '3D', 'JD', 'KC', '2S'], 'S17'], [['KD', '7S'], 17]], [[['3D', 'AS'], ['7D', 'KS', 'JH', 'TC', 'TD', '4S'], 'S17'], [['3D', 'AS', '7D'], 21]]], [[[['3C', 'TD'], ['4S', '4C', '6S', '6D', '4H', '2S'], 'S17'], [['3C', 'TD', '4S'], 17]], [[['QS', 'JS'], ['8H', '2C', '6H', '5C', 'AH', 'QH'], 'S17'], [['QS', 'JS'], 20]], [[['2C', '9D'], ['7H', '2S', '3S', '4H', '2D', '4S'], 'H17'], [['2C', '9D', '7H'], 18]], [[['3S', '9D'], ['2D', 'KC', '3D', 'TD', 'AS', 'TH'], 'S17'], [['3S', '9D', '2D', 'KC'], 24]], [[['4D', '7S'], ['3S', '8S', '8D', 'QC', 'AH', 'JC'], 'S17'], [['4D', '7S', '3S', '8S'], 22]], [[['7C', '6S'], ['5S', '7D', '9H', '3C', '4S', 'JH'], 'H17'], [['7C', '6S', '5S'], 18]], [[['7D', '3D'], ['6D', 'AC', '8D', '2C', '4H', '2D'], 'S17'], [['7D', '3D', '6D', 'AC'], 17]], [[['5S', 'AH'], ['AC', '4D', '2C'], 'H17'], [['5S', 'AH', 'AC', '4D'], 21]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"dealer hand case %d\" % i, solve(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":"A bounded toy rule contract stated explicitly in the contract field; cards are two-character codes (rank, suit). Not a complete implementation of any published rulebook or casino table 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-card-game-rule-engines-dealer-draw-standing-threshold","generated_at":"2026-09-29T14:50:21.300784+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Card-game engines, scoring apps and online tables apply this rule automatically on every hand.","root_cause":"The draw condition uses <= 17.","sha256":"860645d2581944f965556e835ed6cd207881b5fc13d9f074ea27d1165fb8e653","title":"Dealer hits hard 17 · 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":42.868,"exit_code":1,"observations":[{"actual":[["JH","5D","7D"],22],"check":"dealer hand case 0","expected":[["JH","5D","7D"],22],"passed":true},{"actual":[["KS","7S"],17],"check":"dealer hand case 1","expected":[["KS","7S"],17],"passed":true},{"actual":[["QS","JS"],20],"check":"dealer hand case 2","expected":[["QS","JS"],20],"passed":true},{"actual":[["3H","7D","3S","9S"],22],"check":"dealer hand case 3","expected":[["3H","7D","3S","9S"],22],"passed":true},{"actual":[["3C","2D","QS","QH"],25],"check":"dealer hand case 4","expected":[["3C","2D","QS","QH"],25],"passed":true},{"actual":[["TC","6H","TH"],26],"check":"dealer hand case 5","expected":[["TC","6H","TH"],26],"passed":true},{"actual":[["JD","TD"],20],"check":"dealer hand case 6","expected":[["JD","TD"],20],"passed":true},{"actual":[["AS","AH"],12],"check":"dealer hand case 7","expected":[["AS","AH","4C","AD","9C"],16],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"dealer hand case 0\", \"actual\": [[\"JH\", \"5D\", \"7D\"], 22], \"expected\": [[\"JH\", \"5D\", \"7D\"], 22], \"passed\": true}, {\"check\": \"dealer hand case 1\", \"actual\": [[\"KS\", \"7S\"], 17], \"expected\": [[\"KS\", \"7S\"], 17], \"passed\": true}, {\"check\": \"dealer hand case 2\", \"actual\": [[\"QS\", \"JS\"], 20], \"expected\": [[\"QS\", \"JS\"], 20], \"passed\": true}, {\"check\": \"dealer hand case 3\", \"actual\": [[\"3H\", \"7D\", \"3S\", \"9S\"], 22], \"expected\": [[\"3H\", \"7D\", \"3S\", \"9S\"], 22], \"passed\": true}, {\"check\": \"dealer hand case 4\", \"actual\": [[\"3C\", \"2D\", \"QS\", \"QH\"], 25], \"expected\": [[\"3C\", \"2D\", \"QS\", \"QH\"], 25], \"passed\": true}, {\"check\": \"dealer hand case 5\", \"actual\": [[\"TC\", \"6H\", \"TH\"], 26], \"expected\": [[\"TC\", \"6H\", \"TH\"], 26], \"passed\": true}, {\"check\": \"dealer hand case 6\", \"actual\": [[\"JD\", \"TD\"], 20], \"expected\": [[\"JD\", \"TD\"], 20], \"passed\": true}, {\"check\": \"dealer hand case 7\", \"actual\": [[\"AS\", \"AH\"], 12], \"expected\": [[\"AS\", \"AH\", \"4C\", \"AD\", \"9C\"], 16], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.293,"exit_code":1,"observations":[{"actual":[["JH","5D","7D"],22],"check":"dealer hand case 0","expected":[["JH","5D","7D"],22],"passed":true},{"actual":[["KS","7S","TC"],27],"check":"dealer hand case 1","expected":[["KS","7S"],17],"passed":false},{"actual":[["QS","JS"],20],"check":"dealer hand case 2","expected":[["QS","JS"],20],"passed":true},{"actual":[["3H","7D","3S","9S"],22],"check":"dealer hand case 3","expected":[["3H","7D","3S","9S"],22],"passed":true},{"actual":[["3C","2D","QS","QH"],25],"check":"dealer hand case 4","expected":[["3C","2D","QS","QH"],25],"passed":true},{"actual":[["TC","6H","TH"],26],"check":"dealer hand case 5","expected":[["TC","6H","TH"],26],"passed":true},{"actual":[["JD","TD"],20],"check":"dealer hand case 6","expected":[["JD","TD"],20],"passed":true},{"actual":[["AS","AH","4C","AD","9C"],16],"check":"dealer hand case 7","expected":[["AS","AH","4C","AD","9C"],16],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"dealer hand case 0\", \"actual\": [[\"JH\", \"5D\", \"7D\"], 22], \"expected\": [[\"JH\", \"5D\", \"7D\"], 22], \"passed\": true}, {\"check\": \"dealer hand case 1\", \"actual\": [[\"KS\", \"7S\", \"TC\"], 27], \"expected\": [[\"KS\", \"7S\"], 17], \"passed\": false}, {\"check\": \"dealer hand case 2\", \"actual\": [[\"QS\", \"JS\"], 20], \"expected\": [[\"QS\", \"JS\"], 20], \"passed\": true}, {\"check\": \"dealer hand case 3\", \"actual\": [[\"3H\", \"7D\", \"3S\", \"9S\"], 22], \"expected\": [[\"3H\", \"7D\", \"3S\", \"9S\"], 22], \"passed\": true}, {\"check\": \"dealer hand case 4\", \"actual\": [[\"3C\", \"2D\", \"QS\", \"QH\"], 25], \"expected\": [[\"3C\", \"2D\", \"QS\", \"QH\"], 25], \"passed\": true}, {\"check\": \"dealer hand case 5\", \"actual\": [[\"TC\", \"6H\", \"TH\"], 26], \"expected\": [[\"TC\", \"6H\", \"TH\"], 26], \"passed\": true}, {\"check\": \"dealer hand case 6\", \"actual\": [[\"JD\", \"TD\"], 20], \"expected\": [[\"JD\", \"TD\"], 20], \"passed\": true}, {\"check\": \"dealer hand case 7\", \"actual\": [[\"AS\", \"AH\", \"4C\", \"AD\", \"9C\"], 16], \"expected\": [[\"AS\", \"AH\", \"4C\", \"AD\", \"9C\"], 16], \"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."}}