FA-62416 / Tax bracket computation / Open access
Only the latest yearly factor is applied to the base · case 01
Thresholds reflect one year of inflation after several years of indexing.
ROOT CAUSE
The cumulative product is replaced by the current year's factor.
THE FAILURE
The cumulative product is replaced by the current year's factor.
Unsuccessful approach: Adding the yearly inflation rates instead of multiplying the factors ignores compounding.
Case contract
solve(base, factors): base is a list of statutory thresholds; factors are yearly inflation factors (decimal strings). For every year, a threshold is the base times the cumulative product of factors so far, rounded DOWN to a multiple of 50 (indexing always starts again from the unrounded base, never from a previously rounded value). A threshold may never fall below its previous year's value. Return the final-year thresholds.
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 decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_FLOOR, ROUND_CEILING, ROUND_DOWN
N = 1
observations = []
def solve(base, factors):
out = []
for t in base:
cum, prev = Decimal(1), t
for f in factors:
cum = Decimal(f)
v = int((t * cum / 50).to_integral_value(rounding=ROUND_FLOOR)) * 50
prev = max(prev, v)
out.append(prev)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression cumulative-factor 1', ([10000, 40000], ['1.031', '1.029']), [10600, 42400]),
('regression cumulative-factor 2', ([47150, 100525, 191950], ['1.054', '1.032', '1.028']), [52700, 112400, 214600]),
('partial repair guard 2', ([47150, 47150, 609350], ['0.9826', '1.0776']), [49900, 49900, 645200]),
('control: small compounding', ([10000], ['1.0049', '1.0049']), [10050]),
('control: deflation year', ([10000], ['1.02', '0.97']), [10200]),
('control: unrounded base', ([10025], ['1']), [10025]), ('control: no years', ([11600, 47150], []), [11600, 47150])],
[('regression cumulative-factor 1', ([10000], ['1.0049', '1.0049']), [10050]),
('regression cumulative-factor 2', ([47150, 47150, 609350], ['0.9826', '1.0776']), [49900, 49900, 645200]),
('partial repair guard 1', ([243725, 11600], ['0.9717', '1.0752']), [254600, 12100]),
('partial repair guard 2', ([102361], ['0.9751', '1.0398']), [103750]),
('control: unrounded base', ([10025], ['1']), [10025]), ('control: no years', ([11600, 47150], []), [11600, 47150]),
('control: three years', ([47150, 100525, 191950], ['1.054', '1.032', '1.028']), [52700, 112400, 214600]),
('control: two years', ([10000, 40000], ['1.031', '1.029']), [10600, 42400])],
[('regression cumulative-factor 1', ([243725, 11600], ['0.9717', '1.0752']), [254600, 12100]),
('regression cumulative-factor 2', ([102361], ['0.9751', '1.0398']), [103750]),
('partial repair guard 1', ([11600], ['0.9966', '1.0602', '1.0714', '1.0361', '1.0508']), [14250]),
('partial repair guard 2', ([10000, 47150, 191950], ['1.0605', '1.0510', '0.9809', '1.0498']),
[11450, 54100, 220300]),
('control: two years', ([10000, 40000], ['1.031', '1.029']), [10600, 42400]),
('control: small compounding', ([10000], ['1.0049', '1.0049']), [10050]),
('control: deflation year', ([10000], ['1.02', '0.97']), [10200]),
('control: unrounded base', ([10025], ['1']), [10025])],
[('regression cumulative-factor 1', ([11600], ['1.0439', '0.9870', '1.0302']), [12300]),
('regression cumulative-factor 2', ([11600], ['0.9966', '1.0602', '1.0714', '1.0361', '1.0508']), [14250]),
('partial repair guard 1', ([11600, 243725], ['1.0641', '1.0478', '0.9707', '1.0624', '1.0640']), [14150, 298150]),
('partial repair guard 2', ([243725], ['1.0800', '1.0031', '1.0633', '0.9916', '1.0198']), [283900]),
('control: unrounded base', ([10025], ['1']), [10025]), ('control: no years', ([11600, 47150], []), [11600, 47150]),
('control: three years', ([47150, 100525, 191950], ['1.054', '1.032', '1.028']), [52700, 112400, 214600]),
('control: two years', ([10000, 40000], ['1.031', '1.029']), [10600, 42400])],
[('regression cumulative-factor 1', ([10000, 47150, 191950], ['1.0605', '1.0510', '0.9809', '1.0498']),
[11450, 54100, 220300]),
('regression cumulative-factor 2', ([11600, 243725], ['1.0641', '1.0478', '0.9707', '1.0624', '1.0640']),
[14150, 298150]),
('partial repair guard 1', ([11600], ['1.0358', '1.0752', '0.9901']), [12900]),
('partial repair guard 2', ([100525], ['1.0728', '1.0514', '1.0627', '1.0085', '1.0002']), [121500]),
('control: two years', ([10000, 40000], ['1.031', '1.029']), [10600, 42400]),
('control: small compounding', ([10000], ['1.0049', '1.0049']), [10050]),
('control: deflation year', ([10000], ['1.02', '0.97']), [10200]),
('control: unrounded base', ([10025], ['1']), [10025])]]
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 cumulative-factor 1 | [10300, 41200] | [10600, 42400] | Failed |
| regression cumulative-factor 2 | [49650, 105950, 202300] | [52700, 112400, 214600] | Failed |
| partial repair guard 2 | [50800, 50800, 656600] | [49900, 49900, 645200] | Failed |
| control: small compounding | [10000] | [10050] | Failed |
| control: deflation year | [10200] | [10200] | Passed |
| control: unrounded base | [10025] | [10025] | Passed |
| control: no years | [11600, 47150] | [11600, 47150] | Passed |
SHA-256 / 2e62a90bef1dcc4e5138e7fe193593ea3ae1b4c18b3a2c1c00bd5fb6092ce8f1
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN, ROUND_FLOOR, ROUND_CEILING, ROUND_DOWN
N = 1
observations = []
def solve(base, factors):
out = []
for t in base:
cum, prev = Decimal(1), t
for f in factors:
cum += Decimal(f) - 1
v = int((t * cum / 50).to_integral_value(rounding=ROUND_FLOOR)) * 50
prev = max(prev, v)
out.append(prev)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression cumulative-factor 1', ([10000, 40000], ['1.031', '1.029']), [10600, 42400]),
('regression cumulative-factor 2', ([47150, 100525, 191950], ['1.054', '1.032', '1.028']), [52700, 112400, 214600]),
('partial repair guard 2', ([47150, 47150, 609350], ['0.9826', '1.0776']), [49900, 49900, 645200]),
('control: small compounding', ([10000], ['1.0049', '1.0049']), [10050]),
('control: deflation year', ([10000], ['1.02', '0.97']), [10200]),
('control: unrounded base', ([10025], ['1']), [10025]), ('control: no years', ([11600, 47150], []), [11600, 47150])],
[('regression cumulative-factor 1', ([10000], ['1.0049', '1.0049']), [10050]),
('regression cumulative-factor 2', ([47150, 47150, 609350], ['0.9826', '1.0776']), [49900, 49900, 645200]),
('partial repair guard 1', ([243725, 11600], ['0.9717', '1.0752']), [254600, 12100]),
('partial repair guard 2', ([102361], ['0.9751', '1.0398']), [103750]),
('control: unrounded base', ([10025], ['1']), [10025]), ('control: no years', ([11600, 47150], []), [11600, 47150]),
('control: three years', ([47150, 100525, 191950], ['1.054', '1.032', '1.028']), [52700, 112400, 214600]),
('control: two years', ([10000, 40000], ['1.031', '1.029']), [10600, 42400])],
[('regression cumulative-factor 1', ([243725, 11600], ['0.9717', '1.0752']), [254600, 12100]),
('regression cumulative-factor 2', ([102361], ['0.9751', '1.0398']), [103750]),
('partial repair guard 1', ([11600], ['0.9966', '1.0602', '1.0714', '1.0361', '1.0508']), [14250]),
('partial repair guard 2', ([10000, 47150, 191950], ['1.0605', '1.0510', '0.9809', '1.0498']),
[11450, 54100, 220300]),
('control: two years', ([10000, 40000], ['1.031', '1.029']), [10600, 42400]),
('control: small compounding', ([10000], ['1.0049', '1.0049']), [10050]),
('control: deflation year', ([10000], ['1.02', '0.97']), [10200]),
('control: unrounded base', ([10025], ['1']), [10025])],
[('regression cumulative-factor 1', ([11600], ['1.0439', '0.9870', '1.0302']), [12300]),
('regression cumulative-factor 2', ([11600], ['0.9966', '1.0602', '1.0714', '1.0361', '1.0508']), [14250]),
('partial repair guard 1', ([11600, 243725], ['1.0641', '1.0478', '0.9707', '1.0624', '1.0640']), [14150, 298150]),
('partial repair guard 2', ([243725], ['1.0800', '1.0031', '1.0633', '0.9916', '1.0198']), [283900]),
('control: unrounded base', ([10025], ['1']), [10025]), ('control: no years', ([11600, 47150], []), [11600, 47150]),
('control: three years', ([47150, 100525, 191950], ['1.054', '1.032', '1.028']), [52700, 112400, 214600]),
('control: two years', ([10000, 40000], ['1.031', '1.029']), [10600, 42400])],
[('regression cumulative-factor 1', ([10000, 47150, 191950], ['1.0605', '1.0510', '0.9809', '1.0498']),
[11450, 54100, 220300]),
('regression cumulative-factor 2', ([11600, 243725], ['1.0641', '1.0478', '0.9707', '1.0624', '1.0640']),
[14150, 298150]),
('partial repair guard 1', ([11600], ['1.0358', '1.0752', '0.9901']), [12900]),
('partial repair guard 2', ([100525], ['1.0728', '1.0514', '1.0627', '1.0085', '1.0002']), [121500]),
('control: two years', ([10000, 40000], ['1.031', '1.029']), [10600, 42400]),
('control: small compounding', ([10000], ['1.0049', '1.0049']), [10050]),
('control: deflation year', ([10000], ['1.02', '0.97']), [10200]),
('control: unrounded base', ([10025], ['1']), [10025])]]
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 cumulative-factor 1 | [10600, 42400] | [10600, 42400] | Passed |
| regression cumulative-factor 2 | [52500, 111950, 213800] | [52700, 112400, 214600] | Failed |
| partial repair guard 2 | [49950, 49950, 646000] | [49900, 49900, 645200] | Failed |
| control: small compounding | [10050] | [10050] | Passed |
| control: deflation year | [10200] | [10200] | Passed |
| control: unrounded base | [10025] | [10025] | Passed |
| control: no years | [11600, 47150] | [11600, 47150] | Passed |
SHA-256 / 5cc33de676261159f20424dc4a16a0599f372a05202ce6f5d29d28961929fcee
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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:04.483890+00:00.
Case digest / 7b6008f6c2e30edf3e00d442b72441fa427546448861291b7a4ed435525e9c83