FA-62676 / Tax bracket computation / Open access
The deceased spouse's unused exclusion is ignored · case 01
A surviving spouse's estate pays tax as if no exclusion had been ported.
ROOT CAUSE
The exclusion omits dsue.
VERIFIED REPAIR
Add dsue to the exclusion before computing the credit.
Unsuccessful approach: Adding dsue dollars directly to the credit treats the ported exclusion as tax.
Case 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.
Why this case matters
Tax computations hinge on which slice, threshold, ordering and rounding rule applies at each step; a misplaced boundary silently misstates liabilities.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(estate, gifts, dsue):
def prog(x, br):
tax, lower = Fraction(0), 0
for upper, rate in br:
top = x if upper is None else min(x, upper)
if top > lower: tax += (top - lower) * Fraction(rate) / 100
if upper is None or x <= upper: break
lower = upper
return tax
def cents(v):
v = v * 100
return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))
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']]
T = lambda x: prog(x, sched)
credit = T(13610000)
tent = T(estate + gifts)
gift_credit = max(0, T(gifts) - credit)
return cents(max(0, tent - gift_credit - credit))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression ported-exclusion 1', (20000000, 0, 5000000), 55600000),
('regression ported-exclusion 2', (867406, 15000000, 5000000), 0),
('partial repair guard 2', (13610000, 5000000, 2000000), 120000000),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000)],
[('regression ported-exclusion 1', (13610000, 5000000, 2000000), 120000000),
('regression ported-exclusion 2', (27783445, 500000, 5000000), 386937800),
('partial repair guard 2', (22327855, 5000000, 2000000), 468714200),
('control: ported exclusion', (20000000, 0, 5000000), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0),
('control: large estate', (20000000, 0, 0), 255600000)],
[('regression ported-exclusion 1', (22327855, 5000000, 2000000), 468714200),
('regression ported-exclusion 2', (13610000, 5000000, 5000000), 0),
('partial repair guard 1', (24200909, 15000000, 2000000), 943636360),
('partial repair guard 2', (28075997, 5000000, 5000000), 578639880),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: ported exclusion', (20000000, 0, 5000000), 55600000)],
[('regression ported-exclusion 1', (24200909, 15000000, 2000000), 943636360),
('regression ported-exclusion 2', (28075997, 5000000, 5000000), 578639880),
('partial repair guard 1', (21824496, 5000000, 5000000), 328579840),
('partial repair guard 2', (19264731, 0, 2000000), 146189240),
('control: ported exclusion', (20000000, 0, 5000000), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0),
('control: large estate', (20000000, 0, 0), 255600000)],
[('regression ported-exclusion 1', (21824496, 5000000, 5000000), 328579840),
('regression ported-exclusion 2', (19264731, 0, 2000000), 146189240),
('partial repair guard 1', (29904698, 15000000, 2000000), 1171787920),
('partial repair guard 2', (9658783, 13906347, 2000000), 318205200),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: ported exclusion', (20000000, 0, 5000000), 55600000)]]
for label, args, expected in cases[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression ported-exclusion 1 | 255600000 | 55600000 | Failed |
| regression ported-exclusion 2 | 34696240 | 0 | Failed |
| partial repair guard 2 | 200000000 | 120000000 | Failed |
| control: large estate | 255600000 | 255600000 | Passed |
| control: under exclusion | 0 | 0 | Passed |
| control: with prior gifts | 55600000 | 55600000 | Passed |
| control: gifts above exclusion | 200000000 | 200000000 | Passed |
SHA-256 / 5beeb384cf27b23ce9f0a429787d5d089a41f8f4af5d191d5d5a2b2fa1c73cc2
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(estate, gifts, dsue):
def prog(x, br):
tax, lower = Fraction(0), 0
for upper, rate in br:
top = x if upper is None else min(x, upper)
if top > lower: tax += (top - lower) * Fraction(rate) / 100
if upper is None or x <= upper: break
lower = upper
return tax
def cents(v):
v = v * 100
return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))
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']]
T = lambda x: prog(x, sched)
credit = T(13610000) + dsue
tent = T(estate + gifts)
gift_credit = max(0, T(gifts) - credit)
return cents(max(0, tent - gift_credit - credit))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression ported-exclusion 1', (20000000, 0, 5000000), 55600000),
('regression ported-exclusion 2', (867406, 15000000, 5000000), 0),
('partial repair guard 2', (13610000, 5000000, 2000000), 120000000),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000)],
[('regression ported-exclusion 1', (13610000, 5000000, 2000000), 120000000),
('regression ported-exclusion 2', (27783445, 500000, 5000000), 386937800),
('partial repair guard 2', (22327855, 5000000, 2000000), 468714200),
('control: ported exclusion', (20000000, 0, 5000000), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0),
('control: large estate', (20000000, 0, 0), 255600000)],
[('regression ported-exclusion 1', (22327855, 5000000, 2000000), 468714200),
('regression ported-exclusion 2', (13610000, 5000000, 5000000), 0),
('partial repair guard 1', (24200909, 15000000, 2000000), 943636360),
('partial repair guard 2', (28075997, 5000000, 5000000), 578639880),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: ported exclusion', (20000000, 0, 5000000), 55600000)],
[('regression ported-exclusion 1', (24200909, 15000000, 2000000), 943636360),
('regression ported-exclusion 2', (28075997, 5000000, 5000000), 578639880),
('partial repair guard 1', (21824496, 5000000, 5000000), 328579840),
('partial repair guard 2', (19264731, 0, 2000000), 146189240),
('control: ported exclusion', (20000000, 0, 5000000), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0),
('control: large estate', (20000000, 0, 0), 255600000)],
[('regression ported-exclusion 1', (21824496, 5000000, 5000000), 328579840),
('regression ported-exclusion 2', (19264731, 0, 2000000), 146189240),
('partial repair guard 1', (29904698, 15000000, 2000000), 1171787920),
('partial repair guard 2', (9658783, 13906347, 2000000), 318205200),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: ported exclusion', (20000000, 0, 5000000), 55600000)]]
for label, args, expected in cases[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression ported-exclusion 1 | 0 | 55600000 | Failed |
| regression ported-exclusion 2 | 0 | 0 | Passed |
| partial repair guard 2 | 0 | 120000000 | Failed |
| control: large estate | 255600000 | 255600000 | Passed |
| control: under exclusion | 0 | 0 | Passed |
| control: with prior gifts | 55600000 | 55600000 | Passed |
| control: gifts above exclusion | 200000000 | 200000000 | Passed |
SHA-256 / 077c1d1ec3b4f7bf0f52ff9f35eb31dd30d6b58df23e71163743cc9b349143c3
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(estate, gifts, dsue):
def prog(x, br):
tax, lower = Fraction(0), 0
for upper, rate in br:
top = x if upper is None else min(x, upper)
if top > lower: tax += (top - lower) * Fraction(rate) / 100
if upper is None or x <= upper: break
lower = upper
return tax
def cents(v):
v = v * 100
return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))
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']]
T = lambda x: prog(x, sched)
credit = T(13610000 + dsue)
tent = T(estate + gifts)
gift_credit = max(0, T(gifts) - credit)
return cents(max(0, tent - gift_credit - credit))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression ported-exclusion 1', (20000000, 0, 5000000), 55600000),
('regression ported-exclusion 2', (867406, 15000000, 5000000), 0),
('partial repair guard 2', (13610000, 5000000, 2000000), 120000000),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000)],
[('regression ported-exclusion 1', (13610000, 5000000, 2000000), 120000000),
('regression ported-exclusion 2', (27783445, 500000, 5000000), 386937800),
('partial repair guard 2', (22327855, 5000000, 2000000), 468714200),
('control: ported exclusion', (20000000, 0, 5000000), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0),
('control: large estate', (20000000, 0, 0), 255600000)],
[('regression ported-exclusion 1', (22327855, 5000000, 2000000), 468714200),
('regression ported-exclusion 2', (13610000, 5000000, 5000000), 0),
('partial repair guard 1', (24200909, 15000000, 2000000), 943636360),
('partial repair guard 2', (28075997, 5000000, 5000000), 578639880),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: ported exclusion', (20000000, 0, 5000000), 55600000)],
[('regression ported-exclusion 1', (24200909, 15000000, 2000000), 943636360),
('regression ported-exclusion 2', (28075997, 5000000, 5000000), 578639880),
('partial repair guard 1', (21824496, 5000000, 5000000), 328579840),
('partial repair guard 2', (19264731, 0, 2000000), 146189240),
('control: ported exclusion', (20000000, 0, 5000000), 55600000),
('control: gifts above exclusion', (5000000, 15000000, 0), 200000000), ('control: modest', (1500000, 200000, 0), 0),
('control: large estate', (20000000, 0, 0), 255600000)],
[('regression ported-exclusion 1', (21824496, 5000000, 5000000), 328579840),
('regression ported-exclusion 2', (19264731, 0, 2000000), 146189240),
('partial repair guard 1', (29904698, 15000000, 2000000), 1171787920),
('partial repair guard 2', (9658783, 13906347, 2000000), 318205200),
('control: large estate', (20000000, 0, 0), 255600000), ('control: under exclusion', (10000000, 0, 0), 0),
('control: with prior gifts', (10000000, 5000000, 0), 55600000),
('control: ported exclusion', (20000000, 0, 5000000), 55600000)]]
for label, args, expected in cases[N - 1]:
check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression ported-exclusion 1 | 55600000 | 55600000 | Passed |
| regression ported-exclusion 2 | 0 | 0 | Passed |
| partial repair guard 2 | 120000000 | 120000000 | Passed |
| control: large estate | 255600000 | 255600000 | Passed |
| control: under exclusion | 0 | 0 | Passed |
| control: with prior gifts | 55600000 | 55600000 | Passed |
| control: gifts above exclusion | 200000000 | 200000000 | Passed |
SHA-256 / 802ec4448976d534fb92df3895bee07388c491a29d965a97108aeb5c1f27857e
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:47:06.860061+00:00.
Case digest / 758edc25b4955cb3429a71c3a601fdb55c774bedc0ceada9e22f0d176f1bcc8f