FA-62371 / Tax bracket computation / Open access
The smaller of standard and itemized deductions is taken · case 01
A taxpayer with no itemized deductions deducts nothing.
ROOT CAUSE
The deduction uses min(standard, itemized).
VERIFIED REPAIR
Take the larger of the two deductions.
Unsuccessful approach: Preferring any non-zero itemized amount still loses when itemized is below the standard deduction.
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 = min(base, max(1300, earned + 450))
s = base + extra * conditions
if status == 'mfs' and spouse_itemizes: s = 0
d = min(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 larger-deduction 1', ('single', 50000, 50000, 0, 0, False, False), [14600, 35400]),
('regression larger-deduction 2', ('single', 50000, 50000, 3000, 0, False, False), [14600, 35400]),
('partial repair guard 2', ('mfj', 70625, 900, 25000, 1, False, False), [30750, 39875]),
('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]),
('control: mfj below deduction', ('mfj', 20000, 20000, 0, 2, False, False), [32300, 0])],
[('regression larger-deduction 1', ('hoh', 30000, 30000, 0, 1, False, False), [23850, 6150]),
('regression larger-deduction 2', ('single', 5000, 2000, 0, 0, True, False), [2450, 2550]),
('partial repair guard 1', ('hoh', 102225, 22645, 15000, 0, False, True), [21900, 80325]),
('partial repair guard 2', ('mfj', 828, 2000, 15000, 0, False, True), [29200, 0]),
('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 larger-deduction 1', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000]),
('regression larger-deduction 2', ('mfj', 20000, 20000, 0, 2, False, False), [32300, 0]),
('partial repair guard 1', ('mfs', 54568, 20000, 3000, 0, True, False), [14600, 39968]),
('partial repair guard 2', ('mfj', 140586, 20000, 3000, 0, True, False), [20450, 120136]),
('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 larger-deduction 1', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('regression larger-deduction 2', ('mfj', 120000, 120000, 35000, 0, False, False), [35000, 85000]),
('partial repair guard 1', ('single', 45837, 500, 15000, 1, False, False), [16550, 29287]),
('partial repair guard 2', ('single', 111058, 500, 3000, 1, False, False), [16550, 94508]),
('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 larger-deduction 1', ('single', 3000, 0, 0, 0, True, False), [1300, 1700]),
('regression larger-deduction 2', ('mfs', 15301, 1366, 3000, 0, True, False), [3000, 12301]),
('partial repair guard 1', ('mfj', 82202, 19334, 3000, 2, False, False), [32300, 49902]),
('partial repair guard 2', ('hoh', 26068, 20000, 3000, 0, False, True), [21900, 4168]),
('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 larger-deduction 1 | [0, 50000] | [14600, 35400] | Failed |
| regression larger-deduction 2 | [3000, 47000] | [14600, 35400] | Failed |
| partial repair guard 2 | [25000, 45625] | [30750, 39875] | Failed |
| control: hoh with age | [0, 30000] | [23850, 6150] | Failed |
| control: dependent | [0, 5000] | [2450, 2550] | Failed |
| control: mfs spouse itemizes | [0, 40000] | [3000, 37000] | Failed |
| control: mfj below deduction | [0, 20000] | [32300, 0] | Failed |
SHA-256 / b6610dff1dac0c00ee489675d2c5c2a1a6217a1e16804a45c74f3c7bb9810a0c
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 + extra * conditions
if status == 'mfs' and spouse_itemizes: s = 0
d = itemized if itemized else s
return [d, max(0, gross - d)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression larger-deduction 1', ('single', 50000, 50000, 0, 0, False, False), [14600, 35400]),
('regression larger-deduction 2', ('single', 50000, 50000, 3000, 0, False, False), [14600, 35400]),
('partial repair guard 2', ('mfj', 70625, 900, 25000, 1, False, False), [30750, 39875]),
('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]),
('control: mfj below deduction', ('mfj', 20000, 20000, 0, 2, False, False), [32300, 0])],
[('regression larger-deduction 1', ('hoh', 30000, 30000, 0, 1, False, False), [23850, 6150]),
('regression larger-deduction 2', ('single', 5000, 2000, 0, 0, True, False), [2450, 2550]),
('partial repair guard 1', ('hoh', 102225, 22645, 15000, 0, False, True), [21900, 80325]),
('partial repair guard 2', ('mfj', 828, 2000, 15000, 0, False, True), [29200, 0]),
('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 larger-deduction 1', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000]),
('regression larger-deduction 2', ('mfj', 20000, 20000, 0, 2, False, False), [32300, 0]),
('partial repair guard 1', ('mfs', 54568, 20000, 3000, 0, True, False), [14600, 39968]),
('partial repair guard 2', ('mfj', 140586, 20000, 3000, 0, True, False), [20450, 120136]),
('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 larger-deduction 1', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('regression larger-deduction 2', ('mfj', 120000, 120000, 35000, 0, False, False), [35000, 85000]),
('partial repair guard 1', ('single', 45837, 500, 15000, 1, False, False), [16550, 29287]),
('partial repair guard 2', ('single', 111058, 500, 3000, 1, False, False), [16550, 94508]),
('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 larger-deduction 1', ('single', 3000, 0, 0, 0, True, False), [1300, 1700]),
('regression larger-deduction 2', ('mfs', 15301, 1366, 3000, 0, True, False), [3000, 12301]),
('partial repair guard 1', ('mfj', 82202, 19334, 3000, 2, False, False), [32300, 49902]),
('partial repair guard 2', ('hoh', 26068, 20000, 3000, 0, False, True), [21900, 4168]),
('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 larger-deduction 1 | [14600, 35400] | [14600, 35400] | Passed |
| regression larger-deduction 2 | [3000, 47000] | [14600, 35400] | Failed |
| partial repair guard 2 | [25000, 45625] | [30750, 39875] | Failed |
| 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 |
| control: mfj below deduction | [32300, 0] | [32300, 0] | Passed |
SHA-256 / d12118b62d61aed4b62eb1fb31c722d9434d5f052e1384f6d7e37349199ca517
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 larger-deduction 1', ('single', 50000, 50000, 0, 0, False, False), [14600, 35400]),
('regression larger-deduction 2', ('single', 50000, 50000, 3000, 0, False, False), [14600, 35400]),
('partial repair guard 2', ('mfj', 70625, 900, 25000, 1, False, False), [30750, 39875]),
('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]),
('control: mfj below deduction', ('mfj', 20000, 20000, 0, 2, False, False), [32300, 0])],
[('regression larger-deduction 1', ('hoh', 30000, 30000, 0, 1, False, False), [23850, 6150]),
('regression larger-deduction 2', ('single', 5000, 2000, 0, 0, True, False), [2450, 2550]),
('partial repair guard 1', ('hoh', 102225, 22645, 15000, 0, False, True), [21900, 80325]),
('partial repair guard 2', ('mfj', 828, 2000, 15000, 0, False, True), [29200, 0]),
('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 larger-deduction 1', ('mfs', 40000, 40000, 3000, 2, False, True), [3000, 37000]),
('regression larger-deduction 2', ('mfj', 20000, 20000, 0, 2, False, False), [32300, 0]),
('partial repair guard 1', ('mfs', 54568, 20000, 3000, 0, True, False), [14600, 39968]),
('partial repair guard 2', ('mfj', 140586, 20000, 3000, 0, True, False), [20450, 120136]),
('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 larger-deduction 1', ('single', 9000, 20000, 0, 1, True, False), [16550, 0]),
('regression larger-deduction 2', ('mfj', 120000, 120000, 35000, 0, False, False), [35000, 85000]),
('partial repair guard 1', ('single', 45837, 500, 15000, 1, False, False), [16550, 29287]),
('partial repair guard 2', ('single', 111058, 500, 3000, 1, False, False), [16550, 94508]),
('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 larger-deduction 1', ('single', 3000, 0, 0, 0, True, False), [1300, 1700]),
('regression larger-deduction 2', ('mfs', 15301, 1366, 3000, 0, True, False), [3000, 12301]),
('partial repair guard 1', ('mfj', 82202, 19334, 3000, 2, False, False), [32300, 49902]),
('partial repair guard 2', ('hoh', 26068, 20000, 3000, 0, False, True), [21900, 4168]),
('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 larger-deduction 1 | [14600, 35400] | [14600, 35400] | Passed |
| regression larger-deduction 2 | [14600, 35400] | [14600, 35400] | Passed |
| partial repair guard 2 | [30750, 39875] | [30750, 39875] | 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 |
| control: mfj below deduction | [32300, 0] | [32300, 0] | Passed |
SHA-256 / f78dd34f6b9958d198145a689b0a386ba42f0b6f63680a44f8658396b3bdb731
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.011650+00:00.
Case digest / 834e02d648f91d409fcb4e8edb95ea3da7d54e65f0beedf5b5ba03e13036c1b9