{"abstract":"A couple's tax is roughly halved.","category":"Tax bracket computation","checks":7,"contract":"solve(income, halves, couple): stipulated household quotient. Parts p = halves/2; the base is 2 parts for a couple and 1 otherwise (fewer halves than the base returns 'ERR:parts'). Tax with all parts = p * T(income/p) using slices 0% to 11294, 11% to 28797, 30% to 82341, 41% to 177106, 45% above. The benefit of each half-part beyond the base is capped at 1759: tax = max(full, T_base - 1759 * extra_halves) where T_base = base * T(income/base). Return whole units rounded down.","contract_signature":"income, halves, couple","evaluation_group":"w2-tax_bracket_computation-family-quotient-cap","failed_approach":"Multiplying by the number of half-parts doubles the household tax.","family":"w2-tax_bracket_computation-family-quotient-cap-quotient-multiplier","id":"FA-62621","implementations":{"attempt":{"sha256":"63f898a96c55aa50f579302056ffecfae5082d4c3737bd20efb3653ff618efa6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(income, halves, couple):\n    def prog(x, br):\n        tax, lower = Fraction(0), 0\n        for upper, rate in br:\n            top = x if upper is None else min(x, upper)\n            if top > lower: tax += (top - lower) * Fraction(rate) / 100\n            if upper is None or x <= upper: break\n            lower = upper\n        return tax\n    def cents(v):\n        v = v * 100\n        return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))\n    \n    base = 2 if couple else 1\n    if halves < 2 * base: return 'ERR:parts'\n    scale = [[11294, '0'], [28797, '11'], [82341, '30'], [177106, '41'], [None, '45']]\n    def tax_for(p): return 2 * p * prog(Fraction(income) / p, scale)\n    full = tax_for(Fraction(halves, 2))\n    capped = tax_for(Fraction(base)) - 1759 * (halves - 2 * base)\n    return int(max(full, capped))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression quotient-multiplier 1', (80000, 4, True), 10572),\n  ('regression quotient-multiplier 2', (80000, 6, True), 7054), ('partial repair guard 2', (40000, 2, False), 5286),\n  ('control: low income family', (30000, 5, True), 194), ('control: too few parts', (50000, 3, True), 'ERR:parts'),\n  ('control: single parent', (60000, 3, False), 9527),\n  ('control: large family high income', (250000, 8, True), 63921)],\n [('regression quotient-multiplier 1', (30000, 5, True), 194),\n  ('regression quotient-multiplier 2', (250000, 8, True), 63921), ('partial repair guard 1', (80000, 6, True), 7054),\n  ('control: too few parts', (50000, 3, True), 'ERR:parts'), ('control: single parent', (60000, 3, False), 9527),\n  ('control: single one part', (40000, 2, False), 5286), ('control: couple two parts', (80000, 4, True), 10572)],\n [('regression quotient-multiplier 1', (40000, 7, False), 51),\n  ('regression quotient-multiplier 2', (150000, 6, True), 28054), ('partial repair guard 1', (60000, 3, False), 9527),\n  ('partial repair guard 2', (250000, 8, True), 63921), ('control: single one part', (40000, 2, False), 5286),\n  ('control: couple two parts', (80000, 4, True), 10572), ('control: couple with two children', (80000, 6, True), 7054),\n  ('control: low income family', (30000, 5, True), 194)],\n [('regression quotient-multiplier 1', (150000, 4, True), 31572),\n  ('regression quotient-multiplier 2', (193969, 6, True), 44466), ('partial repair guard 1', (40000, 7, False), 51),\n  ('partial repair guard 2', (150000, 6, True), 28054), ('control: couple with two children', (80000, 6, True), 7054),\n  ('control: low income family', (30000, 5, True), 194), ('control: too few parts', (50000, 3, True), 'ERR:parts'),\n  ('control: single parent', (60000, 3, False), 9527)],\n [('regression quotient-multiplier 1', (150000, 8, True), 24536),\n  ('regression quotient-multiplier 2', (40000, 5, True), 1294), ('partial repair guard 1', (80000, 6, False), 10250),\n  ('partial repair guard 2', (150000, 4, True), 31572), ('control: single parent', (60000, 3, False), 9527),\n  ('control: large family high income', (250000, 8, True), 63921),\n  ('control: single one part', (40000, 2, False), 5286), ('control: couple two parts', (80000, 4, True), 10572)]]\nfor label, args, expected in cases[N - 1]:\n    check(label, 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":"9e24f12f0b028a65d386322186fb6a093bfc37d3f270153fa02d3ab648ea2552","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(income, halves, couple):\n    def prog(x, br):\n        tax, lower = Fraction(0), 0\n        for upper, rate in br:\n            top = x if upper is None else min(x, upper)\n            if top > lower: tax += (top - lower) * Fraction(rate) / 100\n            if upper is None or x <= upper: break\n            lower = upper\n        return tax\n    def cents(v):\n        v = v * 100\n        return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))\n    \n    base = 2 if couple else 1\n    if halves < 2 * base: return 'ERR:parts'\n    scale = [[11294, '0'], [28797, '11'], [82341, '30'], [177106, '41'], [None, '45']]\n    def tax_for(p): return prog(Fraction(income) / p, scale)\n    full = tax_for(Fraction(halves, 2))\n    capped = tax_for(Fraction(base)) - 1759 * (halves - 2 * base)\n    return int(max(full, capped))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression quotient-multiplier 1', (80000, 4, True), 10572),\n  ('regression quotient-multiplier 2', (80000, 6, True), 7054), ('partial repair guard 2', (40000, 2, False), 5286),\n  ('control: low income family', (30000, 5, True), 194), ('control: too few parts', (50000, 3, True), 'ERR:parts'),\n  ('control: single parent', (60000, 3, False), 9527),\n  ('control: large family high income', (250000, 8, True), 63921)],\n [('regression quotient-multiplier 1', (30000, 5, True), 194),\n  ('regression quotient-multiplier 2', (250000, 8, True), 63921), ('partial repair guard 1', (80000, 6, True), 7054),\n  ('control: too few parts', (50000, 3, True), 'ERR:parts'), ('control: single parent', (60000, 3, False), 9527),\n  ('control: single one part', (40000, 2, False), 5286), ('control: couple two parts', (80000, 4, True), 10572)],\n [('regression quotient-multiplier 1', (40000, 7, False), 51),\n  ('regression quotient-multiplier 2', (150000, 6, True), 28054), ('partial repair guard 1', (60000, 3, False), 9527),\n  ('partial repair guard 2', (250000, 8, True), 63921), ('control: single one part', (40000, 2, False), 5286),\n  ('control: couple two parts', (80000, 4, True), 10572), ('control: couple with two children', (80000, 6, True), 7054),\n  ('control: low income family', (30000, 5, True), 194)],\n [('regression quotient-multiplier 1', (150000, 4, True), 31572),\n  ('regression quotient-multiplier 2', (193969, 6, True), 44466), ('partial repair guard 1', (40000, 7, False), 51),\n  ('partial repair guard 2', (150000, 6, True), 28054), ('control: couple with two children', (80000, 6, True), 7054),\n  ('control: low income family', (30000, 5, True), 194), ('control: too few parts', (50000, 3, True), 'ERR:parts'),\n  ('control: single parent', (60000, 3, False), 9527)],\n [('regression quotient-multiplier 1', (150000, 8, True), 24536),\n  ('regression quotient-multiplier 2', (40000, 5, True), 1294), ('partial repair guard 1', (80000, 6, False), 10250),\n  ('partial repair guard 2', (150000, 4, True), 31572), ('control: single parent', (60000, 3, False), 9527),\n  ('control: large family high income', (250000, 8, True), 63921),\n  ('control: single one part', (40000, 2, False), 5286), ('control: couple two parts', (80000, 4, True), 10572)]]\nfor label, args, expected in cases[N - 1]:\n    check(label, 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 deterministic, bounded teaching model with a stipulated toy contract; it makes no claim of conformance to any real regulation, standard, or institution's 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-tax_bracket_computation-family-quotient-cap-quotient-multiplier","generated_at":"2026-09-29T14:47:06.343380+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Tax computations hinge on which slice, threshold, ordering and rounding rule applies at each step; a misplaced boundary silently misstates liabilities.","root_cause":"tax_for returns T(income/p) instead of p * T(income/p).","sha256":"830ad8e3c4d599583aa78f8293316b72dd6132e922cc06555b258fd430d37d25","title":"The tax on the per-part quotient is not multiplied back by the parts · 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":45.051,"exit_code":1,"observations":[{"actual":21144,"check":"regression quotient-multiplier 1","expected":10572,"passed":false},{"actual":17626,"check":"regression quotient-multiplier 2","expected":7054,"passed":false},{"actual":10572,"check":"partial repair guard 2","expected":5286,"passed":false},{"actual":388,"check":"control: low income family","expected":194,"passed":false},{"actual":"ERR:parts","check":"control: too few parts","expected":"ERR:parts","passed":true},{"actual":20813,"check":"control: single parent","expected":9527,"passed":false},{"actual":134878,"check":"control: large family high income","expected":63921,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression quotient-multiplier 1\", \"actual\": 21144, \"expected\": 10572, \"passed\": false}, {\"check\": \"regression quotient-multiplier 2\", \"actual\": 17626, \"expected\": 7054, \"passed\": false}, {\"check\": \"partial repair guard 2\", \"actual\": 10572, \"expected\": 5286, \"passed\": false}, {\"check\": \"control: low income family\", \"actual\": 388, \"expected\": 194, \"passed\": false}, {\"check\": \"control: too few parts\", \"actual\": \"ERR:parts\", \"expected\": \"ERR:parts\", \"passed\": true}, {\"check\": \"control: single parent\", \"actual\": 20813, \"expected\": 9527, \"passed\": false}, {\"check\": \"control: large family high income\", \"actual\": 134878, \"expected\": 63921, \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.507,"exit_code":1,"observations":[{"actual":5286,"check":"regression quotient-multiplier 1","expected":10572,"passed":false},{"actual":1768,"check":"regression quotient-multiplier 2","expected":7054,"passed":false},{"actual":5286,"check":"partial repair guard 2","expected":5286,"passed":true},{"actual":77,"check":"control: low income family","expected":194,"passed":false},{"actual":"ERR:parts","check":"control: too few parts","expected":"ERR:parts","passed":true},{"actual":9527,"check":"control: single parent","expected":9527,"passed":true},{"actual":28442,"check":"control: large family high income","expected":63921,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression quotient-multiplier 1\", \"actual\": 5286, \"expected\": 10572, \"passed\": false}, {\"check\": \"regression quotient-multiplier 2\", \"actual\": 1768, \"expected\": 7054, \"passed\": false}, {\"check\": \"partial repair guard 2\", \"actual\": 5286, \"expected\": 5286, \"passed\": true}, {\"check\": \"control: low income family\", \"actual\": 77, \"expected\": 194, \"passed\": false}, {\"check\": \"control: too few parts\", \"actual\": \"ERR:parts\", \"expected\": \"ERR:parts\", \"passed\": true}, {\"check\": \"control: single parent\", \"actual\": 9527, \"expected\": 9527, \"passed\": true}, {\"check\": \"control: large family high income\", \"actual\": 28442, \"expected\": 63921, \"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."}}