FA-62536 / Tax bracket computation / Open access
A fully phased-out exemption turns negative and inflates the AMT base · case 01
Very high AMTI yields a base larger than AMTI itself.
ROOT CAUSE
The reduced exemption is not floored at 0.
VERIFIED REPAIR
Floor the exemption at 0.
Unsuccessful approach: Zeroing the exemption only above twice the threshold still leaves negative exemptions in between.
Case contract
solve(amti, regular_cents, status): stipulated AMT, whole dollars. Exemption: single 85700 (phase-out threshold 609350), mfj 133300 (threshold 1218700). The exemption is reduced by 25% of AMTI above the threshold, with the reduction rounded down to whole dollars, never below 0. Base = max(0, amti - exemption). Tentative minimum tax = 26% of base up to 232600 plus 28% of base above 232600 (in cents: dollars times percent). AMT = max(0, TMT - regular tax). Return [exemption, tmt_cents, amt_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
N = 1
observations = []
def solve(amti, regular_cents, status):
ex, thr = {'single': (85700, 609350), 'mfj': (133300, 1218700)}[status]
if amti > thr: ex = ex - (amti - thr) // 4
base = max(0, amti - ex)
tmt = min(base, 232600) * 26 + max(0, base - 232600) * 28
return [ex, tmt, max(0, tmt - regular_cents)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression exemption-floor 1', (1000000, 99999999, 'single'), [0, 27534800, 0]),
('regression exemption-floor 2', (1526866, 0, 'single'), [0, 42287048, 42287048]),
('partial repair guard 2', (1779652, 0, 'mfj'), [0, 49365056, 49365056]),
('control: moderate single', (200000, 2500000, 'single'), [85700, 2971800, 471800]),
('control: partial phase-out', (700000, 0, 'single'), [63038, 17369736, 17369736]),
('control: below exemption', (100000, 0, 'mfj'), [133300, 0, 0]),
('control: odd excess', (609353, 5000000, 'single'), [85700, 14197084, 9197084])],
[('regression exemption-floor 1', (1694256, 2500000, 'single'), [0, 46973968, 44473968]),
('regression exemption-floor 2', (1779652, 0, 'mfj'), [0, 49365056, 49365056]),
('partial repair guard 1', (959971, 10000000, 'single'), [0, 26413988, 16413988]),
('partial repair guard 2', (985171, 10000000, 'single'), [0, 27119588, 17119588]),
('control: below exemption', (100000, 0, 'mfj'), [133300, 0, 0]),
('control: odd excess', (609353, 5000000, 'single'), [85700, 14197084, 9197084]),
('control: joint high', (1300000, 30000000, 'mfj'), [112975, 32771500, 2771500]),
('control: rate break', (400000, 0, 'mfj'), [133300, 7002400, 7002400])],
[('regression exemption-floor 1', (959971, 10000000, 'single'), [0, 26413988, 16413988]),
('regression exemption-floor 2', (1689832, 2500000, 'single'), [0, 46850096, 44350096]),
('partial repair guard 1', (1130943, 0, 'single'), [0, 31201204, 31201204]),
('partial repair guard 2', (981886, 10000000, 'single'), [0, 27027608, 17027608]),
('control: rate break', (400000, 0, 'mfj'), [133300, 7002400, 7002400]),
('control: moderate single', (200000, 2500000, 'single'), [85700, 2971800, 471800]),
('control: partial phase-out', (700000, 0, 'single'), [63038, 17369736, 17369736]),
('control: no exemption left', (1000000, 99999999, 'single'), [0, 27534800, 0])],
[('regression exemption-floor 1', (1444926, 0, 'single'), [0, 39992728, 39992728]),
('regression exemption-floor 2', (1318587, 0, 'single'), [0, 36455236, 36455236]),
('partial repair guard 1', (975205, 0, 'single'), [0, 26840540, 26840540]),
('partial repair guard 2', (970054, 2500000, 'single'), [0, 26696312, 24196312]),
('control: no exemption left', (1000000, 99999999, 'single'), [0, 27534800, 0]),
('control: below exemption', (100000, 0, 'mfj'), [133300, 0, 0]),
('control: odd excess', (609353, 5000000, 'single'), [85700, 14197084, 9197084]),
('control: joint high', (1300000, 30000000, 'mfj'), [112975, 32771500, 2771500])],
[('regression exemption-floor 1', (1233164, 34995277, 'single'), [0, 34063392, 0]),
('regression exemption-floor 2', (1417848, 2500000, 'single'), [0, 39234544, 36734544]),
('partial repair guard 1', (1068993, 10000000, 'single'), [0, 29466604, 19466604]),
('partial repair guard 2', (1201655, 19779950, 'single'), [0, 33181140, 13401190]),
('control: joint high', (1300000, 30000000, 'mfj'), [112975, 32771500, 2771500]),
('control: rate break', (400000, 0, 'mfj'), [133300, 7002400, 7002400]),
('control: moderate single', (200000, 2500000, 'single'), [85700, 2971800, 471800]),
('control: partial phase-out', (700000, 0, 'single'), [63038, 17369736, 17369736])]]
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 exemption-floor 1 | [-11962, 27869736, 0] | [0, 27534800, 0] | Failed |
| regression exemption-floor 2 | [-143679, 46310060, 46310060] | [0, 42287048, 42287048] | Failed |
| partial repair guard 2 | [-6938, 49559320, 49559320] | [0, 49365056, 49365056] | Failed |
| control: moderate single | [85700, 2971800, 471800] | [85700, 2971800, 471800] | Passed |
| control: partial phase-out | [63038, 17369736, 17369736] | [63038, 17369736, 17369736] | Passed |
| control: below exemption | [133300, 0, 0] | [133300, 0, 0] | Passed |
| control: odd excess | [85700, 14197084, 9197084] | [85700, 14197084, 9197084] | Passed |
SHA-256 / cbeeffe2929f3240a18fe6c757580c60f0f5598f44bb7b9de715532f45246378
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(amti, regular_cents, status):
ex, thr = {'single': (85700, 609350), 'mfj': (133300, 1218700)}[status]
if amti > thr: ex = 0 if amti > 2 * thr else ex - (amti - thr) // 4
base = max(0, amti - ex)
tmt = min(base, 232600) * 26 + max(0, base - 232600) * 28
return [ex, tmt, max(0, tmt - regular_cents)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression exemption-floor 1', (1000000, 99999999, 'single'), [0, 27534800, 0]),
('regression exemption-floor 2', (1526866, 0, 'single'), [0, 42287048, 42287048]),
('partial repair guard 2', (1779652, 0, 'mfj'), [0, 49365056, 49365056]),
('control: moderate single', (200000, 2500000, 'single'), [85700, 2971800, 471800]),
('control: partial phase-out', (700000, 0, 'single'), [63038, 17369736, 17369736]),
('control: below exemption', (100000, 0, 'mfj'), [133300, 0, 0]),
('control: odd excess', (609353, 5000000, 'single'), [85700, 14197084, 9197084])],
[('regression exemption-floor 1', (1694256, 2500000, 'single'), [0, 46973968, 44473968]),
('regression exemption-floor 2', (1779652, 0, 'mfj'), [0, 49365056, 49365056]),
('partial repair guard 1', (959971, 10000000, 'single'), [0, 26413988, 16413988]),
('partial repair guard 2', (985171, 10000000, 'single'), [0, 27119588, 17119588]),
('control: below exemption', (100000, 0, 'mfj'), [133300, 0, 0]),
('control: odd excess', (609353, 5000000, 'single'), [85700, 14197084, 9197084]),
('control: joint high', (1300000, 30000000, 'mfj'), [112975, 32771500, 2771500]),
('control: rate break', (400000, 0, 'mfj'), [133300, 7002400, 7002400])],
[('regression exemption-floor 1', (959971, 10000000, 'single'), [0, 26413988, 16413988]),
('regression exemption-floor 2', (1689832, 2500000, 'single'), [0, 46850096, 44350096]),
('partial repair guard 1', (1130943, 0, 'single'), [0, 31201204, 31201204]),
('partial repair guard 2', (981886, 10000000, 'single'), [0, 27027608, 17027608]),
('control: rate break', (400000, 0, 'mfj'), [133300, 7002400, 7002400]),
('control: moderate single', (200000, 2500000, 'single'), [85700, 2971800, 471800]),
('control: partial phase-out', (700000, 0, 'single'), [63038, 17369736, 17369736]),
('control: no exemption left', (1000000, 99999999, 'single'), [0, 27534800, 0])],
[('regression exemption-floor 1', (1444926, 0, 'single'), [0, 39992728, 39992728]),
('regression exemption-floor 2', (1318587, 0, 'single'), [0, 36455236, 36455236]),
('partial repair guard 1', (975205, 0, 'single'), [0, 26840540, 26840540]),
('partial repair guard 2', (970054, 2500000, 'single'), [0, 26696312, 24196312]),
('control: no exemption left', (1000000, 99999999, 'single'), [0, 27534800, 0]),
('control: below exemption', (100000, 0, 'mfj'), [133300, 0, 0]),
('control: odd excess', (609353, 5000000, 'single'), [85700, 14197084, 9197084]),
('control: joint high', (1300000, 30000000, 'mfj'), [112975, 32771500, 2771500])],
[('regression exemption-floor 1', (1233164, 34995277, 'single'), [0, 34063392, 0]),
('regression exemption-floor 2', (1417848, 2500000, 'single'), [0, 39234544, 36734544]),
('partial repair guard 1', (1068993, 10000000, 'single'), [0, 29466604, 19466604]),
('partial repair guard 2', (1201655, 19779950, 'single'), [0, 33181140, 13401190]),
('control: joint high', (1300000, 30000000, 'mfj'), [112975, 32771500, 2771500]),
('control: rate break', (400000, 0, 'mfj'), [133300, 7002400, 7002400]),
('control: moderate single', (200000, 2500000, 'single'), [85700, 2971800, 471800]),
('control: partial phase-out', (700000, 0, 'single'), [63038, 17369736, 17369736])]]
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 exemption-floor 1 | [-11962, 27869736, 0] | [0, 27534800, 0] | Failed |
| regression exemption-floor 2 | [0, 42287048, 42287048] | [0, 42287048, 42287048] | Passed |
| partial repair guard 2 | [-6938, 49559320, 49559320] | [0, 49365056, 49365056] | Failed |
| control: moderate single | [85700, 2971800, 471800] | [85700, 2971800, 471800] | Passed |
| control: partial phase-out | [63038, 17369736, 17369736] | [63038, 17369736, 17369736] | Passed |
| control: below exemption | [133300, 0, 0] | [133300, 0, 0] | Passed |
| control: odd excess | [85700, 14197084, 9197084] | [85700, 14197084, 9197084] | Passed |
SHA-256 / 04076993a483e889b23881989a48c43f38d57d3d628e54ec295a50f404acaf07
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(amti, regular_cents, status):
ex, thr = {'single': (85700, 609350), 'mfj': (133300, 1218700)}[status]
if amti > thr: ex = max(0, ex - (amti - thr) // 4)
base = max(0, amti - ex)
tmt = min(base, 232600) * 26 + max(0, base - 232600) * 28
return [ex, tmt, max(0, tmt - regular_cents)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression exemption-floor 1', (1000000, 99999999, 'single'), [0, 27534800, 0]),
('regression exemption-floor 2', (1526866, 0, 'single'), [0, 42287048, 42287048]),
('partial repair guard 2', (1779652, 0, 'mfj'), [0, 49365056, 49365056]),
('control: moderate single', (200000, 2500000, 'single'), [85700, 2971800, 471800]),
('control: partial phase-out', (700000, 0, 'single'), [63038, 17369736, 17369736]),
('control: below exemption', (100000, 0, 'mfj'), [133300, 0, 0]),
('control: odd excess', (609353, 5000000, 'single'), [85700, 14197084, 9197084])],
[('regression exemption-floor 1', (1694256, 2500000, 'single'), [0, 46973968, 44473968]),
('regression exemption-floor 2', (1779652, 0, 'mfj'), [0, 49365056, 49365056]),
('partial repair guard 1', (959971, 10000000, 'single'), [0, 26413988, 16413988]),
('partial repair guard 2', (985171, 10000000, 'single'), [0, 27119588, 17119588]),
('control: below exemption', (100000, 0, 'mfj'), [133300, 0, 0]),
('control: odd excess', (609353, 5000000, 'single'), [85700, 14197084, 9197084]),
('control: joint high', (1300000, 30000000, 'mfj'), [112975, 32771500, 2771500]),
('control: rate break', (400000, 0, 'mfj'), [133300, 7002400, 7002400])],
[('regression exemption-floor 1', (959971, 10000000, 'single'), [0, 26413988, 16413988]),
('regression exemption-floor 2', (1689832, 2500000, 'single'), [0, 46850096, 44350096]),
('partial repair guard 1', (1130943, 0, 'single'), [0, 31201204, 31201204]),
('partial repair guard 2', (981886, 10000000, 'single'), [0, 27027608, 17027608]),
('control: rate break', (400000, 0, 'mfj'), [133300, 7002400, 7002400]),
('control: moderate single', (200000, 2500000, 'single'), [85700, 2971800, 471800]),
('control: partial phase-out', (700000, 0, 'single'), [63038, 17369736, 17369736]),
('control: no exemption left', (1000000, 99999999, 'single'), [0, 27534800, 0])],
[('regression exemption-floor 1', (1444926, 0, 'single'), [0, 39992728, 39992728]),
('regression exemption-floor 2', (1318587, 0, 'single'), [0, 36455236, 36455236]),
('partial repair guard 1', (975205, 0, 'single'), [0, 26840540, 26840540]),
('partial repair guard 2', (970054, 2500000, 'single'), [0, 26696312, 24196312]),
('control: no exemption left', (1000000, 99999999, 'single'), [0, 27534800, 0]),
('control: below exemption', (100000, 0, 'mfj'), [133300, 0, 0]),
('control: odd excess', (609353, 5000000, 'single'), [85700, 14197084, 9197084]),
('control: joint high', (1300000, 30000000, 'mfj'), [112975, 32771500, 2771500])],
[('regression exemption-floor 1', (1233164, 34995277, 'single'), [0, 34063392, 0]),
('regression exemption-floor 2', (1417848, 2500000, 'single'), [0, 39234544, 36734544]),
('partial repair guard 1', (1068993, 10000000, 'single'), [0, 29466604, 19466604]),
('partial repair guard 2', (1201655, 19779950, 'single'), [0, 33181140, 13401190]),
('control: joint high', (1300000, 30000000, 'mfj'), [112975, 32771500, 2771500]),
('control: rate break', (400000, 0, 'mfj'), [133300, 7002400, 7002400]),
('control: moderate single', (200000, 2500000, 'single'), [85700, 2971800, 471800]),
('control: partial phase-out', (700000, 0, 'single'), [63038, 17369736, 17369736])]]
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 exemption-floor 1 | [0, 27534800, 0] | [0, 27534800, 0] | Passed |
| regression exemption-floor 2 | [0, 42287048, 42287048] | [0, 42287048, 42287048] | Passed |
| partial repair guard 2 | [0, 49365056, 49365056] | [0, 49365056, 49365056] | Passed |
| control: moderate single | [85700, 2971800, 471800] | [85700, 2971800, 471800] | Passed |
| control: partial phase-out | [63038, 17369736, 17369736] | [63038, 17369736, 17369736] | Passed |
| control: below exemption | [133300, 0, 0] | [133300, 0, 0] | Passed |
| control: odd excess | [85700, 14197084, 9197084] | [85700, 14197084, 9197084] | Passed |
SHA-256 / af1b4d3f3ee52630c67dc3dc7925a1ec7231bda4550196ac015e4dd3e9049e0f
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:05.572601+00:00.
Case digest / a718bdfb1c50da42dc9946867a2cafa256cbede811d4fb3e3209b8e1f9784cfe