FA-62806 / Tax bracket computation / Open access
Joint assessments use the single exemption limit · case 01
Couples pay the surcharge from half the stipulated joint limit.
ROOT CAUSE
The exemption limit is not doubled for joint assessment.
VERIFIED REPAIR
Double the limit for joint assessment in both the exemption test and the glide.
Unsuccessful approach: Doubling the limit only in the exemption test leaves the glide measured from the single limit.
Case contract
solve(income_tax, joint): stipulated surcharge on income tax, in integer cents. The exemption limit is 1813000 (doubled for joint assessment). At or below it the surcharge is 0; above it the surcharge is the lesser of 5.5% of the income tax and 11.9% of the excess over the limit (a gliding zone), rounded down to cents.
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(income_tax, joint):
thr = 1813000
if income_tax <= thr: return 0
soli = min(income_tax * Fraction(55, 1000), (income_tax - thr) * Fraction(119, 1000))
return int(soli)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression joint-limit 1', (3700000, True), 8806), ('regression joint-limit 2', (3000000, True), 0),
('partial repair guard 2', (3626001, True), 0), ('control: at limit', (1813000, False), 0),
('control: gliding zone', (1900000, False), 10353), ('control: full rate', (5000000, False), 275000),
('control: glide edge', (3300000, False), 176953)],
[('regression joint-limit 1', (1813009, True), 0), ('regression joint-limit 2', (3626001, True), 0),
('partial repair guard 1', (4499538, True), 103951), ('partial repair guard 2', (4442992, True), 97222),
('control: joint glide', (3700000, True), 8806), ('control: joint below', (3000000, True), 0),
('control: glide edge', (3300000, False), 176953), ('control: at limit', (1813000, False), 0)],
[('regression joint-limit 1', (4499538, True), 103951), ('regression joint-limit 2', (2007148, True), 0),
('partial repair guard 1', (3675221, True), 5857), ('partial repair guard 2', (5462037, True), 218488),
('control: at limit', (1813000, False), 0), ('control: gliding zone', (1900000, False), 10353),
('control: full rate', (5000000, False), 275000), ('control: joint glide', (3700000, True), 8806)],
[('regression joint-limit 1', (2212099, True), 0), ('regression joint-limit 2', (3158865, True), 0),
('partial repair guard 1', (5229138, True), 190773), ('partial repair guard 2', (5134546, True), 179516),
('control: joint glide', (3700000, True), 8806), ('control: joint below', (3000000, True), 0),
('control: glide edge', (3300000, False), 176953), ('control: at limit', (1813000, False), 0)],
[('regression joint-limit 1', (2685272, True), 0), ('regression joint-limit 2', (2964428, True), 0),
('partial repair guard 1', (4465171, True), 99861), ('partial repair guard 2', (3657037, True), 3693),
('control: at limit', (1813000, False), 0), ('control: gliding zone', (1900000, False), 10353),
('control: full rate', (5000000, False), 275000), ('control: joint glide', (3700000, True), 8806)]]
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-limit 1 | 203500 | 8806 | Failed |
| regression joint-limit 2 | 141253 | 0 | Failed |
| partial repair guard 2 | 199430 | 0 | Failed |
| control: at limit | 0 | 0 | Passed |
| control: gliding zone | 10353 | 10353 | Passed |
| control: full rate | 275000 | 275000 | Passed |
| control: glide edge | 176953 | 176953 | Passed |
SHA-256 / 6962f9c673f6fb3bd41348418011e1a76b1299ac5b5b9fb1c60351c0b21e142b
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(income_tax, joint):
thr = 1813000
if income_tax <= thr * (2 if joint else 1): return 0
soli = min(income_tax * Fraction(55, 1000), (income_tax - thr) * Fraction(119, 1000))
return int(soli)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression joint-limit 1', (3700000, True), 8806), ('regression joint-limit 2', (3000000, True), 0),
('partial repair guard 2', (3626001, True), 0), ('control: at limit', (1813000, False), 0),
('control: gliding zone', (1900000, False), 10353), ('control: full rate', (5000000, False), 275000),
('control: glide edge', (3300000, False), 176953)],
[('regression joint-limit 1', (1813009, True), 0), ('regression joint-limit 2', (3626001, True), 0),
('partial repair guard 1', (4499538, True), 103951), ('partial repair guard 2', (4442992, True), 97222),
('control: joint glide', (3700000, True), 8806), ('control: joint below', (3000000, True), 0),
('control: glide edge', (3300000, False), 176953), ('control: at limit', (1813000, False), 0)],
[('regression joint-limit 1', (4499538, True), 103951), ('regression joint-limit 2', (2007148, True), 0),
('partial repair guard 1', (3675221, True), 5857), ('partial repair guard 2', (5462037, True), 218488),
('control: at limit', (1813000, False), 0), ('control: gliding zone', (1900000, False), 10353),
('control: full rate', (5000000, False), 275000), ('control: joint glide', (3700000, True), 8806)],
[('regression joint-limit 1', (2212099, True), 0), ('regression joint-limit 2', (3158865, True), 0),
('partial repair guard 1', (5229138, True), 190773), ('partial repair guard 2', (5134546, True), 179516),
('control: joint glide', (3700000, True), 8806), ('control: joint below', (3000000, True), 0),
('control: glide edge', (3300000, False), 176953), ('control: at limit', (1813000, False), 0)],
[('regression joint-limit 1', (2685272, True), 0), ('regression joint-limit 2', (2964428, True), 0),
('partial repair guard 1', (4465171, True), 99861), ('partial repair guard 2', (3657037, True), 3693),
('control: at limit', (1813000, False), 0), ('control: gliding zone', (1900000, False), 10353),
('control: full rate', (5000000, False), 275000), ('control: joint glide', (3700000, True), 8806)]]
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-limit 1 | 203500 | 8806 | Failed |
| regression joint-limit 2 | 0 | 0 | Passed |
| partial repair guard 2 | 199430 | 0 | Failed |
| control: at limit | 0 | 0 | Passed |
| control: gliding zone | 10353 | 10353 | Passed |
| control: full rate | 275000 | 275000 | Passed |
| control: glide edge | 176953 | 176953 | Passed |
SHA-256 / d2b5c19bc634372aa74a65c39dbb6e0122b6a0ae382c931b2992543332e261c9
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(income_tax, joint):
thr = 1813000 * (2 if joint else 1)
if income_tax <= thr: return 0
soli = min(income_tax * Fraction(55, 1000), (income_tax - thr) * Fraction(119, 1000))
return int(soli)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression joint-limit 1', (3700000, True), 8806), ('regression joint-limit 2', (3000000, True), 0),
('partial repair guard 2', (3626001, True), 0), ('control: at limit', (1813000, False), 0),
('control: gliding zone', (1900000, False), 10353), ('control: full rate', (5000000, False), 275000),
('control: glide edge', (3300000, False), 176953)],
[('regression joint-limit 1', (1813009, True), 0), ('regression joint-limit 2', (3626001, True), 0),
('partial repair guard 1', (4499538, True), 103951), ('partial repair guard 2', (4442992, True), 97222),
('control: joint glide', (3700000, True), 8806), ('control: joint below', (3000000, True), 0),
('control: glide edge', (3300000, False), 176953), ('control: at limit', (1813000, False), 0)],
[('regression joint-limit 1', (4499538, True), 103951), ('regression joint-limit 2', (2007148, True), 0),
('partial repair guard 1', (3675221, True), 5857), ('partial repair guard 2', (5462037, True), 218488),
('control: at limit', (1813000, False), 0), ('control: gliding zone', (1900000, False), 10353),
('control: full rate', (5000000, False), 275000), ('control: joint glide', (3700000, True), 8806)],
[('regression joint-limit 1', (2212099, True), 0), ('regression joint-limit 2', (3158865, True), 0),
('partial repair guard 1', (5229138, True), 190773), ('partial repair guard 2', (5134546, True), 179516),
('control: joint glide', (3700000, True), 8806), ('control: joint below', (3000000, True), 0),
('control: glide edge', (3300000, False), 176953), ('control: at limit', (1813000, False), 0)],
[('regression joint-limit 1', (2685272, True), 0), ('regression joint-limit 2', (2964428, True), 0),
('partial repair guard 1', (4465171, True), 99861), ('partial repair guard 2', (3657037, True), 3693),
('control: at limit', (1813000, False), 0), ('control: gliding zone', (1900000, False), 10353),
('control: full rate', (5000000, False), 275000), ('control: joint glide', (3700000, True), 8806)]]
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-limit 1 | 8806 | 8806 | Passed |
| regression joint-limit 2 | 0 | 0 | Passed |
| partial repair guard 2 | 0 | 0 | Passed |
| control: at limit | 0 | 0 | Passed |
| control: gliding zone | 10353 | 10353 | Passed |
| control: full rate | 275000 | 275000 | Passed |
| control: glide edge | 176953 | 176953 | Passed |
SHA-256 / 9509c8115475ef5ddd4983e8655b8ea3da7bdb3fa0b2f38024b0490f1c980310
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.086122+00:00.
Case digest / b42fd2bd4ca82e05653b29792d2778e2a62efabc7baf1b79883c017359b31d3f