FA-62396 / Tax bracket computation / Open access
The dependent cap also truncates the age and blindness additions · case 01
An elderly dependent loses the additional standard deduction.
ROOT CAUSE
Additional amounts are added before the dependent limit is applied.
VERIFIED REPAIR
Apply the dependent limit to the base only, then add the additional amounts.
Unsuccessful approach: Dropping the additional amounts for dependents altogether is the same loss by another route.
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]
base += extra * conditions
if dependent: base = min(base, max(1300, earned + 450))
s = base
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 additional-before-dependent-cap 1', ('single', 5000, 2000, 0, 1, True, False), [4400, 600]),
('regression additional-before-dependent-cap 2', ('mfj', 100718, 20000, 0, 1, True, True), [22000, 78718]),
('partial repair guard 1', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('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 additional-before-dependent-cap 1', ('hoh', 22188, 500, 0, 1, True, True), [3250, 18938]),
('regression additional-before-dependent-cap 2', ('single', 97749, 500, 3000, 2, True, False), [5200, 92549]),
('partial repair guard 1', ('mfj', 100718, 20000, 0, 1, True, True), [22000, 78718]),
('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 additional-before-dependent-cap 1', ('mfj', 41032, 28549, 3000, 1, True, False), [30549, 10483]),
('regression additional-before-dependent-cap 2', ('hoh', 39678, 500, 0, 1, True, True), [3250, 36428]),
('partial repair guard 1', ('single', 97749, 500, 3000, 2, True, False), [5200, 92549]),
('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 additional-before-dependent-cap 1', ('hoh', 50678, 2000, 0, 2, True, True), [6350, 44328]),
('regression additional-before-dependent-cap 2', ('hoh', 111017, 500, 3000, 1, True, False), [3250, 107767]),
('partial repair guard 1', ('single', 68311, 20000, 0, 2, True, False), [18500, 49811]),
('partial repair guard 2', ('hoh', 39678, 500, 0, 1, True, True), [3250, 36428]),
('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 additional-before-dependent-cap 1', ('hoh', 85892, 0, 0, 2, True, True), [5200, 80692]),
('regression additional-before-dependent-cap 2', ('mfj', 105604, 2000, 0, 2, True, False), [5550, 100054]),
('partial repair guard 1', ('hoh', 50678, 2000, 0, 2, True, True), [6350, 44328]),
('partial repair guard 2', ('hoh', 111017, 500, 3000, 1, True, False), [3250, 107767]),
('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 additional-before-dependent-cap 1 | [2450, 2550] | [4400, 600] | Failed |
| regression additional-before-dependent-cap 2 | [20450, 80268] | [22000, 78718] | Failed |
| partial repair guard 1 | [16550, 0] | [16550, 0] | 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 / 5ebfcf3d279bc380969b24d52a3512a109adb697ee95cc9f97acf1f6f276f277
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, max(1300, earned + 450))
s = base + (0 if dependent else 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 additional-before-dependent-cap 1', ('single', 5000, 2000, 0, 1, True, False), [4400, 600]),
('regression additional-before-dependent-cap 2', ('mfj', 100718, 20000, 0, 1, True, True), [22000, 78718]),
('partial repair guard 1', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('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 additional-before-dependent-cap 1', ('hoh', 22188, 500, 0, 1, True, True), [3250, 18938]),
('regression additional-before-dependent-cap 2', ('single', 97749, 500, 3000, 2, True, False), [5200, 92549]),
('partial repair guard 1', ('mfj', 100718, 20000, 0, 1, True, True), [22000, 78718]),
('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 additional-before-dependent-cap 1', ('mfj', 41032, 28549, 3000, 1, True, False), [30549, 10483]),
('regression additional-before-dependent-cap 2', ('hoh', 39678, 500, 0, 1, True, True), [3250, 36428]),
('partial repair guard 1', ('single', 97749, 500, 3000, 2, True, False), [5200, 92549]),
('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 additional-before-dependent-cap 1', ('hoh', 50678, 2000, 0, 2, True, True), [6350, 44328]),
('regression additional-before-dependent-cap 2', ('hoh', 111017, 500, 3000, 1, True, False), [3250, 107767]),
('partial repair guard 1', ('single', 68311, 20000, 0, 2, True, False), [18500, 49811]),
('partial repair guard 2', ('hoh', 39678, 500, 0, 1, True, True), [3250, 36428]),
('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 additional-before-dependent-cap 1', ('hoh', 85892, 0, 0, 2, True, True), [5200, 80692]),
('regression additional-before-dependent-cap 2', ('mfj', 105604, 2000, 0, 2, True, False), [5550, 100054]),
('partial repair guard 1', ('hoh', 50678, 2000, 0, 2, True, True), [6350, 44328]),
('partial repair guard 2', ('hoh', 111017, 500, 3000, 1, True, False), [3250, 107767]),
('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 additional-before-dependent-cap 1 | [2450, 2550] | [4400, 600] | Failed |
| regression additional-before-dependent-cap 2 | [20450, 80268] | [22000, 78718] | Failed |
| partial repair guard 1 | [14600, 0] | [16550, 0] | 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 / dc491cf1b4ec97f6f8ca7bea2b95ba2c8fd1656671ea80b44973e8cab8d0412b
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 additional-before-dependent-cap 1', ('single', 5000, 2000, 0, 1, True, False), [4400, 600]),
('regression additional-before-dependent-cap 2', ('mfj', 100718, 20000, 0, 1, True, True), [22000, 78718]),
('partial repair guard 1', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('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 additional-before-dependent-cap 1', ('hoh', 22188, 500, 0, 1, True, True), [3250, 18938]),
('regression additional-before-dependent-cap 2', ('single', 97749, 500, 3000, 2, True, False), [5200, 92549]),
('partial repair guard 1', ('mfj', 100718, 20000, 0, 1, True, True), [22000, 78718]),
('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 additional-before-dependent-cap 1', ('mfj', 41032, 28549, 3000, 1, True, False), [30549, 10483]),
('regression additional-before-dependent-cap 2', ('hoh', 39678, 500, 0, 1, True, True), [3250, 36428]),
('partial repair guard 1', ('single', 97749, 500, 3000, 2, True, False), [5200, 92549]),
('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 additional-before-dependent-cap 1', ('hoh', 50678, 2000, 0, 2, True, True), [6350, 44328]),
('regression additional-before-dependent-cap 2', ('hoh', 111017, 500, 3000, 1, True, False), [3250, 107767]),
('partial repair guard 1', ('single', 68311, 20000, 0, 2, True, False), [18500, 49811]),
('partial repair guard 2', ('hoh', 39678, 500, 0, 1, True, True), [3250, 36428]),
('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 additional-before-dependent-cap 1', ('hoh', 85892, 0, 0, 2, True, True), [5200, 80692]),
('regression additional-before-dependent-cap 2', ('mfj', 105604, 2000, 0, 2, True, False), [5550, 100054]),
('partial repair guard 1', ('hoh', 50678, 2000, 0, 2, True, True), [6350, 44328]),
('partial repair guard 2', ('hoh', 111017, 500, 3000, 1, True, False), [3250, 107767]),
('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 additional-before-dependent-cap 1 | [4400, 600] | [4400, 600] | Passed |
| regression additional-before-dependent-cap 2 | [22000, 78718] | [22000, 78718] | Passed |
| partial repair guard 1 | [16550, 0] | [16550, 0] | 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 / 791e2596b9d28f9dfb6adabc1577feca30f7f52ef947f8d22b706859debad360
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.322221+00:00.
Case digest / bba4c126c75876e70d161255e56c3fb37f58a061e9654c45f879d66e1370588f