FA-62821 / Tax bracket computation / Open access
Joint filers use the single phase-out threshold · case 01
Married couples start losing the credit at 200000.
ROOT CAUSE
The threshold table ignores filing status.
VERIFIED REPAIR
Use 400000 for joint filers.
Unsuccessful approach: Using a 300000 joint threshold still starts the phase-out too early.
Case contract
solve(kids, others, magi, status, tax, earned): stipulated child credit, whole dollars. Credit = 2000 per child + 500 per other dependent, reduced by 50 for each 1000 or fraction thereof of MAGI above the threshold (single 200000, mfj 400000), floored at 0. The credit first offsets tax (used = min(credit, tax)); the refundable portion is min(credit - used, 1700 per child, 15% of earned income above 2500 rounded down, floored at 0). Return [credit, used, refundable].
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(kids, others, magi, status, tax, earned):
thr = 200000
credit = 2000 * kids + 500 * others
if magi > thr: credit = max(0, credit - 50 * (-(-(magi - thr) // 1000)))
used = min(credit, tax)
refundable = min(credit - used, 1700 * kids, max(0, (earned - 2500) * 15 // 100))
return [credit, used, refundable]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression joint-threshold 1', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('regression joint-threshold 2', (2, 0, 350000, 'mfj', 1000, 350000), [4000, 1000, 3000]),
('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),
('control: fraction thereof', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0]),
('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125]),
('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0])],
[('regression joint-threshold 1', (2, 0, 450000, 'mfj', 10000, 30481), [1500, 1500, 0]),
('regression joint-threshold 2', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),
('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),
('control: joint partial phase-out', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0]),
('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0])],
[('regression joint-threshold 1', (3, 0, 200001, 'mfj', 10000, 24871), [6000, 6000, 0]),
('regression joint-threshold 2', (3, 0, 200001, 'mfj', 10000, 30000), [6000, 6000, 0]),
('partial repair guard 1', (2, 0, 405864, 'mfj', 10000, 2000), [3700, 3700, 0]),
('partial repair guard 2', (1, 2, 450000, 'mfj', 0, 10000), [500, 0, 500]),
('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0]),
('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),
('control: fraction thereof', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0]),
('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125])],
[('regression joint-threshold 1', (1, 0, 201000, 'mfj', 0, 2000), [2000, 0, 0]),
('regression joint-threshold 2', (2, 1, 275424, 'mfj', 0, 10000), [4500, 0, 1125]),
('partial repair guard 1', (3, 2, 450000, 'mfj', 500, 0), [4500, 500, 0]),
('partial repair guard 2', (1, 0, 400001, 'mfj', 5000, 42362), [1950, 1950, 0]),
('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125]),
('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),
('control: joint partial phase-out', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0])],
[('regression joint-threshold 1', (2, 0, 405864, 'mfj', 10000, 2000), [3700, 3700, 0]),
('regression joint-threshold 2', (1, 0, 201000, 'mfj', 5000, 10000), [2000, 2000, 0]),
('partial repair guard 1', (1, 0, 400001, 'mfj', 0, 30000), [1950, 0, 1700]),
('partial repair guard 2', (3, 2, 450000, 'mfj', 5000, 30000), [4500, 4500, 0]),
('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0]),
('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0]),
('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),
('control: fraction thereof', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0])]]
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 joint-threshold 1 | [0, 0, 0] | [6450, 1000, 5100] | Failed |
| regression joint-threshold 2 | [0, 0, 0] | [4000, 1000, 3000] | Failed |
| control: refund limited by child cap | [4000, 1000, 3000] | [4000, 1000, 3000] | Passed |
| control: fraction thereof | [4400, 4400, 0] | [4400, 4400, 0] | Passed |
| control: earned limit | [2000, 0, 1125] | [2000, 0, 1125] | Passed |
| control: fully phased | [0, 0, 0] | [0, 0, 0] | Passed |
SHA-256 / c2be88dc59f03520a2d6ffa911f3e512f7bc550d51b4fdc8c37e10907f2ea939
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(kids, others, magi, status, tax, earned):
thr = {'single': 200000, 'mfj': 300000}[status]
credit = 2000 * kids + 500 * others
if magi > thr: credit = max(0, credit - 50 * (-(-(magi - thr) // 1000)))
used = min(credit, tax)
refundable = min(credit - used, 1700 * kids, max(0, (earned - 2500) * 15 // 100))
return [credit, used, refundable]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression joint-threshold 1', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('regression joint-threshold 2', (2, 0, 350000, 'mfj', 1000, 350000), [4000, 1000, 3000]),
('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),
('control: fraction thereof', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0]),
('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125]),
('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0])],
[('regression joint-threshold 1', (2, 0, 450000, 'mfj', 10000, 30481), [1500, 1500, 0]),
('regression joint-threshold 2', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),
('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),
('control: joint partial phase-out', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0]),
('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0])],
[('regression joint-threshold 1', (3, 0, 200001, 'mfj', 10000, 24871), [6000, 6000, 0]),
('regression joint-threshold 2', (3, 0, 200001, 'mfj', 10000, 30000), [6000, 6000, 0]),
('partial repair guard 1', (2, 0, 405864, 'mfj', 10000, 2000), [3700, 3700, 0]),
('partial repair guard 2', (1, 2, 450000, 'mfj', 0, 10000), [500, 0, 500]),
('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0]),
('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),
('control: fraction thereof', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0]),
('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125])],
[('regression joint-threshold 1', (1, 0, 201000, 'mfj', 0, 2000), [2000, 0, 0]),
('regression joint-threshold 2', (2, 1, 275424, 'mfj', 0, 10000), [4500, 0, 1125]),
('partial repair guard 1', (3, 2, 450000, 'mfj', 500, 0), [4500, 500, 0]),
('partial repair guard 2', (1, 0, 400001, 'mfj', 5000, 42362), [1950, 1950, 0]),
('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125]),
('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),
('control: joint partial phase-out', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0])],
[('regression joint-threshold 1', (2, 0, 405864, 'mfj', 10000, 2000), [3700, 3700, 0]),
('regression joint-threshold 2', (1, 0, 201000, 'mfj', 5000, 10000), [2000, 2000, 0]),
('partial repair guard 1', (1, 0, 400001, 'mfj', 0, 30000), [1950, 0, 1700]),
('partial repair guard 2', (3, 2, 450000, 'mfj', 5000, 30000), [4500, 4500, 0]),
('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0]),
('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0]),
('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),
('control: fraction thereof', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0])]]
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 joint-threshold 1 | [1450, 1000, 450] | [6450, 1000, 5100] | Failed |
| regression joint-threshold 2 | [1500, 1000, 500] | [4000, 1000, 3000] | Failed |
| control: refund limited by child cap | [4000, 1000, 3000] | [4000, 1000, 3000] | Passed |
| control: fraction thereof | [4400, 4400, 0] | [4400, 4400, 0] | Passed |
| control: earned limit | [2000, 0, 1125] | [2000, 0, 1125] | Passed |
| control: fully phased | [0, 0, 0] | [0, 0, 0] | Passed |
SHA-256 / ea28eeb40a5a5323efa51206779d1d6d29df4b12968be9caa47a6ff305cf8259
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(kids, others, magi, status, tax, earned):
thr = {'single': 200000, 'mfj': 400000}[status]
credit = 2000 * kids + 500 * others
if magi > thr: credit = max(0, credit - 50 * (-(-(magi - thr) // 1000)))
used = min(credit, tax)
refundable = min(credit - used, 1700 * kids, max(0, (earned - 2500) * 15 // 100))
return [credit, used, refundable]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression joint-threshold 1', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('regression joint-threshold 2', (2, 0, 350000, 'mfj', 1000, 350000), [4000, 1000, 3000]),
('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),
('control: fraction thereof', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0]),
('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125]),
('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0])],
[('regression joint-threshold 1', (2, 0, 450000, 'mfj', 10000, 30481), [1500, 1500, 0]),
('regression joint-threshold 2', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),
('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),
('control: joint partial phase-out', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0]),
('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0])],
[('regression joint-threshold 1', (3, 0, 200001, 'mfj', 10000, 24871), [6000, 6000, 0]),
('regression joint-threshold 2', (3, 0, 200001, 'mfj', 10000, 30000), [6000, 6000, 0]),
('partial repair guard 1', (2, 0, 405864, 'mfj', 10000, 2000), [3700, 3700, 0]),
('partial repair guard 2', (1, 2, 450000, 'mfj', 0, 10000), [500, 0, 500]),
('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0]),
('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),
('control: fraction thereof', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0]),
('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125])],
[('regression joint-threshold 1', (1, 0, 201000, 'mfj', 0, 2000), [2000, 0, 0]),
('regression joint-threshold 2', (2, 1, 275424, 'mfj', 0, 10000), [4500, 0, 1125]),
('partial repair guard 1', (3, 2, 450000, 'mfj', 500, 0), [4500, 500, 0]),
('partial repair guard 2', (1, 0, 400001, 'mfj', 5000, 42362), [1950, 1950, 0]),
('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125]),
('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),
('control: joint partial phase-out', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0])],
[('regression joint-threshold 1', (2, 0, 405864, 'mfj', 10000, 2000), [3700, 3700, 0]),
('regression joint-threshold 2', (1, 0, 201000, 'mfj', 5000, 10000), [2000, 2000, 0]),
('partial repair guard 1', (1, 0, 400001, 'mfj', 0, 30000), [1950, 0, 1700]),
('partial repair guard 2', (3, 2, 450000, 'mfj', 5000, 30000), [4500, 4500, 0]),
('control: other dependents only', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0]),
('control: low earner', (2, 0, 2000, 'single', 0, 2000), [4000, 0, 0]),
('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),
('control: fraction thereof', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0])]]
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 joint-threshold 1 | [6450, 1000, 5100] | [6450, 1000, 5100] | Passed |
| regression joint-threshold 2 | [4000, 1000, 3000] | [4000, 1000, 3000] | Passed |
| control: refund limited by child cap | [4000, 1000, 3000] | [4000, 1000, 3000] | Passed |
| control: fraction thereof | [4400, 4400, 0] | [4400, 4400, 0] | Passed |
| control: earned limit | [2000, 0, 1125] | [2000, 0, 1125] | Passed |
| control: fully phased | [0, 0, 0] | [0, 0, 0] | Passed |
SHA-256 / 7859ba66f54debb7f1a700e1334d079aa76710b287686e7c84fd8a4a0c26d77a
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:08.298157+00:00.
Case digest / 56fafbb7fd9172f8a8411c8f650e2d0e64dcf4879392dbfbb0f7b45728021280