FA-62736 / Tax bracket computation / Open access
The child receives the full standard deduction · case 01
Unearned income of a child is sheltered by the full 14600 deduction.
ROOT CAUSE
The dependent limitation max(1300, earned + 450) is not applied.
VERIFIED REPAIR
std = min(14600, max(1300, earned + 450)).
Unsuccessful approach: Applying the dependent formula without the 14600 cap over-deducts high-earning dependents.
Case contract
solve(earned, unearned, parent_rate): stipulated child unearned-income rule, whole dollars. Standard deduction = min(14600, max(1300, earned + 450)); taxable = max(0, earned + unearned - std). Net unearned income = max(0, unearned - 2600); the part of taxable income taxed at the parent's rate (percent string) is min(net unearned, taxable); the rest is taxed at 10%. Return integer cents half-up.
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
from fractions import Fraction
N = 1
observations = []
def solve(earned, unearned, parent_rate):
def prog(x, br):
tax, lower = Fraction(0), 0
for upper, rate in br:
top = x if upper is None else min(x, upper)
if top > lower: tax += (top - lower) * Fraction(rate) / 100
if upper is None or x <= upper: break
lower = upper
return tax
def cents(v):
v = v * 100
return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))
std = 14600
taxable = max(0, earned + unearned - std)
net_unearned = max(0, unearned - 2600)
at_parent = min(net_unearned, taxable)
tax = at_parent * Fraction(parent_rate) / 100 + (taxable - at_parent) * Fraction(10, 100)
return cents(tax)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression dependent-deduction 1', (0, 5000, '32'), 89800),
('regression dependent-deduction 2', (0, 2000, '32'), 7000), ('partial repair guard 1', (20000, 5000, '24'), 137600),
('partial repair guard 2', (16766, 0, '32'), 21660), ('control: mixed small', (3000, 3000, '35'), 35500),
('control: large trust income', (0, 60000, '37'), 2136800), ('control: earned only', (8000, 0, '22'), 0)],
[('regression dependent-deduction 1', (3000, 3000, '35'), 35500),
('regression dependent-deduction 2', (0, 60000, '37'), 2136800),
('partial repair guard 1', (20000, 5000, '35'), 164000), ('partial repair guard 2', (20000, 2601, '35'), 80035),
('control: earned only', (8000, 0, '22'), 0), ('control: unearned only', (0, 5000, '32'), 89800),
('control: below threshold', (0, 2000, '32'), 7000), ('control: working teen', (20000, 5000, '24'), 137600)],
[('regression dependent-deduction 1', (0, 2600, '22'), 13000),
('regression dependent-deduction 2', (8000, 5662, '22'), 88864),
('partial repair guard 1', (20000, 5000, '37'), 168800), ('partial repair guard 2', (15034, 2600, '24'), 30340),
('control: unearned only', (0, 5000, '32'), 89800), ('control: below threshold', (0, 2000, '32'), 7000),
('control: working teen', (20000, 5000, '24'), 137600), ('control: mixed small', (3000, 3000, '35'), 35500)],
[('regression dependent-deduction 1', (1000, 60000, '22'), 1284300),
('regression dependent-deduction 2', (3000, 5000, '32'), 98300),
('partial repair guard 1', (23068, 60000, '37'), 2234480), ('partial repair guard 2', (20000, 60000, '32'), 1916800),
('control: mixed small', (3000, 3000, '35'), 35500), ('control: large trust income', (0, 60000, '37'), 2136800),
('control: earned only', (8000, 0, '22'), 0), ('control: unearned only', (0, 5000, '32'), 89800)],
[('regression dependent-deduction 1', (3000, 1300, '24'), 8500),
('regression dependent-deduction 2', (8000, 5000, '24'), 79100),
('partial repair guard 1', (21025, 60000, '24'), 1467850), ('partial repair guard 2', (22321, 0, '22'), 77210),
('control: unearned only', (0, 5000, '32'), 89800), ('control: below threshold', (0, 2000, '32'), 7000),
('control: working teen', (20000, 5000, '24'), 137600), ('control: mixed small', (3000, 3000, '35'), 35500)]]
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-deduction 1 | 0 | 89800 | Failed |
| regression dependent-deduction 2 | 0 | 7000 | Failed |
| partial repair guard 1 | 137600 | 137600 | Passed |
| partial repair guard 2 | 21660 | 21660 | Passed |
| control: mixed small | 0 | 35500 | Failed |
| control: large trust income | 1679800 | 2136800 | Failed |
| control: earned only | 0 | 0 | Passed |
SHA-256 / 30d9c141365e646b593f63c3a22952ab506dabfaedbfd8cc358e9733be5866e0
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(earned, unearned, parent_rate):
def prog(x, br):
tax, lower = Fraction(0), 0
for upper, rate in br:
top = x if upper is None else min(x, upper)
if top > lower: tax += (top - lower) * Fraction(rate) / 100
if upper is None or x <= upper: break
lower = upper
return tax
def cents(v):
v = v * 100
return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))
std = max(1300, earned + 450)
taxable = max(0, earned + unearned - std)
net_unearned = max(0, unearned - 2600)
at_parent = min(net_unearned, taxable)
tax = at_parent * Fraction(parent_rate) / 100 + (taxable - at_parent) * Fraction(10, 100)
return cents(tax)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression dependent-deduction 1', (0, 5000, '32'), 89800),
('regression dependent-deduction 2', (0, 2000, '32'), 7000), ('partial repair guard 1', (20000, 5000, '24'), 137600),
('partial repair guard 2', (16766, 0, '32'), 21660), ('control: mixed small', (3000, 3000, '35'), 35500),
('control: large trust income', (0, 60000, '37'), 2136800), ('control: earned only', (8000, 0, '22'), 0)],
[('regression dependent-deduction 1', (3000, 3000, '35'), 35500),
('regression dependent-deduction 2', (0, 60000, '37'), 2136800),
('partial repair guard 1', (20000, 5000, '35'), 164000), ('partial repair guard 2', (20000, 2601, '35'), 80035),
('control: earned only', (8000, 0, '22'), 0), ('control: unearned only', (0, 5000, '32'), 89800),
('control: below threshold', (0, 2000, '32'), 7000), ('control: working teen', (20000, 5000, '24'), 137600)],
[('regression dependent-deduction 1', (0, 2600, '22'), 13000),
('regression dependent-deduction 2', (8000, 5662, '22'), 88864),
('partial repair guard 1', (20000, 5000, '37'), 168800), ('partial repair guard 2', (15034, 2600, '24'), 30340),
('control: unearned only', (0, 5000, '32'), 89800), ('control: below threshold', (0, 2000, '32'), 7000),
('control: working teen', (20000, 5000, '24'), 137600), ('control: mixed small', (3000, 3000, '35'), 35500)],
[('regression dependent-deduction 1', (1000, 60000, '22'), 1284300),
('regression dependent-deduction 2', (3000, 5000, '32'), 98300),
('partial repair guard 1', (23068, 60000, '37'), 2234480), ('partial repair guard 2', (20000, 60000, '32'), 1916800),
('control: mixed small', (3000, 3000, '35'), 35500), ('control: large trust income', (0, 60000, '37'), 2136800),
('control: earned only', (8000, 0, '22'), 0), ('control: unearned only', (0, 5000, '32'), 89800)],
[('regression dependent-deduction 1', (3000, 1300, '24'), 8500),
('regression dependent-deduction 2', (8000, 5000, '24'), 79100),
('partial repair guard 1', (21025, 60000, '24'), 1467850), ('partial repair guard 2', (22321, 0, '22'), 77210),
('control: unearned only', (0, 5000, '32'), 89800), ('control: below threshold', (0, 2000, '32'), 7000),
('control: working teen', (20000, 5000, '24'), 137600), ('control: mixed small', (3000, 3000, '35'), 35500)]]
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-deduction 1 | 89800 | 89800 | Passed |
| regression dependent-deduction 2 | 7000 | 7000 | Passed |
| partial repair guard 1 | 79100 | 137600 | Failed |
| partial repair guard 2 | 0 | 21660 | Failed |
| control: mixed small | 35500 | 35500 | Passed |
| control: large trust income | 2136800 | 2136800 | Passed |
| control: earned only | 0 | 0 | Passed |
SHA-256 / 5b88af2ad5b31e95e16987e1c5dca88d19b08e75973ccd2b6db4535a5d990e38
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
from fractions import Fraction
N = 1
observations = []
def solve(earned, unearned, parent_rate):
def prog(x, br):
tax, lower = Fraction(0), 0
for upper, rate in br:
top = x if upper is None else min(x, upper)
if top > lower: tax += (top - lower) * Fraction(rate) / 100
if upper is None or x <= upper: break
lower = upper
return tax
def cents(v):
v = v * 100
return int(v + Fraction(1, 2)) if v >= 0 else -int(-v + Fraction(1, 2))
std = min(14600, max(1300, earned + 450))
taxable = max(0, earned + unearned - std)
net_unearned = max(0, unearned - 2600)
at_parent = min(net_unearned, taxable)
tax = at_parent * Fraction(parent_rate) / 100 + (taxable - at_parent) * Fraction(10, 100)
return cents(tax)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression dependent-deduction 1', (0, 5000, '32'), 89800),
('regression dependent-deduction 2', (0, 2000, '32'), 7000), ('partial repair guard 1', (20000, 5000, '24'), 137600),
('partial repair guard 2', (16766, 0, '32'), 21660), ('control: mixed small', (3000, 3000, '35'), 35500),
('control: large trust income', (0, 60000, '37'), 2136800), ('control: earned only', (8000, 0, '22'), 0)],
[('regression dependent-deduction 1', (3000, 3000, '35'), 35500),
('regression dependent-deduction 2', (0, 60000, '37'), 2136800),
('partial repair guard 1', (20000, 5000, '35'), 164000), ('partial repair guard 2', (20000, 2601, '35'), 80035),
('control: earned only', (8000, 0, '22'), 0), ('control: unearned only', (0, 5000, '32'), 89800),
('control: below threshold', (0, 2000, '32'), 7000), ('control: working teen', (20000, 5000, '24'), 137600)],
[('regression dependent-deduction 1', (0, 2600, '22'), 13000),
('regression dependent-deduction 2', (8000, 5662, '22'), 88864),
('partial repair guard 1', (20000, 5000, '37'), 168800), ('partial repair guard 2', (15034, 2600, '24'), 30340),
('control: unearned only', (0, 5000, '32'), 89800), ('control: below threshold', (0, 2000, '32'), 7000),
('control: working teen', (20000, 5000, '24'), 137600), ('control: mixed small', (3000, 3000, '35'), 35500)],
[('regression dependent-deduction 1', (1000, 60000, '22'), 1284300),
('regression dependent-deduction 2', (3000, 5000, '32'), 98300),
('partial repair guard 1', (23068, 60000, '37'), 2234480), ('partial repair guard 2', (20000, 60000, '32'), 1916800),
('control: mixed small', (3000, 3000, '35'), 35500), ('control: large trust income', (0, 60000, '37'), 2136800),
('control: earned only', (8000, 0, '22'), 0), ('control: unearned only', (0, 5000, '32'), 89800)],
[('regression dependent-deduction 1', (3000, 1300, '24'), 8500),
('regression dependent-deduction 2', (8000, 5000, '24'), 79100),
('partial repair guard 1', (21025, 60000, '24'), 1467850), ('partial repair guard 2', (22321, 0, '22'), 77210),
('control: unearned only', (0, 5000, '32'), 89800), ('control: below threshold', (0, 2000, '32'), 7000),
('control: working teen', (20000, 5000, '24'), 137600), ('control: mixed small', (3000, 3000, '35'), 35500)]]
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-deduction 1 | 89800 | 89800 | Passed |
| regression dependent-deduction 2 | 7000 | 7000 | Passed |
| partial repair guard 1 | 137600 | 137600 | Passed |
| partial repair guard 2 | 21660 | 21660 | Passed |
| control: mixed small | 35500 | 35500 | Passed |
| control: large trust income | 2136800 | 2136800 | Passed |
| control: earned only | 0 | 0 | Passed |
SHA-256 / 375e483b7b296e28a2a8badc4f468499339b1811d1e2c25ea08414ae06a454be
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:07.377066+00:00.
Case digest / d2904c81273df487700e9cc82c6fafbe8aaab122827ef5879b8b27f1f265bb38