{"abstract":"The dealer is unrestricted.","category":"Card game rule engines","checks":8,"contract":"Input [bids_so_far, players, hand_size]. Bids range 0..hand_size. The last bidder (dealer) may not bid the amount that makes the total of bids equal hand_size. Return the allowed bids ascending.","contract_signature":"x","evaluation_group":"w2-card-game-rule-engines-oh-hell-hook","failed_approach":"Applying the hook to the last two bidders restricts the player before the dealer.","family":"w2-card-game-rule-engines-oh-hell-hook-dealer-detection","id":"FA-83781","implementations":{"attempt":{"sha256":"bdf002557419f4c4ff7d3a4c6dfa28dc3751cef427c308e74d6636f18a9070e6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    bids, players, size = x\n    allowed = list(range(size + 1))\n    if len(bids) >= players - 2:\n        forbidden = size - sum(bids)\n        allowed = [b for b in allowed if b != forbidden]\n    return allowed\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[2, 2], 3, 2], [0, 1, 2]], [[[1, 1], 5, 1], [0, 1]], [[[2], 3, 7], [0, 1, 2, 3, 4, 5, 6, 7]], [[[3], 4, 5], [0, 1, 2, 3, 4, 5]], [[[0, 3], 3, 6], [0, 1, 2, 4, 5, 6]], [[[8, 6], 4, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]], [[[2, 3], 4, 3], [0, 1, 2, 3]], [[[7], 3, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]], [[[[1, 1], 5, 1], [0, 1]], [[[1], 3, 2], [0, 1, 2]], [[[0], 3, 7], [0, 1, 2, 3, 4, 5, 6, 7]], [[[], 3, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]], [[[], 4, 1], [0, 1]], [[[0], 4, 4], [0, 1, 2, 3, 4]], [[[2, 0], 3, 3], [0, 2, 3]], [[[4], 3, 4], [0, 1, 2, 3, 4]]], [[[[0, 0, 4], 4, 4], [1, 2, 3, 4]], [[[0, 0], 3, 4], [0, 1, 2, 3]], [[[], 3, 7], [0, 1, 2, 3, 4, 5, 6, 7]], [[[0], 3, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]], [[[8, 2], 3, 8], [0, 1, 2, 3, 4, 5, 6, 7, 8]], [[[3, 5, 0], 5, 5], [0, 1, 2, 3, 4, 5]], [[[0, 0], 3, 1], [0]], [[[8], 3, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]], [[[[], 5, 5], [0, 1, 2, 3, 4, 5]], [[[2, 0], 3, 3], [0, 2, 3]], [[[2], 4, 2], [0, 1, 2]], [[[4, 2, 0], 5, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]], [[[0], 3, 4], [0, 1, 2, 3, 4]], [[[7], 3, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]], [[[1, 0], 3, 1], [1]], [[[4, 0, 0], 5, 6], [0, 1, 2, 3, 4, 5, 6]]], [[[[2, 0, 1], 4, 2], [0, 1, 2]], [[[0], 4, 2], [0, 1, 2]], [[[0, 3], 3, 7], [0, 1, 2, 3, 5, 6, 7]], [[[6, 0], 3, 8], [0, 1, 3, 4, 5, 6, 7, 8]], [[[4, 3, 3], 5, 7], [0, 1, 2, 3, 4, 5, 6, 7]], [[[], 3, 5], [0, 1, 2, 3, 4, 5]], [[[0, 6], 3, 6], [1, 2, 3, 4, 5, 6]], [[[2, 2], 4, 4], [0, 1, 2, 3, 4]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"allowed bids 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":"9e876366ea8492a0f494022f41ceeb56709a66a300eb877f0afcd29ba54d94b6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    bids, players, size = x\n    allowed = list(range(size + 1))\n    if len(bids) == players:\n        forbidden = size - sum(bids)\n        allowed = [b for b in allowed if b != forbidden]\n    return allowed\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[[2, 2], 3, 2], [0, 1, 2]], [[[1, 1], 5, 1], [0, 1]], [[[2], 3, 7], [0, 1, 2, 3, 4, 5, 6, 7]], [[[3], 4, 5], [0, 1, 2, 3, 4, 5]], [[[0, 3], 3, 6], [0, 1, 2, 4, 5, 6]], [[[8, 6], 4, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]], [[[2, 3], 4, 3], [0, 1, 2, 3]], [[[7], 3, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]]], [[[[1, 1], 5, 1], [0, 1]], [[[1], 3, 2], [0, 1, 2]], [[[0], 3, 7], [0, 1, 2, 3, 4, 5, 6, 7]], [[[], 3, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]], [[[], 4, 1], [0, 1]], [[[0], 4, 4], [0, 1, 2, 3, 4]], [[[2, 0], 3, 3], [0, 2, 3]], [[[4], 3, 4], [0, 1, 2, 3, 4]]], [[[[0, 0, 4], 4, 4], [1, 2, 3, 4]], [[[0, 0], 3, 4], [0, 1, 2, 3]], [[[], 3, 7], [0, 1, 2, 3, 4, 5, 6, 7]], [[[0], 3, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]], [[[8, 2], 3, 8], [0, 1, 2, 3, 4, 5, 6, 7, 8]], [[[3, 5, 0], 5, 5], [0, 1, 2, 3, 4, 5]], [[[0, 0], 3, 1], [0]], [[[8], 3, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]]], [[[[], 5, 5], [0, 1, 2, 3, 4, 5]], [[[2, 0], 3, 3], [0, 2, 3]], [[[2], 4, 2], [0, 1, 2]], [[[4, 2, 0], 5, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]], [[[0], 3, 4], [0, 1, 2, 3, 4]], [[[7], 3, 9], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]], [[[1, 0], 3, 1], [1]], [[[4, 0, 0], 5, 6], [0, 1, 2, 3, 4, 5, 6]]], [[[[2, 0, 1], 4, 2], [0, 1, 2]], [[[0], 4, 2], [0, 1, 2]], [[[0, 3], 3, 7], [0, 1, 2, 3, 5, 6, 7]], [[[6, 0], 3, 8], [0, 1, 3, 4, 5, 6, 7, 8]], [[[4, 3, 3], 5, 7], [0, 1, 2, 3, 4, 5, 6, 7]], [[[], 3, 5], [0, 1, 2, 3, 4, 5]], [[[0, 6], 3, 6], [1, 2, 3, 4, 5, 6]], [[[2, 2], 4, 4], [0, 1, 2, 3, 4]]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"allowed bids 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-oh-hell-hook-dealer-detection","generated_at":"2026-09-29T14:50:24.667839+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 dealer test compares with the number of players.","sha256":"1cfdb095046b6312b4bd078ccb68ee0bdc4d5240691c3c014f61b126f8902a0e","title":"The hook is applied after the dealer has bid · 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":38.256,"exit_code":1,"observations":[{"actual":[0,1,2],"check":"allowed bids case 0","expected":[0,1,2],"passed":true},{"actual":[0,1],"check":"allowed bids case 1","expected":[0,1],"passed":true},{"actual":[0,1,2,3,4,6,7],"check":"allowed bids case 2","expected":[0,1,2,3,4,5,6,7],"passed":false},{"actual":[0,1,2,3,4,5],"check":"allowed bids case 3","expected":[0,1,2,3,4,5],"passed":true},{"actual":[0,1,2,4,5,6],"check":"allowed bids case 4","expected":[0,1,2,4,5,6],"passed":true},{"actual":[0,1,2,3,4,5,6,7,8,9],"check":"allowed bids case 5","expected":[0,1,2,3,4,5,6,7,8,9],"passed":true},{"actual":[0,1,2,3],"check":"allowed bids case 6","expected":[0,1,2,3],"passed":true},{"actual":[0,1,3,4,5,6,7,8,9],"check":"allowed bids case 7","expected":[0,1,2,3,4,5,6,7,8,9],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"allowed bids case 0\", \"actual\": [0, 1, 2], \"expected\": [0, 1, 2], \"passed\": true}, {\"check\": \"allowed bids case 1\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"allowed bids case 2\", \"actual\": [0, 1, 2, 3, 4, 6, 7], \"expected\": [0, 1, 2, 3, 4, 5, 6, 7], \"passed\": false}, {\"check\": \"allowed bids case 3\", \"actual\": [0, 1, 2, 3, 4, 5], \"expected\": [0, 1, 2, 3, 4, 5], \"passed\": true}, {\"check\": \"allowed bids case 4\", \"actual\": [0, 1, 2, 4, 5, 6], \"expected\": [0, 1, 2, 4, 5, 6], \"passed\": true}, {\"check\": \"allowed bids case 5\", \"actual\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], \"expected\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], \"passed\": true}, {\"check\": \"allowed bids case 6\", \"actual\": [0, 1, 2, 3], \"expected\": [0, 1, 2, 3], \"passed\": true}, {\"check\": \"allowed bids case 7\", \"actual\": [0, 1, 3, 4, 5, 6, 7, 8, 9], \"expected\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.829,"exit_code":1,"observations":[{"actual":[0,1,2],"check":"allowed bids case 0","expected":[0,1,2],"passed":true},{"actual":[0,1],"check":"allowed bids case 1","expected":[0,1],"passed":true},{"actual":[0,1,2,3,4,5,6,7],"check":"allowed bids case 2","expected":[0,1,2,3,4,5,6,7],"passed":true},{"actual":[0,1,2,3,4,5],"check":"allowed bids case 3","expected":[0,1,2,3,4,5],"passed":true},{"actual":[0,1,2,3,4,5,6],"check":"allowed bids case 4","expected":[0,1,2,4,5,6],"passed":false},{"actual":[0,1,2,3,4,5,6,7,8,9],"check":"allowed bids case 5","expected":[0,1,2,3,4,5,6,7,8,9],"passed":true},{"actual":[0,1,2,3],"check":"allowed bids case 6","expected":[0,1,2,3],"passed":true},{"actual":[0,1,2,3,4,5,6,7,8,9],"check":"allowed bids case 7","expected":[0,1,2,3,4,5,6,7,8,9],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"allowed bids case 0\", \"actual\": [0, 1, 2], \"expected\": [0, 1, 2], \"passed\": true}, {\"check\": \"allowed bids case 1\", \"actual\": [0, 1], \"expected\": [0, 1], \"passed\": true}, {\"check\": \"allowed bids case 2\", \"actual\": [0, 1, 2, 3, 4, 5, 6, 7], \"expected\": [0, 1, 2, 3, 4, 5, 6, 7], \"passed\": true}, {\"check\": \"allowed bids case 3\", \"actual\": [0, 1, 2, 3, 4, 5], \"expected\": [0, 1, 2, 3, 4, 5], \"passed\": true}, {\"check\": \"allowed bids case 4\", \"actual\": [0, 1, 2, 3, 4, 5, 6], \"expected\": [0, 1, 2, 4, 5, 6], \"passed\": false}, {\"check\": \"allowed bids case 5\", \"actual\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], \"expected\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], \"passed\": true}, {\"check\": \"allowed bids case 6\", \"actual\": [0, 1, 2, 3], \"expected\": [0, 1, 2, 3], \"passed\": true}, {\"check\": \"allowed bids case 7\", \"actual\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], \"expected\": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], \"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."}}