FA-61166 / Bond day-count conventions / Open access
Step-up coupon accrued interest: a step takes effect the day after its date · case 01
Accrual on a step date uses the old rate.
ROOT CAUSE
The effective test uses when < x instead of when <= x.
VERIFIED REPAIR
Apply a step from its own date onward.
Unsuccessful approach: Applying a step one day early moves the boundary the other way.
Case contract
Inputs prev and next coupon dates, settlement in [prev, next], a list of [date, rate] steps (unordered; a step applies on and after its date), the base rate before any step, and frequency. Each accrued day d in [prev, settle) earns the rate in force on d. Accrued = 100/freq * sum(rates)/days(prev, next), rounded to 6.
Why this case matters
Bond accrual and pricing systems depend on exact day-count arithmetic; a single-day error changes settlement cash.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
from fractions import Fraction
N = 1
observations = []
def solve(prev, nxt, settle, steps, base_rate, freq):
P = datetime.date(*prev)
Q = datetime.date(*nxt)
S = datetime.date(*settle)
period = (Q - P).days
sched = sorted((datetime.date(*s[0]), s[1]) for s in steps)
def rate_on(x):
r = base_rate
for when, v in sched:
if when < x:
r = v
return r
total = Fraction(0)
x = P
while x < S:
total += Fraction(str(rate_on(x)))
x += datetime.timedelta(days=1)
return round(float(total * 100 / freq / period), 6)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression step effective date 1', [[2026, 1, 30], [2026, 7, 30], [2026, 4, 15], [[[2026, 7, 25], 0.05], [[2026, 4, 10], 0.05], [[2026, 6, 8], 0.04], [[2026, 5, 16], 0.05], [[2026, 4, 15], 0.08]], 0.02, 2], 0.455801], ['regression step effective date 2', [[2029, 2, 28], [2029, 5, 28], [2029, 4, 9], [[[2029, 4, 7], 0.03], [[2029, 2, 7], 0.04], [[2029, 4, 9], 0.08]], 0.02, 4], 0.44382], ['partial repair probe 1', [[2012, 2, 14], [2013, 2, 14], [2012, 2, 27], [[[2012, 3, 29], 0.03], [[2012, 10, 5], 0.035], [[2013, 1, 7], 0.05], [[2012, 8, 21], 0.05], [[2012, 2, 27], 0.08]], 0.02, 1], 0.071038], ['partial repair probe 2', [[2027, 1, 28], [2027, 4, 28], [2027, 2, 24], [[[2027, 3, 3], 0.05], [[2027, 3, 5], 0.035], [[2027, 4, 10], 0.06], [[2027, 2, 24], 0.08]], 0.025, 4], 0.1875], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2032, 8, 4], [2032, 11, 4], [2032, 9, 24], [], 0.02, 4], 0.277174], ['normal control 2', [[2029, 3, 11], [2029, 9, 11], [2029, 8, 8], [[[2029, 2, 26], 0.03]], 0.02, 2], 1.222826], ['normal control 3', [[2010, 11, 30], [2011, 11, 30], [2010, 12, 30], [[[2011, 2, 15], 0.04], [[2011, 9, 6], 0.03], [[2010, 11, 24], 0.05]], 0.025, 1], 0.410959]], [['regression step effective date 1', [[2012, 6, 30], [2013, 6, 30], [2013, 4, 12], [[[2013, 7, 7], 0.035], [[2012, 12, 3], 0.03]], 0.02, 1], 1.923288], ['regression step effective date 2', [[2040, 2, 8], [2040, 5, 8], [2040, 3, 29], [[[2040, 2, 19], 0.05], [[2040, 5, 7], 0.035], [[2040, 5, 12], 0.04], [[2040, 5, 2], 0.07]], 0.025, 4], 0.618056], ['partial repair probe 1', [[2038, 11, 27], [2039, 11, 27], [2039, 3, 20], [[[2039, 8, 27], 0.05], [[2039, 9, 1], 0.07], [[2038, 11, 22], 0.035], [[2039, 5, 30], 0.07], [[2039, 3, 20], 0.08]], 0.025, 1], 1.083562], ['partial repair probe 2', [[2038, 12, 31], [2039, 12, 31], [2039, 3, 2], [[[2039, 11, 10], 0.07], [[2039, 9, 8], 0.035], [[2039, 3, 2], 0.08]], 0.025, 1], 0.417808], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2012, 6, 15], [2013, 6, 15], [2012, 9, 22], [], 0.025, 1], 0.678082], ['normal control 2', [[2018, 7, 1], [2019, 7, 1], [2019, 3, 6], [], 0.025, 1], 1.69863], ['normal control 3', [[2030, 6, 29], [2030, 12, 29], [2030, 9, 5], [], 0.025, 2], 0.464481]], [['regression step effective date 1', [[2038, 3, 28], [2038, 6, 28], [2038, 5, 29], [[[2038, 3, 5], 0.04], [[2038, 4, 20], 0.03], [[2038, 5, 29], 0.08]], 0.02, 4], 0.567935], ['regression step effective date 2', [[2018, 5, 13], [2019, 5, 13], [2018, 10, 5], [[[2019, 2, 24], 0.035], [[2018, 8, 29], 0.05]], 0.025, 1], 1.246575], ['partial repair probe 1', [[2025, 8, 30], [2025, 11, 30], [2025, 10, 24], [[[2025, 8, 9], 0.04], [[2025, 10, 24], 0.08]], 0.025, 4], 0.597826], ['partial repair probe 2', [[2025, 11, 11], [2026, 2, 11], [2025, 11, 20], [[[2026, 1, 19], 0.03], [[2025, 11, 20], 0.08]], 0.025, 4], 0.061141], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2018, 7, 30], [2019, 1, 30], [2018, 10, 30], [[[2018, 12, 26], 0.07]], 0.02, 2], 0.5], ['normal control 2', [[2032, 11, 30], [2033, 2, 28], [2033, 1, 3], [], 0.025, 4], 0.236111], ['normal control 3', [[2023, 2, 12], [2024, 2, 12], [2023, 8, 29], [], 0.025, 1], 1.356164]], [['regression step effective date 1', [[2024, 10, 19], [2025, 10, 19], [2025, 4, 13], [[[2025, 10, 8], 0.07], [[2025, 3, 28], 0.07], [[2025, 9, 3], 0.07]], 0.02, 1], 1.183562], ['regression step effective date 2', [[2033, 1, 31], [2034, 1, 31], [2033, 6, 4], [[[2033, 4, 10], 0.04], [[2033, 3, 12], 0.04]], 0.02, 1], 1.139726], ['partial repair probe 1', [[2030, 3, 25], [2031, 3, 25], [2030, 6, 13], [[[2031, 1, 12], 0.04], [[2030, 6, 13], 0.08]], 0.02, 1], 0.438356], ['partial repair probe 2', [[2035, 3, 31], [2035, 6, 30], [2035, 5, 11], [[[2035, 3, 15], 0.05], [[2035, 5, 11], 0.08]], 0.025, 4], 0.563187], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2024, 10, 17], [2025, 4, 17], [2025, 2, 28], [], 0.02, 2], 0.736264], ['normal control 2', [[2026, 3, 31], [2027, 3, 31], [2026, 9, 16], [], 0.02, 1], 0.926027], ['normal control 3', [[2038, 2, 25], [2038, 5, 25], [2038, 5, 3], [], 0.02, 4], 0.376404]], [['regression step effective date 1', [[2026, 11, 20], [2027, 2, 20], [2027, 2, 15], [[[2026, 12, 27], 0.05], [[2027, 2, 23], 0.07]], 0.025, 4], 0.930707], ['regression step effective date 2', [[2039, 5, 31], [2040, 5, 31], [2039, 10, 21], [[[2040, 1, 25], 0.035], [[2040, 1, 29], 0.03], [[2039, 6, 11], 0.03], [[2039, 10, 21], 0.08]], 0.02, 1], 1.142077], ['partial repair probe 1', [[2022, 10, 6], [2023, 4, 6], [2022, 11, 26], [[[2023, 1, 9], 0.04], [[2022, 9, 25], 0.04], [[2022, 11, 26], 0.08]], 0.02, 2], 0.56044], ['partial repair probe 2', [[2034, 10, 11], [2035, 1, 11], [2034, 10, 14], [[[2034, 11, 9], 0.05], [[2034, 10, 16], 0.03], [[2034, 10, 14], 0.08]], 0.025, 4], 0.02038], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2036, 4, 30], [2036, 7, 30], [2036, 5, 1], [[[2036, 5, 5], 0.06]], 0.02, 4], 0.005495], ['normal control 2', [[2035, 10, 5], [2036, 1, 5], [2035, 10, 31], [[[2035, 9, 24], 0.03], [[2035, 9, 29], 0.05], [[2035, 12, 22], 0.03]], 0.02, 4], 0.353261], ['normal control 3', [[2035, 3, 22], [2036, 3, 22], [2035, 6, 17], [], 0.025, 1], 0.594262]]]
for label, args, expected in fixtures[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 step effective date 1 | 0.447514 | 0.455801 | Failed |
| regression step effective date 2 | 0.446629 | 0.44382 | Failed |
| partial repair probe 1 | 0.071038 | 0.071038 | Passed |
| partial repair probe 2 | 0.1875 | 0.1875 | Passed |
| boundary control 1 | 0.0 | 0.0 | Passed |
| normal control 1 | 0.277174 | 0.277174 | Passed |
| normal control 2 | 1.222826 | 1.222826 | Passed |
| normal control 3 | 0.410959 | 0.410959 | Passed |
SHA-256 / a25732922900e331335e6f80f89961108e24fa5f4e5f6a453ed38fdc0583fcbf
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
from fractions import Fraction
N = 1
observations = []
def solve(prev, nxt, settle, steps, base_rate, freq):
P = datetime.date(*prev)
Q = datetime.date(*nxt)
S = datetime.date(*settle)
period = (Q - P).days
sched = sorted((datetime.date(*s[0]), s[1]) for s in steps)
def rate_on(x):
r = base_rate
for when, v in sched:
if when <= x + datetime.timedelta(days=1):
r = v
return r
total = Fraction(0)
x = P
while x < S:
total += Fraction(str(rate_on(x)))
x += datetime.timedelta(days=1)
return round(float(total * 100 / freq / period), 6)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression step effective date 1', [[2026, 1, 30], [2026, 7, 30], [2026, 4, 15], [[[2026, 7, 25], 0.05], [[2026, 4, 10], 0.05], [[2026, 6, 8], 0.04], [[2026, 5, 16], 0.05], [[2026, 4, 15], 0.08]], 0.02, 2], 0.455801], ['regression step effective date 2', [[2029, 2, 28], [2029, 5, 28], [2029, 4, 9], [[[2029, 4, 7], 0.03], [[2029, 2, 7], 0.04], [[2029, 4, 9], 0.08]], 0.02, 4], 0.44382], ['partial repair probe 1', [[2012, 2, 14], [2013, 2, 14], [2012, 2, 27], [[[2012, 3, 29], 0.03], [[2012, 10, 5], 0.035], [[2013, 1, 7], 0.05], [[2012, 8, 21], 0.05], [[2012, 2, 27], 0.08]], 0.02, 1], 0.071038], ['partial repair probe 2', [[2027, 1, 28], [2027, 4, 28], [2027, 2, 24], [[[2027, 3, 3], 0.05], [[2027, 3, 5], 0.035], [[2027, 4, 10], 0.06], [[2027, 2, 24], 0.08]], 0.025, 4], 0.1875], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2032, 8, 4], [2032, 11, 4], [2032, 9, 24], [], 0.02, 4], 0.277174], ['normal control 2', [[2029, 3, 11], [2029, 9, 11], [2029, 8, 8], [[[2029, 2, 26], 0.03]], 0.02, 2], 1.222826], ['normal control 3', [[2010, 11, 30], [2011, 11, 30], [2010, 12, 30], [[[2011, 2, 15], 0.04], [[2011, 9, 6], 0.03], [[2010, 11, 24], 0.05]], 0.025, 1], 0.410959]], [['regression step effective date 1', [[2012, 6, 30], [2013, 6, 30], [2013, 4, 12], [[[2013, 7, 7], 0.035], [[2012, 12, 3], 0.03]], 0.02, 1], 1.923288], ['regression step effective date 2', [[2040, 2, 8], [2040, 5, 8], [2040, 3, 29], [[[2040, 2, 19], 0.05], [[2040, 5, 7], 0.035], [[2040, 5, 12], 0.04], [[2040, 5, 2], 0.07]], 0.025, 4], 0.618056], ['partial repair probe 1', [[2038, 11, 27], [2039, 11, 27], [2039, 3, 20], [[[2039, 8, 27], 0.05], [[2039, 9, 1], 0.07], [[2038, 11, 22], 0.035], [[2039, 5, 30], 0.07], [[2039, 3, 20], 0.08]], 0.025, 1], 1.083562], ['partial repair probe 2', [[2038, 12, 31], [2039, 12, 31], [2039, 3, 2], [[[2039, 11, 10], 0.07], [[2039, 9, 8], 0.035], [[2039, 3, 2], 0.08]], 0.025, 1], 0.417808], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2012, 6, 15], [2013, 6, 15], [2012, 9, 22], [], 0.025, 1], 0.678082], ['normal control 2', [[2018, 7, 1], [2019, 7, 1], [2019, 3, 6], [], 0.025, 1], 1.69863], ['normal control 3', [[2030, 6, 29], [2030, 12, 29], [2030, 9, 5], [], 0.025, 2], 0.464481]], [['regression step effective date 1', [[2038, 3, 28], [2038, 6, 28], [2038, 5, 29], [[[2038, 3, 5], 0.04], [[2038, 4, 20], 0.03], [[2038, 5, 29], 0.08]], 0.02, 4], 0.567935], ['regression step effective date 2', [[2018, 5, 13], [2019, 5, 13], [2018, 10, 5], [[[2019, 2, 24], 0.035], [[2018, 8, 29], 0.05]], 0.025, 1], 1.246575], ['partial repair probe 1', [[2025, 8, 30], [2025, 11, 30], [2025, 10, 24], [[[2025, 8, 9], 0.04], [[2025, 10, 24], 0.08]], 0.025, 4], 0.597826], ['partial repair probe 2', [[2025, 11, 11], [2026, 2, 11], [2025, 11, 20], [[[2026, 1, 19], 0.03], [[2025, 11, 20], 0.08]], 0.025, 4], 0.061141], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2018, 7, 30], [2019, 1, 30], [2018, 10, 30], [[[2018, 12, 26], 0.07]], 0.02, 2], 0.5], ['normal control 2', [[2032, 11, 30], [2033, 2, 28], [2033, 1, 3], [], 0.025, 4], 0.236111], ['normal control 3', [[2023, 2, 12], [2024, 2, 12], [2023, 8, 29], [], 0.025, 1], 1.356164]], [['regression step effective date 1', [[2024, 10, 19], [2025, 10, 19], [2025, 4, 13], [[[2025, 10, 8], 0.07], [[2025, 3, 28], 0.07], [[2025, 9, 3], 0.07]], 0.02, 1], 1.183562], ['regression step effective date 2', [[2033, 1, 31], [2034, 1, 31], [2033, 6, 4], [[[2033, 4, 10], 0.04], [[2033, 3, 12], 0.04]], 0.02, 1], 1.139726], ['partial repair probe 1', [[2030, 3, 25], [2031, 3, 25], [2030, 6, 13], [[[2031, 1, 12], 0.04], [[2030, 6, 13], 0.08]], 0.02, 1], 0.438356], ['partial repair probe 2', [[2035, 3, 31], [2035, 6, 30], [2035, 5, 11], [[[2035, 3, 15], 0.05], [[2035, 5, 11], 0.08]], 0.025, 4], 0.563187], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2024, 10, 17], [2025, 4, 17], [2025, 2, 28], [], 0.02, 2], 0.736264], ['normal control 2', [[2026, 3, 31], [2027, 3, 31], [2026, 9, 16], [], 0.02, 1], 0.926027], ['normal control 3', [[2038, 2, 25], [2038, 5, 25], [2038, 5, 3], [], 0.02, 4], 0.376404]], [['regression step effective date 1', [[2026, 11, 20], [2027, 2, 20], [2027, 2, 15], [[[2026, 12, 27], 0.05], [[2027, 2, 23], 0.07]], 0.025, 4], 0.930707], ['regression step effective date 2', [[2039, 5, 31], [2040, 5, 31], [2039, 10, 21], [[[2040, 1, 25], 0.035], [[2040, 1, 29], 0.03], [[2039, 6, 11], 0.03], [[2039, 10, 21], 0.08]], 0.02, 1], 1.142077], ['partial repair probe 1', [[2022, 10, 6], [2023, 4, 6], [2022, 11, 26], [[[2023, 1, 9], 0.04], [[2022, 9, 25], 0.04], [[2022, 11, 26], 0.08]], 0.02, 2], 0.56044], ['partial repair probe 2', [[2034, 10, 11], [2035, 1, 11], [2034, 10, 14], [[[2034, 11, 9], 0.05], [[2034, 10, 16], 0.03], [[2034, 10, 14], 0.08]], 0.025, 4], 0.02038], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2036, 4, 30], [2036, 7, 30], [2036, 5, 1], [[[2036, 5, 5], 0.06]], 0.02, 4], 0.005495], ['normal control 2', [[2035, 10, 5], [2036, 1, 5], [2035, 10, 31], [[[2035, 9, 24], 0.03], [[2035, 9, 29], 0.05], [[2035, 12, 22], 0.03]], 0.02, 4], 0.353261], ['normal control 3', [[2035, 3, 22], [2036, 3, 22], [2035, 6, 17], [], 0.025, 1], 0.594262]]]
for label, args, expected in fixtures[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 step effective date 1 | 0.472376 | 0.455801 | Failed |
| regression step effective date 2 | 0.455056 | 0.44382 | Failed |
| partial repair probe 1 | 0.087432 | 0.071038 | Failed |
| partial repair probe 2 | 0.202778 | 0.1875 | Failed |
| boundary control 1 | 0.0 | 0.0 | Passed |
| normal control 1 | 0.277174 | 0.277174 | Passed |
| normal control 2 | 1.222826 | 1.222826 | Passed |
| normal control 3 | 0.410959 | 0.410959 | Passed |
SHA-256 / 71844d83269c3e136fa2420638359bec9c262e132383b78c7e8d6ba19942adb4
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
from fractions import Fraction
N = 1
observations = []
def solve(prev, nxt, settle, steps, base_rate, freq):
P = datetime.date(*prev)
Q = datetime.date(*nxt)
S = datetime.date(*settle)
period = (Q - P).days
sched = sorted((datetime.date(*s[0]), s[1]) for s in steps)
def rate_on(x):
r = base_rate
for when, v in sched:
if when <= x:
r = v
return r
total = Fraction(0)
x = P
while x < S:
total += Fraction(str(rate_on(x)))
x += datetime.timedelta(days=1)
return round(float(total * 100 / freq / period), 6)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression step effective date 1', [[2026, 1, 30], [2026, 7, 30], [2026, 4, 15], [[[2026, 7, 25], 0.05], [[2026, 4, 10], 0.05], [[2026, 6, 8], 0.04], [[2026, 5, 16], 0.05], [[2026, 4, 15], 0.08]], 0.02, 2], 0.455801], ['regression step effective date 2', [[2029, 2, 28], [2029, 5, 28], [2029, 4, 9], [[[2029, 4, 7], 0.03], [[2029, 2, 7], 0.04], [[2029, 4, 9], 0.08]], 0.02, 4], 0.44382], ['partial repair probe 1', [[2012, 2, 14], [2013, 2, 14], [2012, 2, 27], [[[2012, 3, 29], 0.03], [[2012, 10, 5], 0.035], [[2013, 1, 7], 0.05], [[2012, 8, 21], 0.05], [[2012, 2, 27], 0.08]], 0.02, 1], 0.071038], ['partial repair probe 2', [[2027, 1, 28], [2027, 4, 28], [2027, 2, 24], [[[2027, 3, 3], 0.05], [[2027, 3, 5], 0.035], [[2027, 4, 10], 0.06], [[2027, 2, 24], 0.08]], 0.025, 4], 0.1875], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2032, 8, 4], [2032, 11, 4], [2032, 9, 24], [], 0.02, 4], 0.277174], ['normal control 2', [[2029, 3, 11], [2029, 9, 11], [2029, 8, 8], [[[2029, 2, 26], 0.03]], 0.02, 2], 1.222826], ['normal control 3', [[2010, 11, 30], [2011, 11, 30], [2010, 12, 30], [[[2011, 2, 15], 0.04], [[2011, 9, 6], 0.03], [[2010, 11, 24], 0.05]], 0.025, 1], 0.410959]], [['regression step effective date 1', [[2012, 6, 30], [2013, 6, 30], [2013, 4, 12], [[[2013, 7, 7], 0.035], [[2012, 12, 3], 0.03]], 0.02, 1], 1.923288], ['regression step effective date 2', [[2040, 2, 8], [2040, 5, 8], [2040, 3, 29], [[[2040, 2, 19], 0.05], [[2040, 5, 7], 0.035], [[2040, 5, 12], 0.04], [[2040, 5, 2], 0.07]], 0.025, 4], 0.618056], ['partial repair probe 1', [[2038, 11, 27], [2039, 11, 27], [2039, 3, 20], [[[2039, 8, 27], 0.05], [[2039, 9, 1], 0.07], [[2038, 11, 22], 0.035], [[2039, 5, 30], 0.07], [[2039, 3, 20], 0.08]], 0.025, 1], 1.083562], ['partial repair probe 2', [[2038, 12, 31], [2039, 12, 31], [2039, 3, 2], [[[2039, 11, 10], 0.07], [[2039, 9, 8], 0.035], [[2039, 3, 2], 0.08]], 0.025, 1], 0.417808], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2012, 6, 15], [2013, 6, 15], [2012, 9, 22], [], 0.025, 1], 0.678082], ['normal control 2', [[2018, 7, 1], [2019, 7, 1], [2019, 3, 6], [], 0.025, 1], 1.69863], ['normal control 3', [[2030, 6, 29], [2030, 12, 29], [2030, 9, 5], [], 0.025, 2], 0.464481]], [['regression step effective date 1', [[2038, 3, 28], [2038, 6, 28], [2038, 5, 29], [[[2038, 3, 5], 0.04], [[2038, 4, 20], 0.03], [[2038, 5, 29], 0.08]], 0.02, 4], 0.567935], ['regression step effective date 2', [[2018, 5, 13], [2019, 5, 13], [2018, 10, 5], [[[2019, 2, 24], 0.035], [[2018, 8, 29], 0.05]], 0.025, 1], 1.246575], ['partial repair probe 1', [[2025, 8, 30], [2025, 11, 30], [2025, 10, 24], [[[2025, 8, 9], 0.04], [[2025, 10, 24], 0.08]], 0.025, 4], 0.597826], ['partial repair probe 2', [[2025, 11, 11], [2026, 2, 11], [2025, 11, 20], [[[2026, 1, 19], 0.03], [[2025, 11, 20], 0.08]], 0.025, 4], 0.061141], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2018, 7, 30], [2019, 1, 30], [2018, 10, 30], [[[2018, 12, 26], 0.07]], 0.02, 2], 0.5], ['normal control 2', [[2032, 11, 30], [2033, 2, 28], [2033, 1, 3], [], 0.025, 4], 0.236111], ['normal control 3', [[2023, 2, 12], [2024, 2, 12], [2023, 8, 29], [], 0.025, 1], 1.356164]], [['regression step effective date 1', [[2024, 10, 19], [2025, 10, 19], [2025, 4, 13], [[[2025, 10, 8], 0.07], [[2025, 3, 28], 0.07], [[2025, 9, 3], 0.07]], 0.02, 1], 1.183562], ['regression step effective date 2', [[2033, 1, 31], [2034, 1, 31], [2033, 6, 4], [[[2033, 4, 10], 0.04], [[2033, 3, 12], 0.04]], 0.02, 1], 1.139726], ['partial repair probe 1', [[2030, 3, 25], [2031, 3, 25], [2030, 6, 13], [[[2031, 1, 12], 0.04], [[2030, 6, 13], 0.08]], 0.02, 1], 0.438356], ['partial repair probe 2', [[2035, 3, 31], [2035, 6, 30], [2035, 5, 11], [[[2035, 3, 15], 0.05], [[2035, 5, 11], 0.08]], 0.025, 4], 0.563187], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2024, 10, 17], [2025, 4, 17], [2025, 2, 28], [], 0.02, 2], 0.736264], ['normal control 2', [[2026, 3, 31], [2027, 3, 31], [2026, 9, 16], [], 0.02, 1], 0.926027], ['normal control 3', [[2038, 2, 25], [2038, 5, 25], [2038, 5, 3], [], 0.02, 4], 0.376404]], [['regression step effective date 1', [[2026, 11, 20], [2027, 2, 20], [2027, 2, 15], [[[2026, 12, 27], 0.05], [[2027, 2, 23], 0.07]], 0.025, 4], 0.930707], ['regression step effective date 2', [[2039, 5, 31], [2040, 5, 31], [2039, 10, 21], [[[2040, 1, 25], 0.035], [[2040, 1, 29], 0.03], [[2039, 6, 11], 0.03], [[2039, 10, 21], 0.08]], 0.02, 1], 1.142077], ['partial repair probe 1', [[2022, 10, 6], [2023, 4, 6], [2022, 11, 26], [[[2023, 1, 9], 0.04], [[2022, 9, 25], 0.04], [[2022, 11, 26], 0.08]], 0.02, 2], 0.56044], ['partial repair probe 2', [[2034, 10, 11], [2035, 1, 11], [2034, 10, 14], [[[2034, 11, 9], 0.05], [[2034, 10, 16], 0.03], [[2034, 10, 14], 0.08]], 0.025, 4], 0.02038], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2036, 4, 30], [2036, 7, 30], [2036, 5, 1], [[[2036, 5, 5], 0.06]], 0.02, 4], 0.005495], ['normal control 2', [[2035, 10, 5], [2036, 1, 5], [2035, 10, 31], [[[2035, 9, 24], 0.03], [[2035, 9, 29], 0.05], [[2035, 12, 22], 0.03]], 0.02, 4], 0.353261], ['normal control 3', [[2035, 3, 22], [2036, 3, 22], [2035, 6, 17], [], 0.025, 1], 0.594262]]]
for label, args, expected in fixtures[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 step effective date 1 | 0.455801 | 0.455801 | Passed |
| regression step effective date 2 | 0.44382 | 0.44382 | Passed |
| partial repair probe 1 | 0.071038 | 0.071038 | Passed |
| partial repair probe 2 | 0.1875 | 0.1875 | Passed |
| boundary control 1 | 0.0 | 0.0 | Passed |
| normal control 1 | 0.277174 | 0.277174 | Passed |
| normal control 2 | 1.222826 | 1.222826 | Passed |
| normal control 3 | 0.410959 | 0.410959 | Passed |
SHA-256 / d56ae9dce3b5c2c4b1e7b13832b3fd657570aeb39a63f4885c32fbb71ec8890e
Verification & scope
A deterministic toy contract stated explicitly in the contract field; no claim of conformance to any published convention text. 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:46:52.771863+00:00.
Case digest / d8b41e8bfe0f7c42c4cf1347d3cf17b26cc8149ba916a084c89a250beb112237