FA-62386 / Tax bracket computation / Open access
A dependent's standard deduction is not capped at the ordinary amount · case 01
A dependent with high earnings deducts more than the regular standard deduction.
ROOT CAUSE
The dependent base is max(1300, earned + 450) without the min(base, ...) cap.
VERIFIED REPAIR
Limit the dependent base to min(base, max(1300, earned + 450)).
Unsuccessful approach: Capping at the ordinary amount but dropping the 1300 floor under-deducts dependents with little earned income.
Case contract
solve(status, gross, earned, itemized, conditions, dependent, spouse_itemizes): stipulated deduction rules. Base standard deduction: single 14600, mfj 29200, mfs 14600, hoh 21900 (other statuses 'ERR:status'). A dependent's base is min(base, max(1300, earned + 450)). Then add 1950 per age/blindness condition for single or hoh, 1550 per condition for married statuses. If status is mfs and the spouse itemizes, the standard deduction is 0. The deduction is the larger of standard and itemized; taxable = max(0, gross - deduction). Return [deduction, taxable].
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(status, gross, earned, itemized, conditions, dependent, spouse_itemizes):
std = {'single': 14600, 'mfj': 29200, 'mfs': 14600, 'hoh': 21900}
if status not in std: return 'ERR:status'
extra = 1950 if status in ('single', 'hoh') else 1550
base = std[status]
if dependent: base = max(1300, earned + 450)
s = base + extra * conditions
if status == 'mfs' and spouse_itemizes: s = 0
d = max(s, itemized)
return [d, max(0, gross - d)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression dependent-limit 1', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('regression dependent-limit 2', ('mfs', 54568, 20000, 3000, 0, True, False), [14600, 39968]),
('partial repair guard 1', ('single', 3000, 0, 0, 0, True, False), [1300, 1700]),
('partial repair guard 2', ('hoh', 22188, 500, 0, 1, True, True), [3250, 18938]),
('control: single standard', ('single', 50000, 50000, 0, 0, False, False), [14600, 35400]),
('control: hoh with age', ('hoh', 30000, 30000, 0, 1, False, False), [23850, 6150]),
('control: dependent', ('single', 5000, 2000, 0, 0, True, False), [2450, 2550]),
('control: mfs spouse itemizes', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000])],
[('regression dependent-limit 1', ('hoh', 50974, 29634, 0, 0, True, True), [21900, 29074]),
('regression dependent-limit 2', ('mfs', 89760, 20000, 0, 0, True, False), [14600, 75160]),
('partial repair guard 1', ('single', 97749, 500, 3000, 2, True, False), [5200, 92549]),
('partial repair guard 2', ('hoh', 39678, 500, 0, 1, True, True), [3250, 36428]),
('control: mfs spouse itemizes', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000]),
('control: mfj below deduction', ('mfj', 20000, 20000, 0, 2, False, False), [32300, 0]),
('control: high-earning dependent', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('control: itemizer', ('mfj', 120000, 120000, 35000, 0, False, False), [35000, 85000])],
[('regression dependent-limit 1', ('single', 122829, 25958, 25000, 2, True, False), [25000, 97829]),
('regression dependent-limit 2', ('single', 98864, 35923, 25000, 0, True, False), [25000, 73864]),
('partial repair guard 1', ('single', 6251, 500, 0, 0, True, False), [1300, 4951]),
('partial repair guard 2', ('hoh', 111017, 500, 3000, 1, True, False), [3250, 107767]),
('control: itemizer', ('mfj', 120000, 120000, 35000, 0, False, False), [35000, 85000]),
('control: bad status', ('widow', 1, 1, 0, 0, False, False), 'ERR:status'),
('control: dependent no earnings', ('single', 3000, 0, 0, 0, True, False), [1300, 1700]),
('control: single standard', ('single', 50000, 50000, 0, 0, False, False), [14600, 35400])],
[('regression dependent-limit 1', ('single', 68311, 20000, 0, 2, True, False), [18500, 49811]),
('regression dependent-limit 2', ('mfs', 120508, 35036, 0, 0, True, False), [14600, 105908]),
('partial repair guard 1', ('hoh', 85892, 0, 0, 2, True, True), [5200, 80692]),
('partial repair guard 2', ('mfj', 42614, 500, 0, 0, True, True), [1300, 41314]),
('control: single standard', ('single', 50000, 50000, 0, 0, False, False), [14600, 35400]),
('control: hoh with age', ('hoh', 30000, 30000, 0, 1, False, False), [23850, 6150]),
('control: dependent', ('single', 5000, 2000, 0, 0, True, False), [2450, 2550]),
('control: mfs spouse itemizes', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000])],
[('regression dependent-limit 1', ('mfs', 104697, 20000, 15000, 0, True, False), [15000, 89697]),
('regression dependent-limit 2', ('mfs', 26507, 38557, 15000, 0, True, False), [15000, 11507]),
('partial repair guard 1', ('mfj', 30569, 500, 0, 0, True, True), [1300, 29269]),
('partial repair guard 2', ('mfj', 145593, 500, 0, 0, True, False), [1300, 144293]),
('control: mfs spouse itemizes', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000]),
('control: mfj below deduction', ('mfj', 20000, 20000, 0, 2, False, False), [32300, 0]),
('control: high-earning dependent', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('control: itemizer', ('mfj', 120000, 120000, 35000, 0, False, False), [35000, 85000])]]
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 dependent-limit 1 | [22400, 0] | [16550, 0] | Failed |
| regression dependent-limit 2 | [20450, 34118] | [14600, 39968] | Failed |
| partial repair guard 1 | [1300, 1700] | [1300, 1700] | Passed |
| partial repair guard 2 | [3250, 18938] | [3250, 18938] | Passed |
| control: single standard | [14600, 35400] | [14600, 35400] | Passed |
| control: hoh with age | [23850, 6150] | [23850, 6150] | Passed |
| control: dependent | [2450, 2550] | [2450, 2550] | Passed |
| control: mfs spouse itemizes | [3000, 37000] | [3000, 37000] | Passed |
SHA-256 / b8c675a140b90a0d1f58d2475bbee6f7f30354d3e64b532f2e0fbcae695f6716
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(status, gross, earned, itemized, conditions, dependent, spouse_itemizes):
std = {'single': 14600, 'mfj': 29200, 'mfs': 14600, 'hoh': 21900}
if status not in std: return 'ERR:status'
extra = 1950 if status in ('single', 'hoh') else 1550
base = std[status]
if dependent: base = min(base, earned + 450)
s = base + extra * conditions
if status == 'mfs' and spouse_itemizes: s = 0
d = max(s, itemized)
return [d, max(0, gross - d)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression dependent-limit 1', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('regression dependent-limit 2', ('mfs', 54568, 20000, 3000, 0, True, False), [14600, 39968]),
('partial repair guard 1', ('single', 3000, 0, 0, 0, True, False), [1300, 1700]),
('partial repair guard 2', ('hoh', 22188, 500, 0, 1, True, True), [3250, 18938]),
('control: single standard', ('single', 50000, 50000, 0, 0, False, False), [14600, 35400]),
('control: hoh with age', ('hoh', 30000, 30000, 0, 1, False, False), [23850, 6150]),
('control: dependent', ('single', 5000, 2000, 0, 0, True, False), [2450, 2550]),
('control: mfs spouse itemizes', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000])],
[('regression dependent-limit 1', ('hoh', 50974, 29634, 0, 0, True, True), [21900, 29074]),
('regression dependent-limit 2', ('mfs', 89760, 20000, 0, 0, True, False), [14600, 75160]),
('partial repair guard 1', ('single', 97749, 500, 3000, 2, True, False), [5200, 92549]),
('partial repair guard 2', ('hoh', 39678, 500, 0, 1, True, True), [3250, 36428]),
('control: mfs spouse itemizes', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000]),
('control: mfj below deduction', ('mfj', 20000, 20000, 0, 2, False, False), [32300, 0]),
('control: high-earning dependent', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('control: itemizer', ('mfj', 120000, 120000, 35000, 0, False, False), [35000, 85000])],
[('regression dependent-limit 1', ('single', 122829, 25958, 25000, 2, True, False), [25000, 97829]),
('regression dependent-limit 2', ('single', 98864, 35923, 25000, 0, True, False), [25000, 73864]),
('partial repair guard 1', ('single', 6251, 500, 0, 0, True, False), [1300, 4951]),
('partial repair guard 2', ('hoh', 111017, 500, 3000, 1, True, False), [3250, 107767]),
('control: itemizer', ('mfj', 120000, 120000, 35000, 0, False, False), [35000, 85000]),
('control: bad status', ('widow', 1, 1, 0, 0, False, False), 'ERR:status'),
('control: dependent no earnings', ('single', 3000, 0, 0, 0, True, False), [1300, 1700]),
('control: single standard', ('single', 50000, 50000, 0, 0, False, False), [14600, 35400])],
[('regression dependent-limit 1', ('single', 68311, 20000, 0, 2, True, False), [18500, 49811]),
('regression dependent-limit 2', ('mfs', 120508, 35036, 0, 0, True, False), [14600, 105908]),
('partial repair guard 1', ('hoh', 85892, 0, 0, 2, True, True), [5200, 80692]),
('partial repair guard 2', ('mfj', 42614, 500, 0, 0, True, True), [1300, 41314]),
('control: single standard', ('single', 50000, 50000, 0, 0, False, False), [14600, 35400]),
('control: hoh with age', ('hoh', 30000, 30000, 0, 1, False, False), [23850, 6150]),
('control: dependent', ('single', 5000, 2000, 0, 0, True, False), [2450, 2550]),
('control: mfs spouse itemizes', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000])],
[('regression dependent-limit 1', ('mfs', 104697, 20000, 15000, 0, True, False), [15000, 89697]),
('regression dependent-limit 2', ('mfs', 26507, 38557, 15000, 0, True, False), [15000, 11507]),
('partial repair guard 1', ('mfj', 30569, 500, 0, 0, True, True), [1300, 29269]),
('partial repair guard 2', ('mfj', 145593, 500, 0, 0, True, False), [1300, 144293]),
('control: mfs spouse itemizes', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000]),
('control: mfj below deduction', ('mfj', 20000, 20000, 0, 2, False, False), [32300, 0]),
('control: high-earning dependent', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('control: itemizer', ('mfj', 120000, 120000, 35000, 0, False, False), [35000, 85000])]]
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 dependent-limit 1 | [16550, 0] | [16550, 0] | Passed |
| regression dependent-limit 2 | [14600, 39968] | [14600, 39968] | Passed |
| partial repair guard 1 | [450, 2550] | [1300, 1700] | Failed |
| partial repair guard 2 | [2900, 19288] | [3250, 18938] | Failed |
| control: single standard | [14600, 35400] | [14600, 35400] | Passed |
| control: hoh with age | [23850, 6150] | [23850, 6150] | Passed |
| control: dependent | [2450, 2550] | [2450, 2550] | Passed |
| control: mfs spouse itemizes | [3000, 37000] | [3000, 37000] | Passed |
SHA-256 / cdc485fd084fa46ee12c823230c1cc0145642ababeb763a65a18414e88551900
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(status, gross, earned, itemized, conditions, dependent, spouse_itemizes):
std = {'single': 14600, 'mfj': 29200, 'mfs': 14600, 'hoh': 21900}
if status not in std: return 'ERR:status'
extra = 1950 if status in ('single', 'hoh') else 1550
base = std[status]
if dependent: base = min(base, max(1300, earned + 450))
s = base + extra * conditions
if status == 'mfs' and spouse_itemizes: s = 0
d = max(s, itemized)
return [d, max(0, gross - d)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression dependent-limit 1', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('regression dependent-limit 2', ('mfs', 54568, 20000, 3000, 0, True, False), [14600, 39968]),
('partial repair guard 1', ('single', 3000, 0, 0, 0, True, False), [1300, 1700]),
('partial repair guard 2', ('hoh', 22188, 500, 0, 1, True, True), [3250, 18938]),
('control: single standard', ('single', 50000, 50000, 0, 0, False, False), [14600, 35400]),
('control: hoh with age', ('hoh', 30000, 30000, 0, 1, False, False), [23850, 6150]),
('control: dependent', ('single', 5000, 2000, 0, 0, True, False), [2450, 2550]),
('control: mfs spouse itemizes', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000])],
[('regression dependent-limit 1', ('hoh', 50974, 29634, 0, 0, True, True), [21900, 29074]),
('regression dependent-limit 2', ('mfs', 89760, 20000, 0, 0, True, False), [14600, 75160]),
('partial repair guard 1', ('single', 97749, 500, 3000, 2, True, False), [5200, 92549]),
('partial repair guard 2', ('hoh', 39678, 500, 0, 1, True, True), [3250, 36428]),
('control: mfs spouse itemizes', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000]),
('control: mfj below deduction', ('mfj', 20000, 20000, 0, 2, False, False), [32300, 0]),
('control: high-earning dependent', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('control: itemizer', ('mfj', 120000, 120000, 35000, 0, False, False), [35000, 85000])],
[('regression dependent-limit 1', ('single', 122829, 25958, 25000, 2, True, False), [25000, 97829]),
('regression dependent-limit 2', ('single', 98864, 35923, 25000, 0, True, False), [25000, 73864]),
('partial repair guard 1', ('single', 6251, 500, 0, 0, True, False), [1300, 4951]),
('partial repair guard 2', ('hoh', 111017, 500, 3000, 1, True, False), [3250, 107767]),
('control: itemizer', ('mfj', 120000, 120000, 35000, 0, False, False), [35000, 85000]),
('control: bad status', ('widow', 1, 1, 0, 0, False, False), 'ERR:status'),
('control: dependent no earnings', ('single', 3000, 0, 0, 0, True, False), [1300, 1700]),
('control: single standard', ('single', 50000, 50000, 0, 0, False, False), [14600, 35400])],
[('regression dependent-limit 1', ('single', 68311, 20000, 0, 2, True, False), [18500, 49811]),
('regression dependent-limit 2', ('mfs', 120508, 35036, 0, 0, True, False), [14600, 105908]),
('partial repair guard 1', ('hoh', 85892, 0, 0, 2, True, True), [5200, 80692]),
('partial repair guard 2', ('mfj', 42614, 500, 0, 0, True, True), [1300, 41314]),
('control: single standard', ('single', 50000, 50000, 0, 0, False, False), [14600, 35400]),
('control: hoh with age', ('hoh', 30000, 30000, 0, 1, False, False), [23850, 6150]),
('control: dependent', ('single', 5000, 2000, 0, 0, True, False), [2450, 2550]),
('control: mfs spouse itemizes', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000])],
[('regression dependent-limit 1', ('mfs', 104697, 20000, 15000, 0, True, False), [15000, 89697]),
('regression dependent-limit 2', ('mfs', 26507, 38557, 15000, 0, True, False), [15000, 11507]),
('partial repair guard 1', ('mfj', 30569, 500, 0, 0, True, True), [1300, 29269]),
('partial repair guard 2', ('mfj', 145593, 500, 0, 0, True, False), [1300, 144293]),
('control: mfs spouse itemizes', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000]),
('control: mfj below deduction', ('mfj', 20000, 20000, 0, 2, False, False), [32300, 0]),
('control: high-earning dependent', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('control: itemizer', ('mfj', 120000, 120000, 35000, 0, False, False), [35000, 85000])]]
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 dependent-limit 1 | [16550, 0] | [16550, 0] | Passed |
| regression dependent-limit 2 | [14600, 39968] | [14600, 39968] | Passed |
| partial repair guard 1 | [1300, 1700] | [1300, 1700] | Passed |
| partial repair guard 2 | [3250, 18938] | [3250, 18938] | Passed |
| control: single standard | [14600, 35400] | [14600, 35400] | Passed |
| control: hoh with age | [23850, 6150] | [23850, 6150] | Passed |
| control: dependent | [2450, 2550] | [2450, 2550] | Passed |
| control: mfs spouse itemizes | [3000, 37000] | [3000, 37000] | Passed |
SHA-256 / 3405a3e13dcab89d512001d9b5d8a53f78824e6bd3fbbe9097c4279c5ccf50c5
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:04.141436+00:00.
Case digest / c3199e613c1c9e995d49224b487ebdb12c341af12442aa409121270f7208b1cb