FAILURE MAP
← Case archive

FA-62661 / Tax bracket computation / Open access

Fully used and expired carryforwards remain in the report · case 01

The carryforward schedule lists zero balances and long-expired losses.

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The remaining list is not filtered.

VERIFIED REPAIR

Report only positive, unexpired balances.

Unsuccessful approach: Dropping zero balances but keeping expired ones still overstates available losses.

Case contract

solve(years, life): years are pre-deduction incomes by year index (negative = operating loss). A loss year reports taxable 0 and creates a carryforward [origin, amount]. In an income year, carryforwards older than life years (year - origin > life) expire; the rest are applied oldest first, limited in total to floor(80% of that year's income). Return [taxable_by_year, remaining] where remaining lists [origin, amount] with amount > 0 not expired as of the final year.

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(years, life):
    nols, out = [], []
    for y, inc in enumerate(years):
        if inc < 0:
            out.append(0)
            nols.append([y, -inc])
            continue
        nols = [n for n in nols if y - n[0] <= life]
        room = inc * 80 // 100
        for n in nols:
            use = min(n[1], room)
            n[1] -= use
            room -= use
            inc -= use
        out.append(inc)
    last = len(years) - 1
    return [out, [[o, a] for o, a in nols]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression remaining-report 1', ([-10000, 5000, 20000], 5), [[0, 1000, 14000], []]),
  ('regression remaining-report 2', ([-5000, -3000, 10000], 5), [[0, 0, 2000], []]),
  ('partial repair guard 1', ([5000, 20000, -10000, -50000, -50000, -27330, -50000], 3),
   [[5000, 20000, 0, 0, 0, 0, 0], [[3, 50000], [4, 50000], [5, 27330], [6, 50000]]]),
  ('partial repair guard 2', ([0, 60000, -10000, -37062, -3000, 0, -3000], 2),
   [[0, 60000, 0, 0, 0, 0, 0], [[4, 3000], [6, 3000]]]),
  ('control: expired', ([-10000, 0, 0, 10000], 2), [[0, 0, 0, 10000], []]),
  ('control: odd cap', ([-50000, 10001], 5), [[0, 2001], [[0, 42000]]]),
  ('control: expiry boundary', ([-8000, 0, 5000], 2), [[0, 0, 1000], [[0, 4000]]]),
  ('control: losses after income', ([10000, -4000, -6000, 5000, 5000], 3), [[10000, 0, 0, 1000, 1000], [[2, 2000]]])],
 [('regression remaining-report 1', ([10000, -4000, -6000, 5000, 5000], 3), [[10000, 0, 0, 1000, 1000], [[2, 2000]]]),
  ('regression remaining-report 2', ([-3000, 20000, -3000, 60000, -50000], 20),
   [[0, 17000, 0, 57000, 0], [[4, 50000]]]),
  ('partial repair guard 1', ([-15586, -10000, 60000, 5000, -50000, 60000, -10000], 1),
   [[0, 0, 50000, 5000, 0, 12000, 0], [[6, 10000]]]),
  ('partial repair guard 2', ([-50000, 20000, -10000, 0, -50000], 1), [[0, 4000, 0, 0, 0], [[4, 50000]]]),
  ('control: odd cap', ([-50000, 10001], 5), [[0, 2001], [[0, 42000]]]),
  ('control: expiry boundary', ([-8000, 0, 5000], 2), [[0, 0, 1000], [[0, 4000]]]),
  ('control: no losses', ([1000, 2000], 1), [[1000, 2000], []]),
  ('control: fifo two years', ([-10000, 5000, 20000], 5), [[0, 1000, 14000], []])],
 [('regression remaining-report 1', ([5000, 20000, -10000, -50000, -50000, -27330, -50000], 3),
   [[5000, 20000, 0, 0, 0, 0, 0], [[3, 50000], [4, 50000], [5, 27330], [6, 50000]]]),
  ('regression remaining-report 2', ([-50000, 0, -10000, 20000, -10000, 20000], 1), [[0, 0, 0, 10000, 0, 10000], []]),
  ('partial repair guard 1', ([65824, -10000, 20000, -3000, -50000, -10000], 1),
   [[65824, 0, 10000, 0, 0, 0], [[4, 50000], [5, 10000]]]),
  ('partial repair guard 2', ([60000, 0, -3000, -11890, -7608, -50000], 1),
   [[60000, 0, 0, 0, 0, 0], [[4, 7608], [5, 50000]]]),
  ('control: no losses', ([1000, 2000], 1), [[1000, 2000], []]),
  ('control: fifo two years', ([-10000, 5000, 20000], 5), [[0, 1000, 14000], []]),
  ('control: two losses', ([-5000, -3000, 10000], 5), [[0, 0, 2000], []]),
  ('control: expired', ([-10000, 0, 0, 10000], 2), [[0, 0, 0, 10000], []])],
 [('regression remaining-report 1', ([-10000, -3000, 31547], 5), [[0, 0, 18547], []]),
  ('regression remaining-report 2', ([-3000, -10000, -10000, -3000, -3000, 51657, -50000], 5),
   [[0, 0, 0, 0, 0, 22657, 0], [[6, 50000]]]),
  ('partial repair guard 1', ([-10000, 0, -10000, -3000], 2), [[0, 0, 0, 0], [[2, 10000], [3, 3000]]]),
  ('partial repair guard 2', ([0, -50000, 20000, 63705, -50000, 5000, -50000], 1),
   [[0, 0, 4000, 63705, 0, 1000, 0], [[6, 50000]]]),
  ('control: expired', ([-10000, 0, 0, 10000], 2), [[0, 0, 0, 10000], []]),
  ('control: odd cap', ([-50000, 10001], 5), [[0, 2001], [[0, 42000]]]),
  ('control: expiry boundary', ([-8000, 0, 5000], 2), [[0, 0, 1000], [[0, 4000]]]),
  ('control: losses after income', ([10000, -4000, -6000, 5000, 5000], 3), [[10000, 0, 0, 1000, 1000], [[2, 2000]]])],
 [('regression remaining-report 1', ([-3000, 5000, 31590, 60000, -50000], 5),
   [[0, 2000, 31590, 60000, 0], [[4, 50000]]]),
  ('regression remaining-report 2', ([5000, -3000, 4980, -1988, -10000, -10000, 20000], 5),
   [[5000, 0, 1980, 0, 0, 0, 4000], [[5, 5988]]]),
  ('partial repair guard 1', ([-3000, -50000, -50000, -36495], 1), [[0, 0, 0, 0], [[2, 50000], [3, 36495]]]),
  ('partial repair guard 2', ([-50000, 0, -50000, -10000], 2), [[0, 0, 0, 0], [[2, 50000], [3, 10000]]]),
  ('control: losses after income', ([10000, -4000, -6000, 5000, 5000], 3), [[10000, 0, 0, 1000, 1000], [[2, 2000]]]),
  ('control: no losses', ([1000, 2000], 1), [[1000, 2000], []]),
  ('control: fifo two years', ([-10000, 5000, 20000], 5), [[0, 1000, 14000], []]),
  ('control: two losses', ([-5000, -3000, 10000], 5), [[0, 0, 2000], []])]]
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 fixtureActualExpectedOutcome
regression remaining-report 1[[0, 1000, 14000], [[0, 0]]][[0, 1000, 14000], []]Failed
regression remaining-report 2[[0, 0, 2000], [[0, 0], [1, 0]]][[0, 0, 2000], []]Failed
partial repair guard 1[[5000, 20000, 0, 0, 0, 0, 0], [[2, 10000], [3, 50000], [4, 50000], [5, 27330], [6, 50000]]][[5000, 20000, 0, 0, 0, 0, 0], [[3, 50000], [4, 50000], [5, 27330], [6, 50000]]]Failed
partial repair guard 2[[0, 60000, 0, 0, 0, 0, 0], [[3, 37062], [4, 3000], [6, 3000]]][[0, 60000, 0, 0, 0, 0, 0], [[4, 3000], [6, 3000]]]Failed
control: expired[[0, 0, 0, 10000], []][[0, 0, 0, 10000], []]Passed
control: odd cap[[0, 2001], [[0, 42000]]][[0, 2001], [[0, 42000]]]Passed
control: expiry boundary[[0, 0, 1000], [[0, 4000]]][[0, 0, 1000], [[0, 4000]]]Passed
control: losses after income[[10000, 0, 0, 1000, 1000], [[1, 0], [2, 2000]]][[10000, 0, 0, 1000, 1000], [[2, 2000]]]Failed

SHA-256 / 0d39eae041218c0ef19daee3ec3d98b2abc3dbfa2f1da743a35c22d302200fb5

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(years, life):
    nols, out = [], []
    for y, inc in enumerate(years):
        if inc < 0:
            out.append(0)
            nols.append([y, -inc])
            continue
        nols = [n for n in nols if y - n[0] <= life]
        room = inc * 80 // 100
        for n in nols:
            use = min(n[1], room)
            n[1] -= use
            room -= use
            inc -= use
        out.append(inc)
    last = len(years) - 1
    return [out, [[o, a] for o, a in nols if a > 0]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression remaining-report 1', ([-10000, 5000, 20000], 5), [[0, 1000, 14000], []]),
  ('regression remaining-report 2', ([-5000, -3000, 10000], 5), [[0, 0, 2000], []]),
  ('partial repair guard 1', ([5000, 20000, -10000, -50000, -50000, -27330, -50000], 3),
   [[5000, 20000, 0, 0, 0, 0, 0], [[3, 50000], [4, 50000], [5, 27330], [6, 50000]]]),
  ('partial repair guard 2', ([0, 60000, -10000, -37062, -3000, 0, -3000], 2),
   [[0, 60000, 0, 0, 0, 0, 0], [[4, 3000], [6, 3000]]]),
  ('control: expired', ([-10000, 0, 0, 10000], 2), [[0, 0, 0, 10000], []]),
  ('control: odd cap', ([-50000, 10001], 5), [[0, 2001], [[0, 42000]]]),
  ('control: expiry boundary', ([-8000, 0, 5000], 2), [[0, 0, 1000], [[0, 4000]]]),
  ('control: losses after income', ([10000, -4000, -6000, 5000, 5000], 3), [[10000, 0, 0, 1000, 1000], [[2, 2000]]])],
 [('regression remaining-report 1', ([10000, -4000, -6000, 5000, 5000], 3), [[10000, 0, 0, 1000, 1000], [[2, 2000]]]),
  ('regression remaining-report 2', ([-3000, 20000, -3000, 60000, -50000], 20),
   [[0, 17000, 0, 57000, 0], [[4, 50000]]]),
  ('partial repair guard 1', ([-15586, -10000, 60000, 5000, -50000, 60000, -10000], 1),
   [[0, 0, 50000, 5000, 0, 12000, 0], [[6, 10000]]]),
  ('partial repair guard 2', ([-50000, 20000, -10000, 0, -50000], 1), [[0, 4000, 0, 0, 0], [[4, 50000]]]),
  ('control: odd cap', ([-50000, 10001], 5), [[0, 2001], [[0, 42000]]]),
  ('control: expiry boundary', ([-8000, 0, 5000], 2), [[0, 0, 1000], [[0, 4000]]]),
  ('control: no losses', ([1000, 2000], 1), [[1000, 2000], []]),
  ('control: fifo two years', ([-10000, 5000, 20000], 5), [[0, 1000, 14000], []])],
 [('regression remaining-report 1', ([5000, 20000, -10000, -50000, -50000, -27330, -50000], 3),
   [[5000, 20000, 0, 0, 0, 0, 0], [[3, 50000], [4, 50000], [5, 27330], [6, 50000]]]),
  ('regression remaining-report 2', ([-50000, 0, -10000, 20000, -10000, 20000], 1), [[0, 0, 0, 10000, 0, 10000], []]),
  ('partial repair guard 1', ([65824, -10000, 20000, -3000, -50000, -10000], 1),
   [[65824, 0, 10000, 0, 0, 0], [[4, 50000], [5, 10000]]]),
  ('partial repair guard 2', ([60000, 0, -3000, -11890, -7608, -50000], 1),
   [[60000, 0, 0, 0, 0, 0], [[4, 7608], [5, 50000]]]),
  ('control: no losses', ([1000, 2000], 1), [[1000, 2000], []]),
  ('control: fifo two years', ([-10000, 5000, 20000], 5), [[0, 1000, 14000], []]),
  ('control: two losses', ([-5000, -3000, 10000], 5), [[0, 0, 2000], []]),
  ('control: expired', ([-10000, 0, 0, 10000], 2), [[0, 0, 0, 10000], []])],
 [('regression remaining-report 1', ([-10000, -3000, 31547], 5), [[0, 0, 18547], []]),
  ('regression remaining-report 2', ([-3000, -10000, -10000, -3000, -3000, 51657, -50000], 5),
   [[0, 0, 0, 0, 0, 22657, 0], [[6, 50000]]]),
  ('partial repair guard 1', ([-10000, 0, -10000, -3000], 2), [[0, 0, 0, 0], [[2, 10000], [3, 3000]]]),
  ('partial repair guard 2', ([0, -50000, 20000, 63705, -50000, 5000, -50000], 1),
   [[0, 0, 4000, 63705, 0, 1000, 0], [[6, 50000]]]),
  ('control: expired', ([-10000, 0, 0, 10000], 2), [[0, 0, 0, 10000], []]),
  ('control: odd cap', ([-50000, 10001], 5), [[0, 2001], [[0, 42000]]]),
  ('control: expiry boundary', ([-8000, 0, 5000], 2), [[0, 0, 1000], [[0, 4000]]]),
  ('control: losses after income', ([10000, -4000, -6000, 5000, 5000], 3), [[10000, 0, 0, 1000, 1000], [[2, 2000]]])],
 [('regression remaining-report 1', ([-3000, 5000, 31590, 60000, -50000], 5),
   [[0, 2000, 31590, 60000, 0], [[4, 50000]]]),
  ('regression remaining-report 2', ([5000, -3000, 4980, -1988, -10000, -10000, 20000], 5),
   [[5000, 0, 1980, 0, 0, 0, 4000], [[5, 5988]]]),
  ('partial repair guard 1', ([-3000, -50000, -50000, -36495], 1), [[0, 0, 0, 0], [[2, 50000], [3, 36495]]]),
  ('partial repair guard 2', ([-50000, 0, -50000, -10000], 2), [[0, 0, 0, 0], [[2, 50000], [3, 10000]]]),
  ('control: losses after income', ([10000, -4000, -6000, 5000, 5000], 3), [[10000, 0, 0, 1000, 1000], [[2, 2000]]]),
  ('control: no losses', ([1000, 2000], 1), [[1000, 2000], []]),
  ('control: fifo two years', ([-10000, 5000, 20000], 5), [[0, 1000, 14000], []]),
  ('control: two losses', ([-5000, -3000, 10000], 5), [[0, 0, 2000], []])]]
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 fixtureActualExpectedOutcome
regression remaining-report 1[[0, 1000, 14000], []][[0, 1000, 14000], []]Passed
regression remaining-report 2[[0, 0, 2000], []][[0, 0, 2000], []]Passed
partial repair guard 1[[5000, 20000, 0, 0, 0, 0, 0], [[2, 10000], [3, 50000], [4, 50000], [5, 27330], [6, 50000]]][[5000, 20000, 0, 0, 0, 0, 0], [[3, 50000], [4, 50000], [5, 27330], [6, 50000]]]Failed
partial repair guard 2[[0, 60000, 0, 0, 0, 0, 0], [[3, 37062], [4, 3000], [6, 3000]]][[0, 60000, 0, 0, 0, 0, 0], [[4, 3000], [6, 3000]]]Failed
control: expired[[0, 0, 0, 10000], []][[0, 0, 0, 10000], []]Passed
control: odd cap[[0, 2001], [[0, 42000]]][[0, 2001], [[0, 42000]]]Passed
control: expiry boundary[[0, 0, 1000], [[0, 4000]]][[0, 0, 1000], [[0, 4000]]]Passed
control: losses after income[[10000, 0, 0, 1000, 1000], [[2, 2000]]][[10000, 0, 0, 1000, 1000], [[2, 2000]]]Passed

SHA-256 / 46cc6396a67078f0ed2a9b32f9d97cd06a837d039effed7178061c9ca82b25b1

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(years, life):
    nols, out = [], []
    for y, inc in enumerate(years):
        if inc < 0:
            out.append(0)
            nols.append([y, -inc])
            continue
        nols = [n for n in nols if y - n[0] <= life]
        room = inc * 80 // 100
        for n in nols:
            use = min(n[1], room)
            n[1] -= use
            room -= use
            inc -= use
        out.append(inc)
    last = len(years) - 1
    return [out, [[o, a] for o, a in nols if a > 0 and last - o <= life]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('regression remaining-report 1', ([-10000, 5000, 20000], 5), [[0, 1000, 14000], []]),
  ('regression remaining-report 2', ([-5000, -3000, 10000], 5), [[0, 0, 2000], []]),
  ('partial repair guard 1', ([5000, 20000, -10000, -50000, -50000, -27330, -50000], 3),
   [[5000, 20000, 0, 0, 0, 0, 0], [[3, 50000], [4, 50000], [5, 27330], [6, 50000]]]),
  ('partial repair guard 2', ([0, 60000, -10000, -37062, -3000, 0, -3000], 2),
   [[0, 60000, 0, 0, 0, 0, 0], [[4, 3000], [6, 3000]]]),
  ('control: expired', ([-10000, 0, 0, 10000], 2), [[0, 0, 0, 10000], []]),
  ('control: odd cap', ([-50000, 10001], 5), [[0, 2001], [[0, 42000]]]),
  ('control: expiry boundary', ([-8000, 0, 5000], 2), [[0, 0, 1000], [[0, 4000]]]),
  ('control: losses after income', ([10000, -4000, -6000, 5000, 5000], 3), [[10000, 0, 0, 1000, 1000], [[2, 2000]]])],
 [('regression remaining-report 1', ([10000, -4000, -6000, 5000, 5000], 3), [[10000, 0, 0, 1000, 1000], [[2, 2000]]]),
  ('regression remaining-report 2', ([-3000, 20000, -3000, 60000, -50000], 20),
   [[0, 17000, 0, 57000, 0], [[4, 50000]]]),
  ('partial repair guard 1', ([-15586, -10000, 60000, 5000, -50000, 60000, -10000], 1),
   [[0, 0, 50000, 5000, 0, 12000, 0], [[6, 10000]]]),
  ('partial repair guard 2', ([-50000, 20000, -10000, 0, -50000], 1), [[0, 4000, 0, 0, 0], [[4, 50000]]]),
  ('control: odd cap', ([-50000, 10001], 5), [[0, 2001], [[0, 42000]]]),
  ('control: expiry boundary', ([-8000, 0, 5000], 2), [[0, 0, 1000], [[0, 4000]]]),
  ('control: no losses', ([1000, 2000], 1), [[1000, 2000], []]),
  ('control: fifo two years', ([-10000, 5000, 20000], 5), [[0, 1000, 14000], []])],
 [('regression remaining-report 1', ([5000, 20000, -10000, -50000, -50000, -27330, -50000], 3),
   [[5000, 20000, 0, 0, 0, 0, 0], [[3, 50000], [4, 50000], [5, 27330], [6, 50000]]]),
  ('regression remaining-report 2', ([-50000, 0, -10000, 20000, -10000, 20000], 1), [[0, 0, 0, 10000, 0, 10000], []]),
  ('partial repair guard 1', ([65824, -10000, 20000, -3000, -50000, -10000], 1),
   [[65824, 0, 10000, 0, 0, 0], [[4, 50000], [5, 10000]]]),
  ('partial repair guard 2', ([60000, 0, -3000, -11890, -7608, -50000], 1),
   [[60000, 0, 0, 0, 0, 0], [[4, 7608], [5, 50000]]]),
  ('control: no losses', ([1000, 2000], 1), [[1000, 2000], []]),
  ('control: fifo two years', ([-10000, 5000, 20000], 5), [[0, 1000, 14000], []]),
  ('control: two losses', ([-5000, -3000, 10000], 5), [[0, 0, 2000], []]),
  ('control: expired', ([-10000, 0, 0, 10000], 2), [[0, 0, 0, 10000], []])],
 [('regression remaining-report 1', ([-10000, -3000, 31547], 5), [[0, 0, 18547], []]),
  ('regression remaining-report 2', ([-3000, -10000, -10000, -3000, -3000, 51657, -50000], 5),
   [[0, 0, 0, 0, 0, 22657, 0], [[6, 50000]]]),
  ('partial repair guard 1', ([-10000, 0, -10000, -3000], 2), [[0, 0, 0, 0], [[2, 10000], [3, 3000]]]),
  ('partial repair guard 2', ([0, -50000, 20000, 63705, -50000, 5000, -50000], 1),
   [[0, 0, 4000, 63705, 0, 1000, 0], [[6, 50000]]]),
  ('control: expired', ([-10000, 0, 0, 10000], 2), [[0, 0, 0, 10000], []]),
  ('control: odd cap', ([-50000, 10001], 5), [[0, 2001], [[0, 42000]]]),
  ('control: expiry boundary', ([-8000, 0, 5000], 2), [[0, 0, 1000], [[0, 4000]]]),
  ('control: losses after income', ([10000, -4000, -6000, 5000, 5000], 3), [[10000, 0, 0, 1000, 1000], [[2, 2000]]])],
 [('regression remaining-report 1', ([-3000, 5000, 31590, 60000, -50000], 5),
   [[0, 2000, 31590, 60000, 0], [[4, 50000]]]),
  ('regression remaining-report 2', ([5000, -3000, 4980, -1988, -10000, -10000, 20000], 5),
   [[5000, 0, 1980, 0, 0, 0, 4000], [[5, 5988]]]),
  ('partial repair guard 1', ([-3000, -50000, -50000, -36495], 1), [[0, 0, 0, 0], [[2, 50000], [3, 36495]]]),
  ('partial repair guard 2', ([-50000, 0, -50000, -10000], 2), [[0, 0, 0, 0], [[2, 50000], [3, 10000]]]),
  ('control: losses after income', ([10000, -4000, -6000, 5000, 5000], 3), [[10000, 0, 0, 1000, 1000], [[2, 2000]]]),
  ('control: no losses', ([1000, 2000], 1), [[1000, 2000], []]),
  ('control: fifo two years', ([-10000, 5000, 20000], 5), [[0, 1000, 14000], []]),
  ('control: two losses', ([-5000, -3000, 10000], 5), [[0, 0, 2000], []])]]
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 fixtureActualExpectedOutcome
regression remaining-report 1[[0, 1000, 14000], []][[0, 1000, 14000], []]Passed
regression remaining-report 2[[0, 0, 2000], []][[0, 0, 2000], []]Passed
partial repair guard 1[[5000, 20000, 0, 0, 0, 0, 0], [[3, 50000], [4, 50000], [5, 27330], [6, 50000]]][[5000, 20000, 0, 0, 0, 0, 0], [[3, 50000], [4, 50000], [5, 27330], [6, 50000]]]Passed
partial repair guard 2[[0, 60000, 0, 0, 0, 0, 0], [[4, 3000], [6, 3000]]][[0, 60000, 0, 0, 0, 0, 0], [[4, 3000], [6, 3000]]]Passed
control: expired[[0, 0, 0, 10000], []][[0, 0, 0, 10000], []]Passed
control: odd cap[[0, 2001], [[0, 42000]]][[0, 2001], [[0, 42000]]]Passed
control: expiry boundary[[0, 0, 1000], [[0, 4000]]][[0, 0, 1000], [[0, 4000]]]Passed
control: losses after income[[10000, 0, 0, 1000, 1000], [[2, 2000]]][[10000, 0, 0, 1000, 1000], [[2, 2000]]]Passed

SHA-256 / 609ed1cb7fbf810e0649fbee953ea6592cdb90dc9d627893141f7fc39b9eae3b

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:06.663268+00:00.

Case digest / 1574e81df388a82e4c6c110db45864f25b976a5d292db3e8808c930f7f83e410