FA-61176 / Bond day-count conventions / Open access
Step-up coupon accrued interest: steps are applied in the order supplied · case 01
An unsorted step list lets an earlier step override a later one.
ROOT CAUSE
The schedule is not sorted by date before the last-applicable scan.
VERIFIED REPAIR
Sort steps by effective date before scanning.
Unsuccessful approach: Sorting by rate instead of date only works for monotone step-ups.
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 = [(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 ordering 1', [[2019, 10, 1], [2020, 1, 1], [2019, 12, 5], [[[2019, 10, 4], 0.04], [[2019, 9, 15], 0.035], [[2019, 12, 13], 0.07], [[2019, 10, 19], 0.06]], 0.025, 4], 0.95788], ['regression step ordering 2', [[2024, 8, 26], [2025, 2, 26], [2024, 10, 18], [[[2024, 10, 7], 0.07], [[2025, 2, 12], 0.04], [[2024, 8, 4], 0.04], [[2025, 1, 25], 0.07]], 0.025, 2], 0.665761], ['partial repair probe 1', [[2010, 6, 16], [2010, 9, 16], [2010, 7, 25], [[[2010, 6, 16], 0.05], [[2010, 8, 24], 0.04], [[2010, 7, 16], 0.035]], 0.025, 4], 0.493207], ['partial repair probe 2', [[2014, 5, 4], [2015, 5, 4], [2015, 1, 27], [[[2014, 5, 20], 0.07], [[2014, 8, 20], 0.04], [[2014, 9, 8], 0.04], [[2015, 5, 7], 0.035]], 0.02, 1], 3.605479], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2012, 5, 20], [2013, 5, 20], [2012, 8, 4], [[[2012, 9, 20], 0.05], [[2013, 3, 23], 0.035], [[2012, 8, 4], 0.08]], 0.02, 1], 0.416438], ['normal control 2', [[2029, 5, 1], [2030, 5, 1], [2029, 7, 19], [[[2030, 4, 3], 0.06], [[2029, 10, 8], 0.06], [[2030, 2, 26], 0.05]], 0.025, 1], 0.541096]], [['regression step ordering 1', [[2016, 7, 22], [2017, 7, 22], [2016, 12, 15], [[[2016, 11, 9], 0.07], [[2016, 10, 28], 0.05], [[2016, 8, 16], 0.035]], 0.025, 1], 1.726027], ['regression step ordering 2', [[2011, 12, 24], [2012, 3, 24], [2012, 3, 24], [[[2011, 12, 13], 0.06], [[2011, 11, 30], 0.04], [[2012, 1, 1], 0.04], [[2012, 3, 24], 0.08]], 0.02, 4], 1.043956], ['partial repair probe 1', [[2019, 8, 21], [2019, 11, 21], [2019, 10, 4], [[[2019, 10, 23], 0.07], [[2019, 11, 27], 0.035], [[2019, 8, 26], 0.06], [[2019, 8, 28], 0.05], [[2019, 10, 4], 0.08]], 0.02, 4], 0.5625], ['partial repair probe 2', [[2021, 12, 11], [2022, 12, 11], [2022, 5, 14], [[[2021, 11, 21], 0.06], [[2022, 6, 9], 0.035], [[2022, 6, 2], 0.05], [[2022, 3, 26], 0.03]], 0.02, 1], 2.128767], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2012, 5, 20], [2012, 11, 20], [2012, 7, 11], [], 0.02, 2], 0.282609], ['normal control 2', [[2028, 12, 31], [2029, 3, 31], [2029, 1, 2], [[[2029, 4, 5], 0.03], [[2029, 1, 2], 0.08]], 0.02, 4], 0.011111]], [['regression step ordering 1', [[2010, 10, 28], [2011, 1, 28], [2010, 12, 26], [[[2011, 1, 30], 0.07], [[2010, 12, 12], 0.06], [[2010, 12, 10], 0.035]], 0.02, 4], 0.480978], ['regression step ordering 2', [[2020, 5, 20], [2020, 8, 20], [2020, 6, 19], [[[2020, 6, 8], 0.05], [[2020, 5, 26], 0.04], [[2020, 7, 3], 0.07], [[2020, 6, 14], 0.06]], 0.02, 4], 0.336957], ['partial repair probe 1', [[2028, 5, 25], [2028, 11, 25], [2028, 11, 8], [[[2028, 8, 20], 0.05], [[2028, 9, 1], 0.04], [[2028, 11, 8], 0.08]], 0.02, 2], 1.375], ['partial repair probe 2', [[2024, 8, 30], [2025, 8, 30], [2025, 6, 15], [[[2024, 12, 7], 0.06], [[2025, 7, 7], 0.06], [[2025, 5, 4], 0.035]], 0.025, 1], 3.513699], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['normal control 1', [[2015, 12, 18], [2016, 12, 18], [2016, 2, 18], [[[2016, 1, 21], 0.07], [[2016, 10, 27], 0.035], [[2016, 11, 26], 0.05], [[2016, 11, 4], 0.07], [[2016, 2, 18], 0.08]], 0.02, 1], 0.721311], ['normal control 2', [[2025, 7, 28], [2026, 1, 28], [2025, 10, 12], [], 0.025, 2], 0.516304]], [['regression step ordering 1', [[2029, 10, 31], [2030, 4, 30], [2029, 11, 13], [[[2030, 4, 3], 0.06], [[2029, 10, 20], 0.035], [[2029, 10, 12], 0.03]], 0.02, 2], 0.125691], ['regression step ordering 2', [[2020, 4, 16], [2021, 4, 16], [2021, 1, 31], [[[2020, 11, 22], 0.07], [[2020, 7, 13], 0.04], [[2020, 6, 7], 0.07]], 0.02, 1], 3.764384], ['partial repair probe 1', [[2022, 4, 14], [2022, 10, 14], [2022, 7, 5], [[[2022, 6, 21], 0.04], [[2022, 6, 26], 0.035], [[2022, 7, 23], 0.035]], 0.02, 2], 0.512295], ['partial repair probe 2', [[2028, 4, 28], [2028, 7, 28], [2028, 7, 15], [[[2028, 6, 22], 0.07], [[2028, 6, 27], 0.05]], 0.02, 4], 0.645604], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2034, 1, 31], [2035, 1, 31], [2034, 2, 15], [[[2034, 11, 25], 0.07], [[2035, 1, 10], 0.07], [[2035, 1, 8], 0.06], [[2034, 6, 3], 0.06]], 0.025, 1], 0.10274], ['normal control 2', [[2037, 3, 10], [2037, 6, 10], [2037, 4, 22], [[[2037, 6, 12], 0.05], [[2037, 4, 28], 0.07], [[2037, 2, 25], 0.03], [[2037, 6, 10], 0.04]], 0.025, 4], 0.350543]], [['regression step ordering 1', [[2022, 11, 20], [2023, 11, 20], [2023, 10, 7], [[[2023, 2, 28], 0.07], [[2023, 10, 6], 0.03], [[2023, 4, 6], 0.03], [[2023, 7, 5], 0.07]], 0.02, 1], 3.789041], ['regression step ordering 2', [[2012, 10, 1], [2013, 4, 1], [2013, 3, 7], [[[2012, 11, 13], 0.05], [[2012, 9, 7], 0.07]], 0.02, 2], 2.392857], ['partial repair probe 1', [[2034, 3, 30], [2034, 9, 30], [2034, 7, 23], [[[2034, 6, 8], 0.06], [[2034, 7, 22], 0.035], [[2034, 8, 20], 0.035], [[2034, 7, 29], 0.06]], 0.025, 2], 1.202446], ['partial repair probe 2', [[2029, 6, 1], [2029, 12, 1], [2029, 9, 11], [[[2029, 6, 3], 0.07], [[2029, 9, 28], 0.07], [[2029, 8, 2], 0.03]], 0.025, 2], 1.489071], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['normal control 1', [[2040, 12, 2], [2041, 3, 2], [2041, 1, 13], [[[2041, 1, 10], 0.035], [[2041, 1, 13], 0.08]], 0.02, 4], 0.245833], ['normal control 2', [[2029, 1, 28], [2029, 7, 28], [2029, 4, 23], [[[2029, 1, 27], 0.04], [[2029, 3, 10], 0.05], [[2029, 4, 27], 0.03], [[2029, 6, 2], 0.06], [[2029, 4, 23], 0.08]], 0.02, 2], 1.060773]]]
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 ordering 1 | 0.9375 | 0.95788 | Failed |
| regression step ordering 2 | 0.576087 | 0.665761 | Failed |
| partial repair probe 1 | 0.493207 | 0.493207 | Passed |
| partial repair probe 2 | 3.605479 | 3.605479 | Passed |
| boundary control 1 | 0.755495 | 0.755495 | Passed |
| boundary control 2 | 0.0 | 0.0 | Passed |
| normal control 1 | 0.416438 | 0.416438 | Passed |
| normal control 2 | 0.541096 | 0.541096 | Passed |
SHA-256 / b03d03c764330e554e86b33b9a1ec0ca0103fd20d3ab52f0adfdaf82706c32b3
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), key=lambda s: s[1])
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 ordering 1', [[2019, 10, 1], [2020, 1, 1], [2019, 12, 5], [[[2019, 10, 4], 0.04], [[2019, 9, 15], 0.035], [[2019, 12, 13], 0.07], [[2019, 10, 19], 0.06]], 0.025, 4], 0.95788], ['regression step ordering 2', [[2024, 8, 26], [2025, 2, 26], [2024, 10, 18], [[[2024, 10, 7], 0.07], [[2025, 2, 12], 0.04], [[2024, 8, 4], 0.04], [[2025, 1, 25], 0.07]], 0.025, 2], 0.665761], ['partial repair probe 1', [[2010, 6, 16], [2010, 9, 16], [2010, 7, 25], [[[2010, 6, 16], 0.05], [[2010, 8, 24], 0.04], [[2010, 7, 16], 0.035]], 0.025, 4], 0.493207], ['partial repair probe 2', [[2014, 5, 4], [2015, 5, 4], [2015, 1, 27], [[[2014, 5, 20], 0.07], [[2014, 8, 20], 0.04], [[2014, 9, 8], 0.04], [[2015, 5, 7], 0.035]], 0.02, 1], 3.605479], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2012, 5, 20], [2013, 5, 20], [2012, 8, 4], [[[2012, 9, 20], 0.05], [[2013, 3, 23], 0.035], [[2012, 8, 4], 0.08]], 0.02, 1], 0.416438], ['normal control 2', [[2029, 5, 1], [2030, 5, 1], [2029, 7, 19], [[[2030, 4, 3], 0.06], [[2029, 10, 8], 0.06], [[2030, 2, 26], 0.05]], 0.025, 1], 0.541096]], [['regression step ordering 1', [[2016, 7, 22], [2017, 7, 22], [2016, 12, 15], [[[2016, 11, 9], 0.07], [[2016, 10, 28], 0.05], [[2016, 8, 16], 0.035]], 0.025, 1], 1.726027], ['regression step ordering 2', [[2011, 12, 24], [2012, 3, 24], [2012, 3, 24], [[[2011, 12, 13], 0.06], [[2011, 11, 30], 0.04], [[2012, 1, 1], 0.04], [[2012, 3, 24], 0.08]], 0.02, 4], 1.043956], ['partial repair probe 1', [[2019, 8, 21], [2019, 11, 21], [2019, 10, 4], [[[2019, 10, 23], 0.07], [[2019, 11, 27], 0.035], [[2019, 8, 26], 0.06], [[2019, 8, 28], 0.05], [[2019, 10, 4], 0.08]], 0.02, 4], 0.5625], ['partial repair probe 2', [[2021, 12, 11], [2022, 12, 11], [2022, 5, 14], [[[2021, 11, 21], 0.06], [[2022, 6, 9], 0.035], [[2022, 6, 2], 0.05], [[2022, 3, 26], 0.03]], 0.02, 1], 2.128767], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2012, 5, 20], [2012, 11, 20], [2012, 7, 11], [], 0.02, 2], 0.282609], ['normal control 2', [[2028, 12, 31], [2029, 3, 31], [2029, 1, 2], [[[2029, 4, 5], 0.03], [[2029, 1, 2], 0.08]], 0.02, 4], 0.011111]], [['regression step ordering 1', [[2010, 10, 28], [2011, 1, 28], [2010, 12, 26], [[[2011, 1, 30], 0.07], [[2010, 12, 12], 0.06], [[2010, 12, 10], 0.035]], 0.02, 4], 0.480978], ['regression step ordering 2', [[2020, 5, 20], [2020, 8, 20], [2020, 6, 19], [[[2020, 6, 8], 0.05], [[2020, 5, 26], 0.04], [[2020, 7, 3], 0.07], [[2020, 6, 14], 0.06]], 0.02, 4], 0.336957], ['partial repair probe 1', [[2028, 5, 25], [2028, 11, 25], [2028, 11, 8], [[[2028, 8, 20], 0.05], [[2028, 9, 1], 0.04], [[2028, 11, 8], 0.08]], 0.02, 2], 1.375], ['partial repair probe 2', [[2024, 8, 30], [2025, 8, 30], [2025, 6, 15], [[[2024, 12, 7], 0.06], [[2025, 7, 7], 0.06], [[2025, 5, 4], 0.035]], 0.025, 1], 3.513699], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['normal control 1', [[2015, 12, 18], [2016, 12, 18], [2016, 2, 18], [[[2016, 1, 21], 0.07], [[2016, 10, 27], 0.035], [[2016, 11, 26], 0.05], [[2016, 11, 4], 0.07], [[2016, 2, 18], 0.08]], 0.02, 1], 0.721311], ['normal control 2', [[2025, 7, 28], [2026, 1, 28], [2025, 10, 12], [], 0.025, 2], 0.516304]], [['regression step ordering 1', [[2029, 10, 31], [2030, 4, 30], [2029, 11, 13], [[[2030, 4, 3], 0.06], [[2029, 10, 20], 0.035], [[2029, 10, 12], 0.03]], 0.02, 2], 0.125691], ['regression step ordering 2', [[2020, 4, 16], [2021, 4, 16], [2021, 1, 31], [[[2020, 11, 22], 0.07], [[2020, 7, 13], 0.04], [[2020, 6, 7], 0.07]], 0.02, 1], 3.764384], ['partial repair probe 1', [[2022, 4, 14], [2022, 10, 14], [2022, 7, 5], [[[2022, 6, 21], 0.04], [[2022, 6, 26], 0.035], [[2022, 7, 23], 0.035]], 0.02, 2], 0.512295], ['partial repair probe 2', [[2028, 4, 28], [2028, 7, 28], [2028, 7, 15], [[[2028, 6, 22], 0.07], [[2028, 6, 27], 0.05]], 0.02, 4], 0.645604], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2034, 1, 31], [2035, 1, 31], [2034, 2, 15], [[[2034, 11, 25], 0.07], [[2035, 1, 10], 0.07], [[2035, 1, 8], 0.06], [[2034, 6, 3], 0.06]], 0.025, 1], 0.10274], ['normal control 2', [[2037, 3, 10], [2037, 6, 10], [2037, 4, 22], [[[2037, 6, 12], 0.05], [[2037, 4, 28], 0.07], [[2037, 2, 25], 0.03], [[2037, 6, 10], 0.04]], 0.025, 4], 0.350543]], [['regression step ordering 1', [[2022, 11, 20], [2023, 11, 20], [2023, 10, 7], [[[2023, 2, 28], 0.07], [[2023, 10, 6], 0.03], [[2023, 4, 6], 0.03], [[2023, 7, 5], 0.07]], 0.02, 1], 3.789041], ['regression step ordering 2', [[2012, 10, 1], [2013, 4, 1], [2013, 3, 7], [[[2012, 11, 13], 0.05], [[2012, 9, 7], 0.07]], 0.02, 2], 2.392857], ['partial repair probe 1', [[2034, 3, 30], [2034, 9, 30], [2034, 7, 23], [[[2034, 6, 8], 0.06], [[2034, 7, 22], 0.035], [[2034, 8, 20], 0.035], [[2034, 7, 29], 0.06]], 0.025, 2], 1.202446], ['partial repair probe 2', [[2029, 6, 1], [2029, 12, 1], [2029, 9, 11], [[[2029, 6, 3], 0.07], [[2029, 9, 28], 0.07], [[2029, 8, 2], 0.03]], 0.025, 2], 1.489071], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['normal control 1', [[2040, 12, 2], [2041, 3, 2], [2041, 1, 13], [[[2041, 1, 10], 0.035], [[2041, 1, 13], 0.08]], 0.02, 4], 0.245833], ['normal control 2', [[2029, 1, 28], [2029, 7, 28], [2029, 4, 23], [[[2029, 1, 27], 0.04], [[2029, 3, 10], 0.05], [[2029, 4, 27], 0.03], [[2029, 6, 2], 0.06], [[2029, 4, 23], 0.08]], 0.02, 2], 1.060773]]]
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 ordering 1 | 0.95788 | 0.95788 | Passed |
| regression step ordering 2 | 0.665761 | 0.665761 | Passed |
| partial repair probe 1 | 0.529891 | 0.493207 | Failed |
| partial repair probe 2 | 4.920548 | 3.605479 | Failed |
| boundary control 1 | 0.755495 | 0.755495 | Passed |
| boundary control 2 | 0.0 | 0.0 | Passed |
| normal control 1 | 0.416438 | 0.416438 | Passed |
| normal control 2 | 0.541096 | 0.541096 | Passed |
SHA-256 / 98c6e5e404f6878cf49c67def3de586c15131c68158f8ce41ae202124a151146
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 ordering 1', [[2019, 10, 1], [2020, 1, 1], [2019, 12, 5], [[[2019, 10, 4], 0.04], [[2019, 9, 15], 0.035], [[2019, 12, 13], 0.07], [[2019, 10, 19], 0.06]], 0.025, 4], 0.95788], ['regression step ordering 2', [[2024, 8, 26], [2025, 2, 26], [2024, 10, 18], [[[2024, 10, 7], 0.07], [[2025, 2, 12], 0.04], [[2024, 8, 4], 0.04], [[2025, 1, 25], 0.07]], 0.025, 2], 0.665761], ['partial repair probe 1', [[2010, 6, 16], [2010, 9, 16], [2010, 7, 25], [[[2010, 6, 16], 0.05], [[2010, 8, 24], 0.04], [[2010, 7, 16], 0.035]], 0.025, 4], 0.493207], ['partial repair probe 2', [[2014, 5, 4], [2015, 5, 4], [2015, 1, 27], [[[2014, 5, 20], 0.07], [[2014, 8, 20], 0.04], [[2014, 9, 8], 0.04], [[2015, 5, 7], 0.035]], 0.02, 1], 3.605479], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2012, 5, 20], [2013, 5, 20], [2012, 8, 4], [[[2012, 9, 20], 0.05], [[2013, 3, 23], 0.035], [[2012, 8, 4], 0.08]], 0.02, 1], 0.416438], ['normal control 2', [[2029, 5, 1], [2030, 5, 1], [2029, 7, 19], [[[2030, 4, 3], 0.06], [[2029, 10, 8], 0.06], [[2030, 2, 26], 0.05]], 0.025, 1], 0.541096]], [['regression step ordering 1', [[2016, 7, 22], [2017, 7, 22], [2016, 12, 15], [[[2016, 11, 9], 0.07], [[2016, 10, 28], 0.05], [[2016, 8, 16], 0.035]], 0.025, 1], 1.726027], ['regression step ordering 2', [[2011, 12, 24], [2012, 3, 24], [2012, 3, 24], [[[2011, 12, 13], 0.06], [[2011, 11, 30], 0.04], [[2012, 1, 1], 0.04], [[2012, 3, 24], 0.08]], 0.02, 4], 1.043956], ['partial repair probe 1', [[2019, 8, 21], [2019, 11, 21], [2019, 10, 4], [[[2019, 10, 23], 0.07], [[2019, 11, 27], 0.035], [[2019, 8, 26], 0.06], [[2019, 8, 28], 0.05], [[2019, 10, 4], 0.08]], 0.02, 4], 0.5625], ['partial repair probe 2', [[2021, 12, 11], [2022, 12, 11], [2022, 5, 14], [[[2021, 11, 21], 0.06], [[2022, 6, 9], 0.035], [[2022, 6, 2], 0.05], [[2022, 3, 26], 0.03]], 0.02, 1], 2.128767], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2012, 5, 20], [2012, 11, 20], [2012, 7, 11], [], 0.02, 2], 0.282609], ['normal control 2', [[2028, 12, 31], [2029, 3, 31], [2029, 1, 2], [[[2029, 4, 5], 0.03], [[2029, 1, 2], 0.08]], 0.02, 4], 0.011111]], [['regression step ordering 1', [[2010, 10, 28], [2011, 1, 28], [2010, 12, 26], [[[2011, 1, 30], 0.07], [[2010, 12, 12], 0.06], [[2010, 12, 10], 0.035]], 0.02, 4], 0.480978], ['regression step ordering 2', [[2020, 5, 20], [2020, 8, 20], [2020, 6, 19], [[[2020, 6, 8], 0.05], [[2020, 5, 26], 0.04], [[2020, 7, 3], 0.07], [[2020, 6, 14], 0.06]], 0.02, 4], 0.336957], ['partial repair probe 1', [[2028, 5, 25], [2028, 11, 25], [2028, 11, 8], [[[2028, 8, 20], 0.05], [[2028, 9, 1], 0.04], [[2028, 11, 8], 0.08]], 0.02, 2], 1.375], ['partial repair probe 2', [[2024, 8, 30], [2025, 8, 30], [2025, 6, 15], [[[2024, 12, 7], 0.06], [[2025, 7, 7], 0.06], [[2025, 5, 4], 0.035]], 0.025, 1], 3.513699], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['normal control 1', [[2015, 12, 18], [2016, 12, 18], [2016, 2, 18], [[[2016, 1, 21], 0.07], [[2016, 10, 27], 0.035], [[2016, 11, 26], 0.05], [[2016, 11, 4], 0.07], [[2016, 2, 18], 0.08]], 0.02, 1], 0.721311], ['normal control 2', [[2025, 7, 28], [2026, 1, 28], [2025, 10, 12], [], 0.025, 2], 0.516304]], [['regression step ordering 1', [[2029, 10, 31], [2030, 4, 30], [2029, 11, 13], [[[2030, 4, 3], 0.06], [[2029, 10, 20], 0.035], [[2029, 10, 12], 0.03]], 0.02, 2], 0.125691], ['regression step ordering 2', [[2020, 4, 16], [2021, 4, 16], [2021, 1, 31], [[[2020, 11, 22], 0.07], [[2020, 7, 13], 0.04], [[2020, 6, 7], 0.07]], 0.02, 1], 3.764384], ['partial repair probe 1', [[2022, 4, 14], [2022, 10, 14], [2022, 7, 5], [[[2022, 6, 21], 0.04], [[2022, 6, 26], 0.035], [[2022, 7, 23], 0.035]], 0.02, 2], 0.512295], ['partial repair probe 2', [[2028, 4, 28], [2028, 7, 28], [2028, 7, 15], [[[2028, 6, 22], 0.07], [[2028, 6, 27], 0.05]], 0.02, 4], 0.645604], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['normal control 1', [[2034, 1, 31], [2035, 1, 31], [2034, 2, 15], [[[2034, 11, 25], 0.07], [[2035, 1, 10], 0.07], [[2035, 1, 8], 0.06], [[2034, 6, 3], 0.06]], 0.025, 1], 0.10274], ['normal control 2', [[2037, 3, 10], [2037, 6, 10], [2037, 4, 22], [[[2037, 6, 12], 0.05], [[2037, 4, 28], 0.07], [[2037, 2, 25], 0.03], [[2037, 6, 10], 0.04]], 0.025, 4], 0.350543]], [['regression step ordering 1', [[2022, 11, 20], [2023, 11, 20], [2023, 10, 7], [[[2023, 2, 28], 0.07], [[2023, 10, 6], 0.03], [[2023, 4, 6], 0.03], [[2023, 7, 5], 0.07]], 0.02, 1], 3.789041], ['regression step ordering 2', [[2012, 10, 1], [2013, 4, 1], [2013, 3, 7], [[[2012, 11, 13], 0.05], [[2012, 9, 7], 0.07]], 0.02, 2], 2.392857], ['partial repair probe 1', [[2034, 3, 30], [2034, 9, 30], [2034, 7, 23], [[[2034, 6, 8], 0.06], [[2034, 7, 22], 0.035], [[2034, 8, 20], 0.035], [[2034, 7, 29], 0.06]], 0.025, 2], 1.202446], ['partial repair probe 2', [[2029, 6, 1], [2029, 12, 1], [2029, 9, 11], [[[2029, 6, 3], 0.07], [[2029, 9, 28], 0.07], [[2029, 8, 2], 0.03]], 0.025, 2], 1.489071], ['boundary control 1', [[2024, 1, 1], [2024, 7, 1], [2024, 1, 1], [], 0.02, 2], 0.0], ['boundary control 2', [[2024, 1, 1], [2024, 7, 1], [2024, 4, 1], [[[2024, 3, 1], 0.05]], 0.02, 2], 0.755495], ['normal control 1', [[2040, 12, 2], [2041, 3, 2], [2041, 1, 13], [[[2041, 1, 10], 0.035], [[2041, 1, 13], 0.08]], 0.02, 4], 0.245833], ['normal control 2', [[2029, 1, 28], [2029, 7, 28], [2029, 4, 23], [[[2029, 1, 27], 0.04], [[2029, 3, 10], 0.05], [[2029, 4, 27], 0.03], [[2029, 6, 2], 0.06], [[2029, 4, 23], 0.08]], 0.02, 2], 1.060773]]]
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 ordering 1 | 0.95788 | 0.95788 | Passed |
| regression step ordering 2 | 0.665761 | 0.665761 | Passed |
| partial repair probe 1 | 0.493207 | 0.493207 | Passed |
| partial repair probe 2 | 3.605479 | 3.605479 | Passed |
| boundary control 1 | 0.755495 | 0.755495 | Passed |
| boundary control 2 | 0.0 | 0.0 | Passed |
| normal control 1 | 0.416438 | 0.416438 | Passed |
| normal control 2 | 0.541096 | 0.541096 | Passed |
SHA-256 / 60355abf245e12312226211ad41e95375eadcfcd04570dd5b28d01d66754fdf1
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.800579+00:00.
Case digest / 593fbf5e74dd930a68164d363c489996ff081c1819f1c898431e30239dfcce54