FA-62826 / Tax bracket computation / Open access
The phase-out drives the credit negative · case 01
Very high earners with children report a negative credit.
ROOT CAUSE
The reduced credit is not floored at zero.
THE FAILURE
The reduced credit is not floored at zero.
Unsuccessful approach: Exempting the other-dependent part from the phase-out is not the stipulated rule and still misstates the credit.
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 = 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 phaseout-floor 1', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),
('regression phaseout-floor 2', (0, 0, 450000, 'single', 500, 17366), [0, 0, 0]),
('partial repair guard 1', (1, 2, 450000, 'mfj', 5000, 450000), [500, 500, 0]),
('partial repair guard 2', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 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]),
('control: joint partial phase-out', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100])],
[('regression phaseout-floor 1', (1, 0, 400001, 'single', 0, 10000), [0, 0, 0]),
('regression phaseout-floor 2', (2, 0, 400001, 'single', 500, 0), [0, 0, 0]),
('partial repair guard 1', (3, 2, 400001, 'single', 5000, 10000), [0, 0, 0]),
('partial repair guard 2', (2, 2, 450000, 'single', 5000, 47904), [0, 0, 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 phaseout-floor 1', (3, 2, 400001, 'single', 5000, 10000), [0, 0, 0]),
('regression phaseout-floor 2', (2, 2, 450000, 'single', 5000, 47904), [0, 0, 0]),
('partial repair guard 1', (3, 2, 400001, 'single', 1000, 30000), [0, 0, 0]),
('partial repair guard 2', (2, 2, 400001, 'single', 0, 2000), [0, 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]),
('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125])],
[('regression phaseout-floor 1', (2, 0, 400001, 'single', 10000, 30000), [0, 0, 0]),
('regression phaseout-floor 2', (1, 0, 450000, 'mfj', 10000, 63223), [0, 0, 0]),
('partial repair guard 1', (0, 1, 266447, 'single', 1000, 0), [0, 0, 0]),
('partial repair guard 2', (1, 1, 450000, 'mfj', 0, 10000), [0, 0, 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 phaseout-floor 1', (3, 2, 400001, 'single', 1000, 30000), [0, 0, 0]),
('regression phaseout-floor 2', (2, 2, 400001, 'single', 0, 2000), [0, 0, 0]),
('partial repair guard 1', (1, 2, 450000, 'mfj', 0, 10000), [500, 0, 500]),
('partial repair guard 2', (0, 1, 450000, 'mfj', 5000, 85969), [0, 0, 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 phaseout-floor 1 | [-500, -500, 0] | [0, 0, 0] | Failed |
| regression phaseout-floor 2 | [-12500, -12500, 0] | [0, 0, 0] | Failed |
| partial repair guard 1 | [500, 500, 0] | [500, 500, 0] | Passed |
| partial repair guard 2 | [950, 500, 0] | [950, 500, 0] | 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: joint partial phase-out | [6450, 1000, 5100] | [6450, 1000, 5100] | Passed |
SHA-256 / c69754cf70679a50b03e9246a6d12c5e835988b6696f62bbc765d5427581a57f
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(500 * others, 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 phaseout-floor 1', (1, 0, 450000, 'mfj', 5000, 450000), [0, 0, 0]),
('regression phaseout-floor 2', (0, 0, 450000, 'single', 500, 17366), [0, 0, 0]),
('partial repair guard 1', (1, 2, 450000, 'mfj', 5000, 450000), [500, 500, 0]),
('partial repair guard 2', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 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]),
('control: joint partial phase-out', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100])],
[('regression phaseout-floor 1', (1, 0, 400001, 'single', 0, 10000), [0, 0, 0]),
('regression phaseout-floor 2', (2, 0, 400001, 'single', 500, 0), [0, 0, 0]),
('partial repair guard 1', (3, 2, 400001, 'single', 5000, 10000), [0, 0, 0]),
('partial repair guard 2', (2, 2, 450000, 'single', 5000, 47904), [0, 0, 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 phaseout-floor 1', (3, 2, 400001, 'single', 5000, 10000), [0, 0, 0]),
('regression phaseout-floor 2', (2, 2, 450000, 'single', 5000, 47904), [0, 0, 0]),
('partial repair guard 1', (3, 2, 400001, 'single', 1000, 30000), [0, 0, 0]),
('partial repair guard 2', (2, 2, 400001, 'single', 0, 2000), [0, 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]),
('control: earned limit', (1, 0, 30000, 'mfj', 0, 10000), [2000, 0, 1125])],
[('regression phaseout-floor 1', (2, 0, 400001, 'single', 10000, 30000), [0, 0, 0]),
('regression phaseout-floor 2', (1, 0, 450000, 'mfj', 10000, 63223), [0, 0, 0]),
('partial repair guard 1', (0, 1, 266447, 'single', 1000, 0), [0, 0, 0]),
('partial repair guard 2', (1, 1, 450000, 'mfj', 0, 10000), [0, 0, 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 phaseout-floor 1', (3, 2, 400001, 'single', 1000, 30000), [0, 0, 0]),
('regression phaseout-floor 2', (2, 2, 400001, 'single', 0, 2000), [0, 0, 0]),
('partial repair guard 1', (1, 2, 450000, 'mfj', 0, 10000), [500, 0, 500]),
('partial repair guard 2', (0, 1, 450000, 'mfj', 5000, 85969), [0, 0, 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 phaseout-floor 1 | [0, 0, 0] | [0, 0, 0] | Passed |
| regression phaseout-floor 2 | [0, 0, 0] | [0, 0, 0] | Passed |
| partial repair guard 1 | [1000, 1000, 0] | [500, 500, 0] | Failed |
| partial repair guard 2 | [1000, 500, 0] | [950, 500, 0] | 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: joint partial phase-out | [6450, 1000, 5100] | [6450, 1000, 5100] | Passed |
SHA-256 / 5a67fd1fd5bd2efb86ab5b7a6449947fb835657a6be5aee3642297d54e93a21d
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗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.346885+00:00.
Case digest / b09e6ae1ab6c1bc5bd7f5a89e36a2b71ee096b2f99724229eda3fab6269b2a75