{"abstract":"Filers with investment income over the limit still receive most of the credit.","category":"Tax bracket computation","checks":8,"contract":"solve(earned, agi, children, mfj, invest): stipulated earned-income credit, whole dollars. Investment income above 11600 disqualifies (0). Parameters by min(children, 3): phase-in rate %, max credit, phase-out rate %, phase-out start (0: 7.65, 600, 7.65, 9800; 1: 34, 3995, 15.98, 21560; 2: 40, 6604, 21.06, 21560; 3+: 45, 7430, 21.06, 21560); joint filers add 6920 to the start. Credit = min(rate_in*earned, max) reduced by rate_out*(max(earned, agi) - start) when positive, floored at 0. Return integer cents half-up.","contract_signature":"earned, agi, children, mfj, invest","evaluation_group":"w2-tax_bracket_computation-earned-credit-phaseout","failed_approach":"Disqualifying at 11600 exactly rejects filers who are at, not above, the limit.","family":"w2-tax_bracket_computation-earned-credit-phaseout-investment-disqualification","id":"FA-62781","implementations":{"attempt":{"sha256":"72fc463933536c3b95245cbd30b87c1ff3a78ae7fbe1e1e6856f472803323a77","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(earned, agi, children, mfj, invest):\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    P = {0: ['7.65', 7840, 600, '7.65', 9800], 1: ['34', 11750, 3995, '15.98', 21560], 2: ['40', 16510, 6604, '21.06', 21560], 3: ['45', 16510, 7430, '21.06', 21560]}\n    if invest >= 11600: return 0\n    rin, cap, mx, rout, start = P[min(children, 3)]\n    if mfj: start += 6920\n    credit = min(Fraction(rin) * earned / 100, Fraction(mx))\n    income = max(earned, agi)\n    if income > start: credit -= Fraction(rout) * (income - start) / 100\n    return cents(max(0, credit))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression investment-disqualification 1', (20000, 20000, 1, False, 11601), 0),\n  ('regression investment-disqualification 2', (5000, 28763, 3, False, 20000), 0),\n  ('partial repair guard 1', (15000, 15000, 3, True, 11600), 675000),\n  ('partial repair guard 2', (16510, 30000, 1, True, 11600), 375210),\n  ('control: plateau', (10000, 10000, 1, False, 0), 340000),\n  ('control: phase-out two children', (30000, 30000, 2, False, 0), 482654),\n  ('control: agi drives phase-out', (12000, 30000, 1, False, 0), 264629),\n  ('control: no children', (5000, 5000, 0, False, 0), 38250)],\n [('regression investment-disqualification 1', (25000, 10000, 3, False, 11601), 0),\n  ('regression investment-disqualification 2', (40000, 10000, 1, True, 20000), 0),\n  ('partial repair guard 1', (5000, 0, 0, False, 11600), 38250),\n  ('partial repair guard 2', (30678, 10000, 5, False, 11600), 550975),\n  ('control: investment limit', (20000, 20000, 1, False, 11601), 0),\n  ('control: no children', (5000, 5000, 0, False, 0), 38250), ('control: joint', (30000, 30000, 2, True, 0), 628389),\n  ('control: four children', (15000, 15000, 4, False, 0), 675000)],\n [('regression investment-disqualification 1', (10000, 0, 4, True, 20000), 0),\n  ('regression investment-disqualification 2', (25000, 30000, 3, False, 11601), 0),\n  ('partial repair guard 1', (40000, 10000, 5, True, 11600), 500389),\n  ('partial repair guard 2', (5000, 30000, 2, False, 11600), 22254),\n  ('control: four children', (15000, 15000, 4, False, 0), 675000),\n  ('control: phased to zero', (60000, 60000, 1, False, 0), 0),\n  ('control: investment at limit', (15000, 15000, 3, True, 11600), 675000),\n  ('control: plateau', (10000, 10000, 1, False, 0), 340000)],\n [('regression investment-disqualification 1', (5000, 30000, 4, False, 20000), 0),\n  ('regression investment-disqualification 2', (5000, 4110, 0, False, 11601), 0),\n  ('partial repair guard 1', (10000, 30000, 5, False, 11600), 272254),\n  ('partial repair guard 2', (25000, 10000, 1, False, 11600), 344529),\n  ('control: plateau', (10000, 10000, 1, False, 0), 340000),\n  ('control: phase-out two children', (30000, 30000, 2, False, 0), 482654),\n  ('control: agi drives phase-out', (12000, 30000, 1, False, 0), 264629),\n  ('control: investment limit', (20000, 20000, 1, False, 11601), 0)],\n [('regression investment-disqualification 1', (5000, 30000, 4, True, 11601), 0),\n  ('regression investment-disqualification 2', (10000, 0, 5, True, 20000), 0),\n  ('partial repair guard 1', (40000, 30000, 3, False, 11600), 354654),\n  ('partial repair guard 2', (10000, 0, 5, True, 11600), 450000),\n  ('control: investment limit', (20000, 20000, 1, False, 11601), 0),\n  ('control: no children', (5000, 5000, 0, False, 0), 38250), ('control: joint', (30000, 30000, 2, True, 0), 628389),\n  ('control: four children', (15000, 15000, 4, False, 0), 675000)]]\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":"78ae7b01000b8dd8b958a179c3d695c7c6d3769d2cfa11b175bee86dcbb9dbec","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(earned, agi, children, mfj, invest):\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    P = {0: ['7.65', 7840, 600, '7.65', 9800], 1: ['34', 11750, 3995, '15.98', 21560], 2: ['40', 16510, 6604, '21.06', 21560], 3: ['45', 16510, 7430, '21.06', 21560]}\n    pass\n    rin, cap, mx, rout, start = P[min(children, 3)]\n    if mfj: start += 6920\n    credit = min(Fraction(rin) * earned / 100, Fraction(mx))\n    income = max(earned, agi)\n    if income > start: credit -= Fraction(rout) * (income - start) / 100\n    return cents(max(0, credit))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression investment-disqualification 1', (20000, 20000, 1, False, 11601), 0),\n  ('regression investment-disqualification 2', (5000, 28763, 3, False, 20000), 0),\n  ('partial repair guard 1', (15000, 15000, 3, True, 11600), 675000),\n  ('partial repair guard 2', (16510, 30000, 1, True, 11600), 375210),\n  ('control: plateau', (10000, 10000, 1, False, 0), 340000),\n  ('control: phase-out two children', (30000, 30000, 2, False, 0), 482654),\n  ('control: agi drives phase-out', (12000, 30000, 1, False, 0), 264629),\n  ('control: no children', (5000, 5000, 0, False, 0), 38250)],\n [('regression investment-disqualification 1', (25000, 10000, 3, False, 11601), 0),\n  ('regression investment-disqualification 2', (40000, 10000, 1, True, 20000), 0),\n  ('partial repair guard 1', (5000, 0, 0, False, 11600), 38250),\n  ('partial repair guard 2', (30678, 10000, 5, False, 11600), 550975),\n  ('control: investment limit', (20000, 20000, 1, False, 11601), 0),\n  ('control: no children', (5000, 5000, 0, False, 0), 38250), ('control: joint', (30000, 30000, 2, True, 0), 628389),\n  ('control: four children', (15000, 15000, 4, False, 0), 675000)],\n [('regression investment-disqualification 1', (10000, 0, 4, True, 20000), 0),\n  ('regression investment-disqualification 2', (25000, 30000, 3, False, 11601), 0),\n  ('partial repair guard 1', (40000, 10000, 5, True, 11600), 500389),\n  ('partial repair guard 2', (5000, 30000, 2, False, 11600), 22254),\n  ('control: four children', (15000, 15000, 4, False, 0), 675000),\n  ('control: phased to zero', (60000, 60000, 1, False, 0), 0),\n  ('control: investment at limit', (15000, 15000, 3, True, 11600), 675000),\n  ('control: plateau', (10000, 10000, 1, False, 0), 340000)],\n [('regression investment-disqualification 1', (5000, 30000, 4, False, 20000), 0),\n  ('regression investment-disqualification 2', (5000, 4110, 0, False, 11601), 0),\n  ('partial repair guard 1', (10000, 30000, 5, False, 11600), 272254),\n  ('partial repair guard 2', (25000, 10000, 1, False, 11600), 344529),\n  ('control: plateau', (10000, 10000, 1, False, 0), 340000),\n  ('control: phase-out two children', (30000, 30000, 2, False, 0), 482654),\n  ('control: agi drives phase-out', (12000, 30000, 1, False, 0), 264629),\n  ('control: investment limit', (20000, 20000, 1, False, 11601), 0)],\n [('regression investment-disqualification 1', (5000, 30000, 4, True, 11601), 0),\n  ('regression investment-disqualification 2', (10000, 0, 5, True, 20000), 0),\n  ('partial repair guard 1', (40000, 30000, 3, False, 11600), 354654),\n  ('partial repair guard 2', (10000, 0, 5, True, 11600), 450000),\n  ('control: investment limit', (20000, 20000, 1, False, 11601), 0),\n  ('control: no children', (5000, 5000, 0, False, 0), 38250), ('control: joint', (30000, 30000, 2, True, 0), 628389),\n  ('control: four children', (15000, 15000, 4, False, 0), 675000)]]\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-earned-credit-phaseout-investment-disqualification","generated_at":"2026-09-29T14:47:07.987971+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":"Investment income above the limit is subtracted from the credit instead of disqualifying it.","sha256":"80e8a93e8b0c88f57f7e1e3f01967db75ae7feb2a9a2e544f362557799eac7a9","title":"Excess investment income only trims the credit · 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":46.508,"exit_code":1,"observations":[{"actual":0,"check":"regression investment-disqualification 1","expected":0,"passed":true},{"actual":0,"check":"regression investment-disqualification 2","expected":0,"passed":true},{"actual":0,"check":"partial repair guard 1","expected":675000,"passed":false},{"actual":0,"check":"partial repair guard 2","expected":375210,"passed":false},{"actual":340000,"check":"control: plateau","expected":340000,"passed":true},{"actual":482654,"check":"control: phase-out two children","expected":482654,"passed":true},{"actual":264629,"check":"control: agi drives phase-out","expected":264629,"passed":true},{"actual":38250,"check":"control: no children","expected":38250,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression investment-disqualification 1\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"regression investment-disqualification 2\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"partial repair guard 1\", \"actual\": 0, \"expected\": 675000, \"passed\": false}, {\"check\": \"partial repair guard 2\", \"actual\": 0, \"expected\": 375210, \"passed\": false}, {\"check\": \"control: plateau\", \"actual\": 340000, \"expected\": 340000, \"passed\": true}, {\"check\": \"control: phase-out two children\", \"actual\": 482654, \"expected\": 482654, \"passed\": true}, {\"check\": \"control: agi drives phase-out\", \"actual\": 264629, \"expected\": 264629, \"passed\": true}, {\"check\": \"control: no children\", \"actual\": 38250, \"expected\": 38250, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.034,"exit_code":1,"observations":[{"actual":399500,"check":"regression investment-disqualification 1","expected":0,"passed":false},{"actual":73305,"check":"regression investment-disqualification 2","expected":0,"passed":false},{"actual":675000,"check":"partial repair guard 1","expected":675000,"passed":true},{"actual":375210,"check":"partial repair guard 2","expected":375210,"passed":true},{"actual":340000,"check":"control: plateau","expected":340000,"passed":true},{"actual":482654,"check":"control: phase-out two children","expected":482654,"passed":true},{"actual":264629,"check":"control: agi drives phase-out","expected":264629,"passed":true},{"actual":38250,"check":"control: no children","expected":38250,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression investment-disqualification 1\", \"actual\": 399500, \"expected\": 0, \"passed\": false}, {\"check\": \"regression investment-disqualification 2\", \"actual\": 73305, \"expected\": 0, \"passed\": false}, {\"check\": \"partial repair guard 1\", \"actual\": 675000, \"expected\": 675000, \"passed\": true}, {\"check\": \"partial repair guard 2\", \"actual\": 375210, \"expected\": 375210, \"passed\": true}, {\"check\": \"control: plateau\", \"actual\": 340000, \"expected\": 340000, \"passed\": true}, {\"check\": \"control: phase-out two children\", \"actual\": 482654, \"expected\": 482654, \"passed\": true}, {\"check\": \"control: agi drives phase-out\", \"actual\": 264629, \"expected\": 264629, \"passed\": true}, {\"check\": \"control: no children\", \"actual\": 38250, \"expected\": 38250, \"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."}}