FA-62816 / Tax bracket computation / Open access
Partial thousands above the threshold do not reduce the credit · case 01
MAGI 1 dollar over the threshold keeps the full credit.
ROOT CAUSE
The number of reduction steps uses floor division instead of 'or fraction thereof'.
THE FAILURE
The number of reduction steps uses floor division instead of 'or fraction thereof'.
Unsuccessful approach: Rounding the step count to nearest still ignores fractions below one half.
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, 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 fraction-thereof 1', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0]),
('regression fraction-thereof 2', (2, 0, 200400, 'single', 10000, 200000), [3950, 3950, 0]),
('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),
('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])],
[('regression fraction-thereof 1', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('regression fraction-thereof 2', (3, 2, 200001, 'single', 5000, 2000), [6950, 5000, 0]),
('partial repair guard 2', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),
('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [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])],
[('regression fraction-thereof 1', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),
('regression fraction-thereof 2', (3, 0, 200001, 'single', 1000, 47030), [5950, 1000, 4950]),
('partial repair guard 2', (3, 0, 243227, 'single', 0, 10000), [3800, 0, 1125]),
('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 fraction-thereof 1', (3, 0, 243227, 'single', 0, 10000), [3800, 0, 1125]),
('regression fraction-thereof 2', (2, 0, 405864, 'mfj', 10000, 2000), [3700, 3700, 0]),
('partial repair guard 1', (3, 2, 200001, 'single', 10000, 3000), [6950, 6950, 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 fraction-thereof 1', (3, 2, 200001, 'single', 10000, 3000), [6950, 6950, 0]),
('regression fraction-thereof 2', (1, 0, 400001, 'mfj', 5000, 42362), [1950, 1950, 0]),
('partial repair guard 1', (2, 2, 200001, 'single', 500, 2000), [4950, 500, 0]),
('partial repair guard 2', (1, 0, 400001, 'mfj', 0, 30000), [1950, 0, 1700]),
('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 fraction-thereof 1 | [4450, 4450, 0] | [4400, 4400, 0] | Failed |
| regression fraction-thereof 2 | [4000, 4000, 0] | [3950, 3950, 0] | Failed |
| control: refund limited by child cap | [4000, 1000, 3000] | [4000, 1000, 3000] | Passed |
| control: earned limit | [2000, 0, 1125] | [2000, 0, 1125] | Passed |
| control: fully phased | [0, 0, 0] | [0, 0, 0] | Passed |
| control: joint partial phase-out | [6500, 1000, 5100] | [6450, 1000, 5100] | Failed |
SHA-256 / e897ef0a1c4ac3d7aa874cbc373441a229107dbb296c4ad4536aea1cd3e17c35
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 + 500) // 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 fraction-thereof 1', (2, 1, 201001, 'single', 10000, 200000), [4400, 4400, 0]),
('regression fraction-thereof 2', (2, 0, 200400, 'single', 10000, 200000), [3950, 3950, 0]),
('control: refund limited by child cap', (2, 0, 150000, 'single', 1000, 30000), [4000, 1000, 3000]),
('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])],
[('regression fraction-thereof 1', (3, 2, 410500, 'mfj', 1000, 410500), [6450, 1000, 5100]),
('regression fraction-thereof 2', (3, 2, 200001, 'single', 5000, 2000), [6950, 5000, 0]),
('partial repair guard 2', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),
('control: fully phased', (1, 0, 450000, 'mfj', 5000, 450000), [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])],
[('regression fraction-thereof 1', (0, 2, 400001, 'mfj', 500, 3000), [950, 500, 0]),
('regression fraction-thereof 2', (3, 0, 200001, 'single', 1000, 47030), [5950, 1000, 4950]),
('partial repair guard 2', (3, 0, 243227, 'single', 0, 10000), [3800, 0, 1125]),
('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 fraction-thereof 1', (3, 0, 243227, 'single', 0, 10000), [3800, 0, 1125]),
('regression fraction-thereof 2', (2, 0, 405864, 'mfj', 10000, 2000), [3700, 3700, 0]),
('partial repair guard 1', (3, 2, 200001, 'single', 10000, 3000), [6950, 6950, 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 fraction-thereof 1', (3, 2, 200001, 'single', 10000, 3000), [6950, 6950, 0]),
('regression fraction-thereof 2', (1, 0, 400001, 'mfj', 5000, 42362), [1950, 1950, 0]),
('partial repair guard 1', (2, 2, 200001, 'single', 500, 2000), [4950, 500, 0]),
('partial repair guard 2', (1, 0, 400001, 'mfj', 0, 30000), [1950, 0, 1700]),
('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 fraction-thereof 1 | [4450, 4450, 0] | [4400, 4400, 0] | Failed |
| regression fraction-thereof 2 | [4000, 4000, 0] | [3950, 3950, 0] | Failed |
| control: refund limited by child cap | [4000, 1000, 3000] | [4000, 1000, 3000] | Passed |
| control: earned limit | [2000, 0, 1125] | [2000, 0, 1125] | Passed |
| control: fully phased | [0, 0, 0] | [0, 0, 0] | Passed |
| control: joint partial phase-out | [6450, 1000, 5100] | [6450, 1000, 5100] | Passed |
SHA-256 / 15b0a15ed2cff9fc2855731fd733ed1ab6f1165cf808daa5ba102a5e00fdb990
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 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.255440+00:00.
Case digest / b73a7bbf7f678355344456c68e8d91f9e6558859cf06c3c7f4f5fcaf5108e3f2