{"abstract":"Estates owe no tax far above the exclusion because 13.6 million of tax is forgiven.","category":"Tax bracket computation","checks":6,"contract":"solve(estate, gifts, dsue): stipulated unified transfer tax in whole dollars. T is the progressive schedule 18% to 10000 rising to 40% above 1000000. The exclusion is 13610000 + dsue; the unified credit is T(exclusion). Tentative tax = T(estate + gifts). Gift credit = max(0, T(gifts) - unified credit). Tax = max(0, tentative - gift credit - unified credit), returned in integer cents.","evaluation_group":"w2-tax_bracket_computation-unified-transfer-credit","failed_approach":"Multiplying the exclusion by the top 40% rate overstates the credit because lower slices are taxed below 40%.","family":"w2-tax_bracket_computation-unified-transfer-credit-credit-not-exclusion","id":"FA-62671","implementations":{"attempt":{"sha256":"ff443dbfc968858094051fc4fa9d1a90af1f66d710ea241605199e57bd611989","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(estate, gifts, dsue):\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    sched = [[10000, '18'], [20000, '20'], [40000, '22'], [60000, '24'], [80000, '26'], [100000, '28'], [150000, '30'], [250000, '32'], [500000, '34'], [750000, '37'], [1000000, '39'], [None, '40']]\n    T = lambda x: prog(x, sched)\n    credit = Fraction(13610000 + dsue) * 40 / 100\n    tent = T(estate + gifts)\n    gift_credit = max(0, T(gifts) - credit)\n    return cents(max(0, tent - gift_credit - credit))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression credit-not-exclusion 1', (20000000, 0, 0), 255600000),\n  ('regression credit-not-exclusion 2', (10000000, 5000000, 0), 55600000),\n  ('control: under exclusion', (10000000, 0, 0), 0), ('control: ported exclusion', (20000000, 0, 5000000), 55600000),\n  ('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0)],\n [('regression credit-not-exclusion 1', (20000000, 0, 5000000), 55600000),\n  ('regression credit-not-exclusion 2', (5000000, 15000000, 0), 200000000),\n  ('partial repair guard 2', (8632782, 5000000, 0), 911280), ('control: modest', (1500000, 200000, 0), 0),\n  ('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),\n  ('control: with prior gifts', (10000000, 5000000, 0), 55600000)],\n [('regression credit-not-exclusion 1', (13610000, 15000000, 0), 544400000),\n  ('regression credit-not-exclusion 2', (8632782, 5000000, 0), 911280),\n  ('partial repair guard 1', (21431981, 500000, 0), 332879240),\n  ('partial repair guard 2', (13610000, 500000, 0), 20000000), ('control: large estate', (20000000, 0, 0), 255600000),\n  ('control: under exclusion', (10000000, 0, 0), 0), ('control: with prior gifts', (10000000, 5000000, 0), 55600000),\n  ('control: ported exclusion', (20000000, 0, 5000000), 55600000)],\n [('regression credit-not-exclusion 1', (788866, 18885032, 2000000), 31554640),\n  ('regression credit-not-exclusion 2', (21431981, 500000, 0), 332879240),\n  ('partial repair guard 1', (13610000, 5000000, 2000000), 120000000),\n  ('partial repair guard 2', (13610000, 5703648, 0), 228145920),\n  ('control: ported exclusion', (20000000, 0, 5000000), 55600000),\n  ('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0),\n  ('control: large estate', (20000000, 0, 0), 255600000)],\n [('regression credit-not-exclusion 1', (13610000, 500000, 0), 20000000),\n  ('regression credit-not-exclusion 2', (13610000, 5000000, 2000000), 120000000),\n  ('partial repair guard 1', (27783445, 500000, 5000000), 386937800),\n  ('partial repair guard 2', (22327855, 5000000, 2000000), 468714200),\n  ('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),\n  ('control: with prior gifts', (10000000, 5000000, 0), 55600000),\n  ('control: ported exclusion', (20000000, 0, 5000000), 55600000)]]\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":"8316e4ffc27200405446df23b13ba0ea7071416aeef7cb3b293bf6043a1429c3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(estate, gifts, dsue):\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    sched = [[10000, '18'], [20000, '20'], [40000, '22'], [60000, '24'], [80000, '26'], [100000, '28'], [150000, '30'], [250000, '32'], [500000, '34'], [750000, '37'], [1000000, '39'], [None, '40']]\n    T = lambda x: prog(x, sched)\n    credit = Fraction(13610000 + dsue)\n    tent = T(estate + gifts)\n    gift_credit = max(0, T(gifts) - credit)\n    return cents(max(0, tent - gift_credit - credit))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression credit-not-exclusion 1', (20000000, 0, 0), 255600000),\n  ('regression credit-not-exclusion 2', (10000000, 5000000, 0), 55600000),\n  ('control: under exclusion', (10000000, 0, 0), 0), ('control: ported exclusion', (20000000, 0, 5000000), 55600000),\n  ('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0)],\n [('regression credit-not-exclusion 1', (20000000, 0, 5000000), 55600000),\n  ('regression credit-not-exclusion 2', (5000000, 15000000, 0), 200000000),\n  ('partial repair guard 2', (8632782, 5000000, 0), 911280), ('control: modest', (1500000, 200000, 0), 0),\n  ('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),\n  ('control: with prior gifts', (10000000, 5000000, 0), 55600000)],\n [('regression credit-not-exclusion 1', (13610000, 15000000, 0), 544400000),\n  ('regression credit-not-exclusion 2', (8632782, 5000000, 0), 911280),\n  ('partial repair guard 1', (21431981, 500000, 0), 332879240),\n  ('partial repair guard 2', (13610000, 500000, 0), 20000000), ('control: large estate', (20000000, 0, 0), 255600000),\n  ('control: under exclusion', (10000000, 0, 0), 0), ('control: with prior gifts', (10000000, 5000000, 0), 55600000),\n  ('control: ported exclusion', (20000000, 0, 5000000), 55600000)],\n [('regression credit-not-exclusion 1', (788866, 18885032, 2000000), 31554640),\n  ('regression credit-not-exclusion 2', (21431981, 500000, 0), 332879240),\n  ('partial repair guard 1', (13610000, 5000000, 2000000), 120000000),\n  ('partial repair guard 2', (13610000, 5703648, 0), 228145920),\n  ('control: ported exclusion', (20000000, 0, 5000000), 55600000),\n  ('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0),\n  ('control: large estate', (20000000, 0, 0), 255600000)],\n [('regression credit-not-exclusion 1', (13610000, 500000, 0), 20000000),\n  ('regression credit-not-exclusion 2', (13610000, 5000000, 2000000), 120000000),\n  ('partial repair guard 1', (27783445, 500000, 5000000), 386937800),\n  ('partial repair guard 2', (22327855, 5000000, 2000000), 468714200),\n  ('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),\n  ('control: with prior gifts', (10000000, 5000000, 0), 55600000),\n  ('control: ported exclusion', (20000000, 0, 5000000), 55600000)]]\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"},"fixed":{"sha256":"70170e6d33f3036e2c0627420753e001e79948fd3fcf3577ca31d8ddbea93783","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nfrom fractions import Fraction\nN = 1\nobservations = []\ndef solve(estate, gifts, dsue):\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    sched = [[10000, '18'], [20000, '20'], [40000, '22'], [60000, '24'], [80000, '26'], [100000, '28'], [150000, '30'], [250000, '32'], [500000, '34'], [750000, '37'], [1000000, '39'], [None, '40']]\n    T = lambda x: prog(x, sched)\n    credit = T(13610000 + dsue)\n    tent = T(estate + gifts)\n    gift_credit = max(0, T(gifts) - credit)\n    return cents(max(0, tent - gift_credit - credit))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncases = [[('regression credit-not-exclusion 1', (20000000, 0, 0), 255600000),\n  ('regression credit-not-exclusion 2', (10000000, 5000000, 0), 55600000),\n  ('control: under exclusion', (10000000, 0, 0), 0), ('control: ported exclusion', (20000000, 0, 5000000), 55600000),\n  ('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0)],\n [('regression credit-not-exclusion 1', (20000000, 0, 5000000), 55600000),\n  ('regression credit-not-exclusion 2', (5000000, 15000000, 0), 200000000),\n  ('partial repair guard 2', (8632782, 5000000, 0), 911280), ('control: modest', (1500000, 200000, 0), 0),\n  ('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),\n  ('control: with prior gifts', (10000000, 5000000, 0), 55600000)],\n [('regression credit-not-exclusion 1', (13610000, 15000000, 0), 544400000),\n  ('regression credit-not-exclusion 2', (8632782, 5000000, 0), 911280),\n  ('partial repair guard 1', (21431981, 500000, 0), 332879240),\n  ('partial repair guard 2', (13610000, 500000, 0), 20000000), ('control: large estate', (20000000, 0, 0), 255600000),\n  ('control: under exclusion', (10000000, 0, 0), 0), ('control: with prior gifts', (10000000, 5000000, 0), 55600000),\n  ('control: ported exclusion', (20000000, 0, 5000000), 55600000)],\n [('regression credit-not-exclusion 1', (788866, 18885032, 2000000), 31554640),\n  ('regression credit-not-exclusion 2', (21431981, 500000, 0), 332879240),\n  ('partial repair guard 1', (13610000, 5000000, 2000000), 120000000),\n  ('partial repair guard 2', (13610000, 5703648, 0), 228145920),\n  ('control: ported exclusion', (20000000, 0, 5000000), 55600000),\n  ('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0),\n  ('control: large estate', (20000000, 0, 0), 255600000)],\n [('regression credit-not-exclusion 1', (13610000, 500000, 0), 20000000),\n  ('regression credit-not-exclusion 2', (13610000, 5000000, 2000000), 120000000),\n  ('partial repair guard 1', (27783445, 500000, 5000000), 386937800),\n  ('partial repair guard 2', (22327855, 5000000, 2000000), 468714200),\n  ('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),\n  ('control: with prior gifts', (10000000, 5000000, 0), 55600000),\n  ('control: ported exclusion', (20000000, 0, 5000000), 55600000)]]\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-unified-transfer-credit-credit-not-exclusion","generated_at":"2026-09-29T14:47:06.704422+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.","repair":"The unified credit is the tentative tax on the exclusion amount.","root_cause":"The unified credit is set to the exclusion amount itself instead of the tax on it.","sha256":"7f3cbf9aa2d3527a048b8d57c33e0e8b444dbd00ee1c4a4ea24130d40ce5d696","title":"The exclusion amount is subtracted from the tax as if it were a credit · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":45.076,"exit_code":1,"observations":[{"actual":250180000,"check":"regression credit-not-exclusion 1","expected":255600000,"passed":false},{"actual":50180000,"check":"regression credit-not-exclusion 2","expected":55600000,"passed":false},{"actual":0,"check":"control: under exclusion","expected":0,"passed":true},{"actual":50180000,"check":"control: ported exclusion","expected":55600000,"passed":false},{"actual":200000000,"check":"control: gifts above exclusion","expected":200000000,"passed":true},{"actual":0,"check":"control: modest","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression credit-not-exclusion 1\", \"actual\": 250180000, \"expected\": 255600000, \"passed\": false}, {\"check\": \"regression credit-not-exclusion 2\", \"actual\": 50180000, \"expected\": 55600000, \"passed\": false}, {\"check\": \"control: under exclusion\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"control: ported exclusion\", \"actual\": 50180000, \"expected\": 55600000, \"passed\": false}, {\"check\": \"control: gifts above exclusion\", \"actual\": 200000000, \"expected\": 200000000, \"passed\": true}, {\"check\": \"control: modest\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.81,"exit_code":1,"observations":[{"actual":0,"check":"regression credit-not-exclusion 1","expected":255600000,"passed":false},{"actual":0,"check":"regression credit-not-exclusion 2","expected":55600000,"passed":false},{"actual":0,"check":"control: under exclusion","expected":0,"passed":true},{"actual":0,"check":"control: ported exclusion","expected":55600000,"passed":false},{"actual":0,"check":"control: gifts above exclusion","expected":200000000,"passed":false},{"actual":0,"check":"control: modest","expected":0,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression credit-not-exclusion 1\", \"actual\": 0, \"expected\": 255600000, \"passed\": false}, {\"check\": \"regression credit-not-exclusion 2\", \"actual\": 0, \"expected\": 55600000, \"passed\": false}, {\"check\": \"control: under exclusion\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"control: ported exclusion\", \"actual\": 0, \"expected\": 55600000, \"passed\": false}, {\"check\": \"control: gifts above exclusion\", \"actual\": 0, \"expected\": 200000000, \"passed\": false}, {\"check\": \"control: modest\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":44.718,"exit_code":0,"observations":[{"actual":255600000,"check":"regression credit-not-exclusion 1","expected":255600000,"passed":true},{"actual":55600000,"check":"regression credit-not-exclusion 2","expected":55600000,"passed":true},{"actual":0,"check":"control: under exclusion","expected":0,"passed":true},{"actual":55600000,"check":"control: ported exclusion","expected":55600000,"passed":true},{"actual":200000000,"check":"control: gifts above exclusion","expected":200000000,"passed":true},{"actual":0,"check":"control: modest","expected":0,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression credit-not-exclusion 1\", \"actual\": 255600000, \"expected\": 255600000, \"passed\": true}, {\"check\": \"regression credit-not-exclusion 2\", \"actual\": 55600000, \"expected\": 55600000, \"passed\": true}, {\"check\": \"control: under exclusion\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"control: ported exclusion\", \"actual\": 55600000, \"expected\": 55600000, \"passed\": true}, {\"check\": \"control: gifts above exclusion\", \"actual\": 200000000, \"expected\": 200000000, \"passed\": true}, {\"check\": \"control: modest\", \"actual\": 0, \"expected\": 0, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}