FA-62836 / Tax bracket computation / Open access
Other dependents raise the refundable cap · case 01
Families with non-child dependents receive larger refunds than stipulated.
ROOT CAUSE
The refundable cap counts other dependents as children.
VERIFIED REPAIR
Cap the refundable portion at 1700 per qualifying child only.
Unsuccessful approach: Capping at the full 2000 per child ignores the lower refundable ceiling.
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 = {'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 + others), 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 refundable-per-child 1', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0]),
('regression refundable-per-child 2', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('partial repair guard 2', (2, 0, 201000, 'mfj', 500, 30000), [4000, 500, 3400]),
('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 refundable-per-child 1', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),
('regression refundable-per-child 2', (0, 1, 136686, 'single', 0, 8248), [500, 0, 0]),
('partial repair guard 1', (1, 0, 400001, 'mfj', 0, 30000), [1950, 0, 1700]),
('partial repair guard 2', (2, 0, 357237, 'mfj', 500, 89964), [4000, 500, 3400]),
('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 refundable-per-child 1', (0, 1, 150314, 'single', 0, 30000), [500, 0, 0]),
('regression refundable-per-child 2', (0, 1, 200001, 'mfj', 0, 30000), [500, 0, 0]),
('partial repair guard 1', (2, 0, 200001, 'single', 0, 93156), [3950, 0, 3400]),
('partial repair guard 2', (3, 0, 200001, 'mfj', 0, 86802), [6000, 0, 5100]),
('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 refundable-per-child 1', (2, 1, 201000, 'mfj', 500, 30000), [4500, 500, 3400]),
('regression refundable-per-child 2', (0, 2, 200001, 'mfj', 0, 30000), [1000, 0, 0]),
('partial repair guard 2', (2, 2, 200001, 'single', 1000, 59164), [4950, 1000, 3400]),
('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 refundable-per-child 1', (2, 2, 200001, 'single', 1000, 59164), [4950, 1000, 3400]),
('regression refundable-per-child 2', (0, 2, 200001, 'mfj', 500, 3000), [1000, 500, 0]),
('partial repair guard 1', (1, 2, 24911, 'mfj', 500, 68193), [3000, 500, 1700]),
('partial repair guard 2', (2, 0, 201000, 'single', 0, 30000), [3950, 0, 3400]),
('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 refundable-per-child 1 | [1500, 0, 1500] | [1500, 0, 0] | Failed |
| regression refundable-per-child 2 | [6450, 1000, 5450] | [6450, 1000, 5100] | Failed |
| partial repair guard 2 | [4000, 500, 3400] | [4000, 500, 3400] | 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 / f7ab372fd7b4e97e0bd83d0389e53d2b102bae8435b813a0fb1c013e2162d72c
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': 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, 2000 * 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 refundable-per-child 1', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0]),
('regression refundable-per-child 2', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('partial repair guard 2', (2, 0, 201000, 'mfj', 500, 30000), [4000, 500, 3400]),
('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 refundable-per-child 1', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),
('regression refundable-per-child 2', (0, 1, 136686, 'single', 0, 8248), [500, 0, 0]),
('partial repair guard 1', (1, 0, 400001, 'mfj', 0, 30000), [1950, 0, 1700]),
('partial repair guard 2', (2, 0, 357237, 'mfj', 500, 89964), [4000, 500, 3400]),
('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 refundable-per-child 1', (0, 1, 150314, 'single', 0, 30000), [500, 0, 0]),
('regression refundable-per-child 2', (0, 1, 200001, 'mfj', 0, 30000), [500, 0, 0]),
('partial repair guard 1', (2, 0, 200001, 'single', 0, 93156), [3950, 0, 3400]),
('partial repair guard 2', (3, 0, 200001, 'mfj', 0, 86802), [6000, 0, 5100]),
('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 refundable-per-child 1', (2, 1, 201000, 'mfj', 500, 30000), [4500, 500, 3400]),
('regression refundable-per-child 2', (0, 2, 200001, 'mfj', 0, 30000), [1000, 0, 0]),
('partial repair guard 2', (2, 2, 200001, 'single', 1000, 59164), [4950, 1000, 3400]),
('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 refundable-per-child 1', (2, 2, 200001, 'single', 1000, 59164), [4950, 1000, 3400]),
('regression refundable-per-child 2', (0, 2, 200001, 'mfj', 500, 3000), [1000, 500, 0]),
('partial repair guard 1', (1, 2, 24911, 'mfj', 500, 68193), [3000, 500, 1700]),
('partial repair guard 2', (2, 0, 201000, 'single', 0, 30000), [3950, 0, 3400]),
('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 refundable-per-child 1 | [1500, 0, 0] | [1500, 0, 0] | Passed |
| regression refundable-per-child 2 | [6450, 1000, 5450] | [6450, 1000, 5100] | Failed |
| partial repair guard 2 | [4000, 500, 3500] | [4000, 500, 3400] | 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 / 861cadc0dc167765f73ada0702692e07ec5142a83a843fa2453752417e9d64c8
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 refundable-per-child 1', (0, 3, 50000, 'single', 0, 50000), [1500, 0, 0]),
('regression refundable-per-child 2', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('partial repair guard 2', (2, 0, 201000, 'mfj', 500, 30000), [4000, 500, 3400]),
('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 refundable-per-child 1', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),
('regression refundable-per-child 2', (0, 1, 136686, 'single', 0, 8248), [500, 0, 0]),
('partial repair guard 1', (1, 0, 400001, 'mfj', 0, 30000), [1950, 0, 1700]),
('partial repair guard 2', (2, 0, 357237, 'mfj', 500, 89964), [4000, 500, 3400]),
('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 refundable-per-child 1', (0, 1, 150314, 'single', 0, 30000), [500, 0, 0]),
('regression refundable-per-child 2', (0, 1, 200001, 'mfj', 0, 30000), [500, 0, 0]),
('partial repair guard 1', (2, 0, 200001, 'single', 0, 93156), [3950, 0, 3400]),
('partial repair guard 2', (3, 0, 200001, 'mfj', 0, 86802), [6000, 0, 5100]),
('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 refundable-per-child 1', (2, 1, 201000, 'mfj', 500, 30000), [4500, 500, 3400]),
('regression refundable-per-child 2', (0, 2, 200001, 'mfj', 0, 30000), [1000, 0, 0]),
('partial repair guard 2', (2, 2, 200001, 'single', 1000, 59164), [4950, 1000, 3400]),
('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 refundable-per-child 1', (2, 2, 200001, 'single', 1000, 59164), [4950, 1000, 3400]),
('regression refundable-per-child 2', (0, 2, 200001, 'mfj', 500, 3000), [1000, 500, 0]),
('partial repair guard 1', (1, 2, 24911, 'mfj', 500, 68193), [3000, 500, 1700]),
('partial repair guard 2', (2, 0, 201000, 'single', 0, 30000), [3950, 0, 3400]),
('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 refundable-per-child 1 | [1500, 0, 0] | [1500, 0, 0] | Passed |
| regression refundable-per-child 2 | [6450, 1000, 5100] | [6450, 1000, 5100] | Passed |
| partial repair guard 2 | [4000, 500, 3400] | [4000, 500, 3400] | 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 / 368293d87d1f12efdc7bce042b6b19f72528c3a164d163c51b1506e9a8b0855a
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.481837+00:00.
Case digest / b352eff150d4d4c49184f6762aed4c34626278d67a33aa14c273d93e3301fa0e