{"abstract":"Estates with modest prior gifts are charged extra tax.","category":"Tax bracket computation","checks":7,"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.","contract_signature":"estate, gifts, dsue","evaluation_group":"w2-tax_bracket_computation-unified-transfer-credit","failed_approach":"Flooring the gift credit but computing it against the exclusion without dsue still misstates ported estates.","family":"w2-tax_bracket_computation-unified-transfer-credit-gift-credit-floor","id":"FA-62681","implementations":{"attempt":{"sha256":"a339300ea376522c22395d5b11c96c718b05b35d035d8557394d213bf56003cd","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) - T(13610000))\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 gift-credit-floor 1', (10000000, 5000000, 0), 55600000),\n  ('regression gift-credit-floor 2', (20000000, 15000000, 5000000), 655600000),\n  ('partial repair guard 2', (788866, 18885032, 2000000), 31554640),\n  ('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),\n  ('control: ported exclusion', (20000000, 0, 5000000), 55600000),\n  ('control: gifts above exclusion', (5000000, 15000000, 0), 200000000)],\n [('regression gift-credit-floor 1', (20000000, 0, 0), 255600000),\n  ('regression gift-credit-floor 2', (10000000, 0, 0), 0),\n  ('partial repair guard 1', (24200909, 15000000, 2000000), 943636360),\n  ('partial repair guard 2', (29904698, 15000000, 2000000), 1171787920),\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: with prior gifts', (10000000, 5000000, 0), 55600000)],\n [('regression gift-credit-floor 1', (20000000, 0, 5000000), 55600000),\n  ('regression gift-credit-floor 2', (1500000, 200000, 0), 0),\n  ('partial repair guard 1', (9658783, 13906347, 2000000), 318205200),\n  ('partial repair guard 2', (4581029, 15000000, 2000000), 158841160),\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: gifts above exclusion', (5000000, 15000000, 0), 200000000)],\n [('regression gift-credit-floor 1', (8632782, 5000000, 0), 911280),\n  ('regression gift-credit-floor 2', (867406, 15000000, 5000000), 0),\n  ('partial repair guard 1', (9508183, 15052168, 2000000), 358014040),\n  ('partial repair guard 2', (13610000, 15000000, 2000000), 520000000),\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 gift-credit-floor 1', (13610000, 0, 5000000), 0),\n  ('regression gift-credit-floor 2', (13610000, 0, 2000000), 0),\n  ('partial repair guard 1', (11491956, 15200265, 5000000), 323288840),\n  ('partial repair guard 2', (13610000, 16727076, 2000000), 544400000),\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":"5543f372b6f617eee6974a7bc3d90b2d987248a21edc9210606cdb38ba8ada8a","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 = 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 gift-credit-floor 1', (10000000, 5000000, 0), 55600000),\n  ('regression gift-credit-floor 2', (20000000, 15000000, 5000000), 655600000),\n  ('partial repair guard 2', (788866, 18885032, 2000000), 31554640),\n  ('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),\n  ('control: ported exclusion', (20000000, 0, 5000000), 55600000),\n  ('control: gifts above exclusion', (5000000, 15000000, 0), 200000000)],\n [('regression gift-credit-floor 1', (20000000, 0, 0), 255600000),\n  ('regression gift-credit-floor 2', (10000000, 0, 0), 0),\n  ('partial repair guard 1', (24200909, 15000000, 2000000), 943636360),\n  ('partial repair guard 2', (29904698, 15000000, 2000000), 1171787920),\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: with prior gifts', (10000000, 5000000, 0), 55600000)],\n [('regression gift-credit-floor 1', (20000000, 0, 5000000), 55600000),\n  ('regression gift-credit-floor 2', (1500000, 200000, 0), 0),\n  ('partial repair guard 1', (9658783, 13906347, 2000000), 318205200),\n  ('partial repair guard 2', (4581029, 15000000, 2000000), 158841160),\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: gifts above exclusion', (5000000, 15000000, 0), 200000000)],\n [('regression gift-credit-floor 1', (8632782, 5000000, 0), 911280),\n  ('regression gift-credit-floor 2', (867406, 15000000, 5000000), 0),\n  ('partial repair guard 1', (9508183, 15052168, 2000000), 358014040),\n  ('partial repair guard 2', (13610000, 15000000, 2000000), 520000000),\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 gift-credit-floor 1', (13610000, 0, 5000000), 0),\n  ('regression gift-credit-floor 2', (13610000, 0, 2000000), 0),\n  ('partial repair guard 1', (11491956, 15200265, 5000000), 323288840),\n  ('partial repair guard 2', (13610000, 16727076, 2000000), 544400000),\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-gift-credit-floor","generated_at":"2026-09-29T14:47:06.897210+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":"The gift credit is T(gifts) - credit without a floor at zero.","sha256":"31ffcb0f44e3a539b21e9cd3743bf277b919c98fa562fc5d8a909aa3dd536edd","title":"Prior gifts below the exclusion produce a negative gift 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":45.524,"exit_code":1,"observations":[{"actual":55600000,"check":"regression gift-credit-floor 1","expected":55600000,"passed":true},{"actual":600000000,"check":"regression gift-credit-floor 2","expected":655600000,"passed":false},{"actual":0,"check":"partial repair guard 2","expected":31554640,"passed":false},{"actual":255600000,"check":"control: large estate","expected":255600000,"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}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression gift-credit-floor 1\", \"actual\": 55600000, \"expected\": 55600000, \"passed\": true}, {\"check\": \"regression gift-credit-floor 2\", \"actual\": 600000000, \"expected\": 655600000, \"passed\": false}, {\"check\": \"partial repair guard 2\", \"actual\": 0, \"expected\": 31554640, \"passed\": false}, {\"check\": \"control: large estate\", \"actual\": 255600000, \"expected\": 255600000, \"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}], \"passed\": false}\n"},"broken":{"elapsed_ms":47.24,"exit_code":1,"observations":[{"actual":400000000,"check":"regression gift-credit-floor 1","expected":55600000,"passed":false},{"actual":800000000,"check":"regression gift-credit-floor 2","expected":655600000,"passed":false},{"actual":31554640,"check":"partial repair guard 2","expected":31554640,"passed":true},{"actual":794580000,"check":"control: large estate","expected":255600000,"passed":false},{"actual":394580000,"check":"control: under exclusion","expected":0,"passed":false},{"actual":794580000,"check":"control: ported exclusion","expected":55600000,"passed":false},{"actual":200000000,"check":"control: gifts above exclusion","expected":200000000,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression gift-credit-floor 1\", \"actual\": 400000000, \"expected\": 55600000, \"passed\": false}, {\"check\": \"regression gift-credit-floor 2\", \"actual\": 800000000, \"expected\": 655600000, \"passed\": false}, {\"check\": \"partial repair guard 2\", \"actual\": 31554640, \"expected\": 31554640, \"passed\": true}, {\"check\": \"control: large estate\", \"actual\": 794580000, \"expected\": 255600000, \"passed\": false}, {\"check\": \"control: under exclusion\", \"actual\": 394580000, \"expected\": 0, \"passed\": false}, {\"check\": \"control: ported exclusion\", \"actual\": 794580000, \"expected\": 55600000, \"passed\": false}, {\"check\": \"control: gifts above exclusion\", \"actual\": 200000000, \"expected\": 200000000, \"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."}}