{"abstract":"Playing the left bower on a led plain suit loses the trick.","category":"Card game rule engines","checks":8,"contract":"Input [four_cards, leader, trump]. The jack of trump (right bower) is highest, the jack of the same-colour suit (left bower) is second and belongs to the trump suit; then A K Q T 9 of trump. Otherwise the highest card of the effective led suit (A K Q J T 9) wins. Return the winning seat.","contract_signature":"x","evaluation_group":"w2-card-game-rule-engines-euchre-trick","failed_approach":"Using the printed suit only for the current winner lets any trump overtake a winning left bower.","family":"w2-card-game-rule-engines-euchre-trick-ruff-by-effective-suit","id":"FA-83651","implementations":{"attempt":{"sha256":"b78683fdaecd23a14399f39957b72e7306592658d188cbeb9ca3117bdae5e597","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    cards, leader, trump = x\n    partner = {'S': 'C', 'C': 'S', 'H': 'D', 'D': 'H'}[trump]\n    def suit(c):\n        if c[0] == 'J' and c[1] == partner:\n            return trump\n        return c[1]\n    def power(c):\n        if suit(c) == trump:\n            if c[0] == 'J':\n                return 100 if c[1] == trump else 99\n            return 50 + '9TJQKA'.index(c[0])\n        return '9TJQKA'.index(c[0])\n    best = 0\n    for i in range(1, len(cards)):\n        c = cards[i]\n        b = cards[best]\n        if suit(c) == suit(b) and power(c) > power(b):\n            best = i\n        elif suit(c) == trump and b[1] != trump:\n            best = i\n    return (leader + best) % 4\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[['9S', 'JD', 'AC', '9H'], 0, 'H'], 1], [[['9H', 'JS', 'TH', 'QC'], 3, 'C'], 0], [[['KS', '9H', 'QC', '9D'], 3, 'S'], 3], [[['JD', 'QD', 'AD', 'AC'], 0, 'H'], 0], [[['JD', 'AS', 'JC', 'QH'], 3, 'S'], 1], [[['KH', '9S', 'JH', 'QS'], 3, 'D'], 1], [[['TS', 'JS', 'TC', 'QC'], 2, 'S'], 3], [[['JS', 'KD', 'AS', 'TC'], 1, 'C'], 1]], [[[['KH', '9S', 'JH', 'QS'], 3, 'D'], 1], [[['JD', '9H', 'TH', 'AS'], 0, 'H'], 0], [[['JD', 'TS', '9C', 'QD'], 3, 'C'], 1], [[['QS', 'KD', '9S', '9C'], 1, 'S'], 1], [[['TH', 'AS', 'TD', 'KD'], 2, 'C'], 2], [[['QS', 'TC', 'KH', 'AS'], 0, 'D'], 3], [[['KD', 'TH', 'AD', 'AH'], 2, 'C'], 0], [[['JH', 'KD', 'TS', 'TD'], 3, 'D'], 3]], [[[['KC', 'KD', 'JS', 'QH'], 1, 'C'], 3], [[['JC', 'TH', '9H', 'QD'], 1, 'D'], 0], [[['9D', 'AS', 'JS', 'TD'], 0, 'S'], 2], [[['JS', 'TH', 'TC', 'JD'], 2, 'C'], 2], [[['TC', 'JS', 'AC', 'TH'], 1, 'C'], 2], [[['QC', 'QD', 'KC', 'JS'], 2, 'C'], 1], [[['AC', 'TC', 'AH', 'JS'], 1, 'C'], 0], [[['JD', 'TH', 'JS', 'JC'], 3, 'H'], 3]], [[[['AH', 'KD', '9S', 'KC'], 3, 'S'], 1], [[['JD', 'QD', 'KC', 'JC'], 3, 'S'], 2], [[['TH', 'AH', 'JD', 'QD'], 2, 'S'], 3], [[['KS', '9D', 'TD', 'JS'], 0, 'C'], 3], [[['9C', 'JH', 'JS', 'TC'], 2, 'C'], 0], [[['QD', 'AH', 'KS', 'TC'], 3, 'H'], 0], [[['AS', 'TC', 'TD', 'QS'], 1, 'S'], 1], [[['JC', 'KH', 'AS', 'QH'], 0, 'S'], 0]], [[[['QH', 'AD', 'AS', 'QC'], 3, 'D'], 0], [[['TC', 'JD', 'QS', 'JC'], 3, 'C'], 2], [[['AH', 'JH', '9C', 'TS'], 0, 'D'], 1], [[['AD', 'KS', 'JH', 'JD'], 2, 'H'], 0], [[['TH', 'JS', 'QC', 'JC'], 2, 'C'], 1], [[['KC', '9H', 'JS', 'JC'], 2, 'S'], 0], [[['KS', '9S', 'TS', 'JS'], 1, 'C'], 0], [[['KS', 'JS', 'TC', 'JD'], 0, 'C'], 1]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"trick 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":"a854bc5de4d3cb8436046e3a6fce151d1f19586caee34fd4ace0050e5a71f9e1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    cards, leader, trump = x\n    partner = {'S': 'C', 'C': 'S', 'H': 'D', 'D': 'H'}[trump]\n    def suit(c):\n        if c[0] == 'J' and c[1] == partner:\n            return trump\n        return c[1]\n    def power(c):\n        if suit(c) == trump:\n            if c[0] == 'J':\n                return 100 if c[1] == trump else 99\n            return 50 + '9TJQKA'.index(c[0])\n        return '9TJQKA'.index(c[0])\n    best = 0\n    for i in range(1, len(cards)):\n        c = cards[i]\n        b = cards[best]\n        if suit(c) == suit(b) and power(c) > power(b):\n            best = i\n        elif c[1] == trump and b[1] != trump:\n            best = i\n    return (leader + best) % 4\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[[[['9S', 'JD', 'AC', '9H'], 0, 'H'], 1], [[['9H', 'JS', 'TH', 'QC'], 3, 'C'], 0], [[['KS', '9H', 'QC', '9D'], 3, 'S'], 3], [[['JD', 'QD', 'AD', 'AC'], 0, 'H'], 0], [[['JD', 'AS', 'JC', 'QH'], 3, 'S'], 1], [[['KH', '9S', 'JH', 'QS'], 3, 'D'], 1], [[['TS', 'JS', 'TC', 'QC'], 2, 'S'], 3], [[['JS', 'KD', 'AS', 'TC'], 1, 'C'], 1]], [[[['KH', '9S', 'JH', 'QS'], 3, 'D'], 1], [[['JD', '9H', 'TH', 'AS'], 0, 'H'], 0], [[['JD', 'TS', '9C', 'QD'], 3, 'C'], 1], [[['QS', 'KD', '9S', '9C'], 1, 'S'], 1], [[['TH', 'AS', 'TD', 'KD'], 2, 'C'], 2], [[['QS', 'TC', 'KH', 'AS'], 0, 'D'], 3], [[['KD', 'TH', 'AD', 'AH'], 2, 'C'], 0], [[['JH', 'KD', 'TS', 'TD'], 3, 'D'], 3]], [[[['KC', 'KD', 'JS', 'QH'], 1, 'C'], 3], [[['JC', 'TH', '9H', 'QD'], 1, 'D'], 0], [[['9D', 'AS', 'JS', 'TD'], 0, 'S'], 2], [[['JS', 'TH', 'TC', 'JD'], 2, 'C'], 2], [[['TC', 'JS', 'AC', 'TH'], 1, 'C'], 2], [[['QC', 'QD', 'KC', 'JS'], 2, 'C'], 1], [[['AC', 'TC', 'AH', 'JS'], 1, 'C'], 0], [[['JD', 'TH', 'JS', 'JC'], 3, 'H'], 3]], [[[['AH', 'KD', '9S', 'KC'], 3, 'S'], 1], [[['JD', 'QD', 'KC', 'JC'], 3, 'S'], 2], [[['TH', 'AH', 'JD', 'QD'], 2, 'S'], 3], [[['KS', '9D', 'TD', 'JS'], 0, 'C'], 3], [[['9C', 'JH', 'JS', 'TC'], 2, 'C'], 0], [[['QD', 'AH', 'KS', 'TC'], 3, 'H'], 0], [[['AS', 'TC', 'TD', 'QS'], 1, 'S'], 1], [[['JC', 'KH', 'AS', 'QH'], 0, 'S'], 0]], [[[['QH', 'AD', 'AS', 'QC'], 3, 'D'], 0], [[['TC', 'JD', 'QS', 'JC'], 3, 'C'], 2], [[['AH', 'JH', '9C', 'TS'], 0, 'D'], 1], [[['AD', 'KS', 'JH', 'JD'], 2, 'H'], 0], [[['TH', 'JS', 'QC', 'JC'], 2, 'C'], 1], [[['KC', '9H', 'JS', 'JC'], 2, 'S'], 0], [[['KS', '9S', 'TS', 'JS'], 1, 'C'], 0], [[['KS', 'JS', 'TC', 'JD'], 0, 'C'], 1]]]\nfor i, (args, expected) in enumerate(fixtures[N-1]):\n    check(\"trick 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-euchre-trick-ruff-by-effective-suit","generated_at":"2026-09-29T14:50:23.543454+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 ruff test compares printed suits instead of effective suits.","sha256":"24da30ceca5c605a55e90eb46d441b1437d4937eb820d5828ccbdfddec2d0265","title":"The left bower cannot trump in · 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":40.785,"exit_code":1,"observations":[{"actual":3,"check":"trick case 0","expected":1,"passed":false},{"actual":2,"check":"trick case 1","expected":0,"passed":false},{"actual":3,"check":"trick case 2","expected":3,"passed":true},{"actual":0,"check":"trick case 3","expected":0,"passed":true},{"actual":1,"check":"trick case 4","expected":1,"passed":true},{"actual":1,"check":"trick case 5","expected":1,"passed":true},{"actual":3,"check":"trick case 6","expected":3,"passed":true},{"actual":0,"check":"trick case 7","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"trick case 0\", \"actual\": 3, \"expected\": 1, \"passed\": false}, {\"check\": \"trick case 1\", \"actual\": 2, \"expected\": 0, \"passed\": false}, {\"check\": \"trick case 2\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"trick case 3\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"trick case 4\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"trick case 5\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"trick case 6\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"trick case 7\", \"actual\": 0, \"expected\": 1, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.873,"exit_code":1,"observations":[{"actual":3,"check":"trick case 0","expected":1,"passed":false},{"actual":2,"check":"trick case 1","expected":0,"passed":false},{"actual":3,"check":"trick case 2","expected":3,"passed":true},{"actual":0,"check":"trick case 3","expected":0,"passed":true},{"actual":1,"check":"trick case 4","expected":1,"passed":true},{"actual":3,"check":"trick case 5","expected":1,"passed":false},{"actual":3,"check":"trick case 6","expected":3,"passed":true},{"actual":0,"check":"trick case 7","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"trick case 0\", \"actual\": 3, \"expected\": 1, \"passed\": false}, {\"check\": \"trick case 1\", \"actual\": 2, \"expected\": 0, \"passed\": false}, {\"check\": \"trick case 2\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"trick case 3\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"trick case 4\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"trick case 5\", \"actual\": 3, \"expected\": 1, \"passed\": false}, {\"check\": \"trick case 6\", \"actual\": 3, \"expected\": 3, \"passed\": true}, {\"check\": \"trick case 7\", \"actual\": 0, \"expected\": 1, \"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."}}