FA-62551 / Tax bracket computation / Open access
The exemption reduction is rounded to the nearest dollar · case 01
The exemption is a dollar lower than stipulated for some excess amounts.
ROOT CAUSE
The quarter reduction is rounded half-up instead of down.
VERIFIED REPAIR
Round the reduction down (floor division).
Unsuccessful approach: Rounding the reduction up removes up to a dollar too much.
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 = max(0, ex - (amti - thr + 2) // 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 reduction-rounding 1', (609353, 5000000, 'single'), [85700, 14197084, 9197084]),
('regression reduction-rounding 2', (700000, 0, 'single'), [63038, 17369736, 17369736]),
('partial repair guard 2', (609351, 0, 'single'), [85700, 14197028, 14197028]),
('control: moderate single', (200000, 2500000, 'single'), [85700, 2971800, 471800]),
('control: no exemption left', (1000000, 99999999, 'single'), [0, 27534800, 0]),
('control: below exemption', (100000, 0, 'mfj'), [133300, 0, 0]),
('control: joint high', (1300000, 30000000, 'mfj'), [112975, 32771500, 2771500])],
[('regression reduction-rounding 1', (832985, 0, 'single'), [29792, 22024204, 22024204]),
('regression reduction-rounding 2', (932132, 2500000, 'single'), [5005, 25494356, 22994356]),
('partial repair guard 1', (700000, 0, 'single'), [63038, 17369736, 17369736]),
('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 reduction-rounding 1', (625793, 19280708, 'single'), [81590, 14772484, 0]),
('regression reduction-rounding 2', (1622278, 2500000, 'mfj'), [32406, 44051216, 41551216]),
('partial repair guard 1', (633603, 10000000, 'single'), [79637, 15045848, 5045848]),
('partial repair guard 2', (853491, 0, 'single'), [24665, 22741928, 22741928]),
('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 reduction-rounding 1', (1346318, 26048839, 'mfj'), [101396, 34392616, 8343777]),
('regression reduction-rounding 2', (1429526, 0, 'mfj'), [80594, 37304896, 37304896]),
('partial repair guard 1', (730275, 2500000, 'single'), [55469, 18429368, 15929368]),
('partial repair guard 2', (932132, 2500000, 'single'), [5005, 25494356, 22994356]),
('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 reduction-rounding 1', (1242587, 0, 'mfj'), [127329, 30762024, 30762024]),
('regression reduction-rounding 2', (1233419, 2500000, 'mfj'), [129621, 30441144, 27941144]),
('partial repair guard 1', (867815, 3084875, 'single'), [21084, 23243268, 20158393]),
('partial repair guard 2', (1605745, 31630075, 'mfj'), [36539, 43472568, 11842493]),
('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 reduction-rounding 1 | [85699, 14197112, 9197112] | [85700, 14197084, 9197084] | Failed |
| regression reduction-rounding 2 | [63037, 17369764, 17369764] | [63038, 17369736, 17369736] | Failed |
| partial repair guard 2 | [85700, 14197028, 14197028] | [85700, 14197028, 14197028] | Passed |
| control: moderate single | [85700, 2971800, 471800] | [85700, 2971800, 471800] | Passed |
| control: no exemption left | [0, 27534800, 0] | [0, 27534800, 0] | Passed |
| control: below exemption | [133300, 0, 0] | [133300, 0, 0] | Passed |
| control: joint high | [112975, 32771500, 2771500] | [112975, 32771500, 2771500] | Passed |
SHA-256 / 883b11b852f71206d90867d6d4cb444da320797fffeb84ffb5e52a7eaccec01a
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 = 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 reduction-rounding 1', (609353, 5000000, 'single'), [85700, 14197084, 9197084]),
('regression reduction-rounding 2', (700000, 0, 'single'), [63038, 17369736, 17369736]),
('partial repair guard 2', (609351, 0, 'single'), [85700, 14197028, 14197028]),
('control: moderate single', (200000, 2500000, 'single'), [85700, 2971800, 471800]),
('control: no exemption left', (1000000, 99999999, 'single'), [0, 27534800, 0]),
('control: below exemption', (100000, 0, 'mfj'), [133300, 0, 0]),
('control: joint high', (1300000, 30000000, 'mfj'), [112975, 32771500, 2771500])],
[('regression reduction-rounding 1', (832985, 0, 'single'), [29792, 22024204, 22024204]),
('regression reduction-rounding 2', (932132, 2500000, 'single'), [5005, 25494356, 22994356]),
('partial repair guard 1', (700000, 0, 'single'), [63038, 17369736, 17369736]),
('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 reduction-rounding 1', (625793, 19280708, 'single'), [81590, 14772484, 0]),
('regression reduction-rounding 2', (1622278, 2500000, 'mfj'), [32406, 44051216, 41551216]),
('partial repair guard 1', (633603, 10000000, 'single'), [79637, 15045848, 5045848]),
('partial repair guard 2', (853491, 0, 'single'), [24665, 22741928, 22741928]),
('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 reduction-rounding 1', (1346318, 26048839, 'mfj'), [101396, 34392616, 8343777]),
('regression reduction-rounding 2', (1429526, 0, 'mfj'), [80594, 37304896, 37304896]),
('partial repair guard 1', (730275, 2500000, 'single'), [55469, 18429368, 15929368]),
('partial repair guard 2', (932132, 2500000, 'single'), [5005, 25494356, 22994356]),
('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 reduction-rounding 1', (1242587, 0, 'mfj'), [127329, 30762024, 30762024]),
('regression reduction-rounding 2', (1233419, 2500000, 'mfj'), [129621, 30441144, 27941144]),
('partial repair guard 1', (867815, 3084875, 'single'), [21084, 23243268, 20158393]),
('partial repair guard 2', (1605745, 31630075, 'mfj'), [36539, 43472568, 11842493]),
('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 reduction-rounding 1 | [85699, 14197112, 9197112] | [85700, 14197084, 9197084] | Failed |
| regression reduction-rounding 2 | [63037, 17369764, 17369764] | [63038, 17369736, 17369736] | Failed |
| partial repair guard 2 | [85699, 14197056, 14197056] | [85700, 14197028, 14197028] | Failed |
| control: moderate single | [85700, 2971800, 471800] | [85700, 2971800, 471800] | Passed |
| control: no exemption left | [0, 27534800, 0] | [0, 27534800, 0] | Passed |
| control: below exemption | [133300, 0, 0] | [133300, 0, 0] | Passed |
| control: joint high | [112975, 32771500, 2771500] | [112975, 32771500, 2771500] | Passed |
SHA-256 / a79591596c6da12b5546818c2de7a1ca8e4ac6e19baa319611dd834822ffc16c
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 reduction-rounding 1', (609353, 5000000, 'single'), [85700, 14197084, 9197084]),
('regression reduction-rounding 2', (700000, 0, 'single'), [63038, 17369736, 17369736]),
('partial repair guard 2', (609351, 0, 'single'), [85700, 14197028, 14197028]),
('control: moderate single', (200000, 2500000, 'single'), [85700, 2971800, 471800]),
('control: no exemption left', (1000000, 99999999, 'single'), [0, 27534800, 0]),
('control: below exemption', (100000, 0, 'mfj'), [133300, 0, 0]),
('control: joint high', (1300000, 30000000, 'mfj'), [112975, 32771500, 2771500])],
[('regression reduction-rounding 1', (832985, 0, 'single'), [29792, 22024204, 22024204]),
('regression reduction-rounding 2', (932132, 2500000, 'single'), [5005, 25494356, 22994356]),
('partial repair guard 1', (700000, 0, 'single'), [63038, 17369736, 17369736]),
('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 reduction-rounding 1', (625793, 19280708, 'single'), [81590, 14772484, 0]),
('regression reduction-rounding 2', (1622278, 2500000, 'mfj'), [32406, 44051216, 41551216]),
('partial repair guard 1', (633603, 10000000, 'single'), [79637, 15045848, 5045848]),
('partial repair guard 2', (853491, 0, 'single'), [24665, 22741928, 22741928]),
('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 reduction-rounding 1', (1346318, 26048839, 'mfj'), [101396, 34392616, 8343777]),
('regression reduction-rounding 2', (1429526, 0, 'mfj'), [80594, 37304896, 37304896]),
('partial repair guard 1', (730275, 2500000, 'single'), [55469, 18429368, 15929368]),
('partial repair guard 2', (932132, 2500000, 'single'), [5005, 25494356, 22994356]),
('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 reduction-rounding 1', (1242587, 0, 'mfj'), [127329, 30762024, 30762024]),
('regression reduction-rounding 2', (1233419, 2500000, 'mfj'), [129621, 30441144, 27941144]),
('partial repair guard 1', (867815, 3084875, 'single'), [21084, 23243268, 20158393]),
('partial repair guard 2', (1605745, 31630075, 'mfj'), [36539, 43472568, 11842493]),
('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 reduction-rounding 1 | [85700, 14197084, 9197084] | [85700, 14197084, 9197084] | Passed |
| regression reduction-rounding 2 | [63038, 17369736, 17369736] | [63038, 17369736, 17369736] | Passed |
| partial repair guard 2 | [85700, 14197028, 14197028] | [85700, 14197028, 14197028] | Passed |
| control: moderate single | [85700, 2971800, 471800] | [85700, 2971800, 471800] | Passed |
| control: no exemption left | [0, 27534800, 0] | [0, 27534800, 0] | Passed |
| control: below exemption | [133300, 0, 0] | [133300, 0, 0] | Passed |
| control: joint high | [112975, 32771500, 2771500] | [112975, 32771500, 2771500] | Passed |
SHA-256 / 0c5ee0da799c1c68c101cb9a6ef8281eea9689d902f6561f77d02d56b8cfde13
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.691722+00:00.
Case digest / d0576b160be4c345005b3ca54a21581b3b393821caf474f7470e2a71ff1de39f