FAILURE MAP
← Case archive

FA-61181 / Bond day-count conventions / Open access

Step-up coupon accrued interest: the settlement day itself accrues · case 01

Accrued interest is one day of coupon too high.

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

ROOT CAUSE

The accrual loop runs while x <= settle.

VERIFIED REPAIR

Accrue days in [prev, settle).

Unsuccessful approach: Stopping the loop only at the next coupon date still includes the settlement day.

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 accrual end inclusivity 1', [[2019, 12, 1], [2020, 6, 1], [2020, 5, 9], [], 0.025, 2], 1.092896], ['regression accrual end inclusivity 2', [[2021, 3, 31], [2021, 6, 30], [2021, 6, 9], [], 0.02, 4], 0.384615], ['partial repair probe 1', [[2015, 8, 6], [2016, 2, 6], [2016, 1, 13], [[[2015, 12, 22], 0.05], [[2015, 10, 22], 0.05]], 0.02, 2], 1.546196], ['partial repair probe 2', [[2040, 8, 28], [2041, 8, 28], [2041, 1, 21], [], 0.02, 1], 0.8], ['normal control 1', [[2037, 5, 31], [2038, 5, 31], [2037, 10, 11], [[[2037, 8, 17], 0.04], [[2037, 6, 3], 0.05], [[2037, 5, 6], 0.03]], 0.025, 1], 1.654795], ['normal control 2', [[2022, 10, 4], [2023, 1, 4], [2022, 12, 21], [[[2022, 11, 14], 0.06]], 0.025, 4], 0.881793], ['normal control 3', [[2039, 6, 4], [2039, 12, 4], [2039, 8, 31], [[[2039, 6, 27], 0.04], [[2039, 11, 1], 0.035], [[2039, 8, 29], 0.035], [[2039, 7, 21], 0.05]], 0.02, 2], 0.939891], ['normal control 4', [[2013, 10, 30], [2014, 4, 30], [2014, 1, 30], [[[2014, 3, 23], 0.06], [[2014, 3, 27], 0.07]], 0.02, 2], 0.505495]], [['regression accrual end inclusivity 1', [[2030, 9, 23], [2031, 9, 23], [2030, 11, 20], [[[2030, 12, 5], 0.04], [[2030, 11, 20], 0.08]], 0.025, 1], 0.39726], ['regression accrual end inclusivity 2', [[2017, 3, 21], [2017, 6, 21], [2017, 3, 31], [[[2017, 4, 6], 0.05], [[2017, 6, 17], 0.05]], 0.02, 4], 0.054348], ['partial repair probe 1', [[2020, 5, 30], [2020, 11, 30], [2020, 6, 18], [[[2020, 9, 12], 0.04], [[2020, 5, 19], 0.035]], 0.025, 2], 0.180707], ['partial repair probe 2', [[2040, 8, 27], [2041, 2, 27], [2040, 10, 20], [[[2040, 11, 9], 0.035], [[2040, 7, 31], 0.05], [[2040, 9, 25], 0.05]], 0.02, 2], 0.733696], ['normal control 1', [[2033, 9, 30], [2033, 12, 30], [2033, 10, 8], [], 0.025, 4], 0.054945], ['normal control 2', [[2028, 5, 31], [2029, 5, 31], [2029, 4, 16], [[[2028, 8, 18], 0.06]], 0.02, 1], 4.394521], ['normal control 3', [[2031, 6, 30], [2032, 6, 30], [2032, 6, 30], [[[2031, 10, 19], 0.04], [[2032, 2, 17], 0.035], [[2031, 6, 12], 0.06], [[2032, 1, 13], 0.07]], 0.02, 1], 4.710383], ['normal control 4', [[2020, 3, 1], [2020, 6, 1], [2020, 4, 29], [[[2020, 2, 12], 0.05], [[2020, 4, 6], 0.06], [[2020, 2, 6], 0.06], [[2020, 2, 28], 0.04]], 0.02, 4], 0.766304]], [['regression accrual end inclusivity 1', [[2023, 5, 7], [2024, 5, 7], [2023, 12, 4], [[[2023, 8, 29], 0.05], [[2023, 9, 12], 0.07], [[2023, 6, 15], 0.04], [[2023, 7, 9], 0.035]], 0.025, 1], 2.795082], ['regression accrual end inclusivity 2', [[2025, 8, 31], [2026, 8, 31], [2026, 5, 4], [[[2025, 10, 31], 0.06], [[2025, 12, 24], 0.06], [[2026, 5, 29], 0.035], [[2026, 3, 23], 0.06]], 0.02, 1], 3.375342], ['partial repair probe 1', [[2021, 3, 27], [2022, 3, 27], [2021, 5, 24], [[[2021, 12, 2], 0.07]], 0.025, 1], 0.39726], ['partial repair probe 2', [[2028, 9, 30], [2029, 9, 30], [2029, 8, 29], [[[2029, 8, 9], 0.03], [[2028, 11, 8], 0.05], [[2028, 11, 20], 0.04], [[2029, 8, 29], 0.08]], 0.025, 1], 3.467123], ['normal control 1', [[2022, 2, 28], [2023, 2, 28], [2022, 6, 8], [[[2022, 11, 1], 0.06]], 0.025, 1], 0.684932], ['normal control 2', [[2040, 5, 31], [2040, 11, 30], [2040, 6, 26], [[[2040, 8, 23], 0.03], [[2040, 7, 18], 0.03]], 0.025, 2], 0.177596], ['normal control 3', [[2013, 3, 24], [2014, 3, 24], [2014, 2, 4], [[[2013, 9, 17], 0.06], [[2013, 6, 18], 0.035]], 0.025, 1], 3.763014], ['normal control 4', [[2039, 6, 15], [2040, 6, 15], [2040, 1, 8], [[[2039, 9, 3], 0.03], [[2039, 10, 30], 0.04], [[2040, 5, 12], 0.07]], 0.02, 1], 1.669399]], [['regression accrual end inclusivity 1', [[2036, 9, 12], [2037, 3, 12], [2036, 12, 23], [[[2036, 11, 29], 0.03], [[2036, 10, 31], 0.04]], 0.02, 2], 0.790055], ['regression accrual end inclusivity 2', [[2021, 11, 19], [2022, 5, 19], [2022, 4, 30], [[[2021, 12, 23], 0.04], [[2022, 1, 3], 0.035], [[2022, 1, 21], 0.04], [[2022, 2, 8], 0.07], [[2022, 4, 30], 0.08]], 0.025, 2], 2.29558], ['partial repair probe 1', [[2032, 11, 24], [2033, 11, 24], [2033, 2, 3], [], 0.025, 1], 0.486301], ['partial repair probe 2', [[2021, 11, 7], [2022, 2, 7], [2021, 12, 17], [[[2021, 11, 28], 0.05], [[2022, 2, 12], 0.05], [[2022, 1, 19], 0.03]], 0.025, 4], 0.400815], ['normal control 1', [[2022, 1, 27], [2023, 1, 27], [2022, 4, 18], [[[2022, 5, 16], 0.03], [[2022, 2, 7], 0.06], [[2022, 11, 24], 0.03], [[2022, 4, 20], 0.05]], 0.025, 1], 1.226027], ['normal control 2', [[2028, 9, 1], [2029, 9, 1], [2028, 10, 7], [], 0.02, 1], 0.19726], ['normal control 3', [[2037, 2, 4], [2037, 5, 4], [2037, 4, 22], [[[2037, 4, 8], 0.035]], 0.02, 4], 0.491573], ['normal control 4', [[2015, 10, 1], [2016, 4, 1], [2015, 10, 24], [[[2016, 3, 16], 0.06]], 0.025, 2], 0.157104]], [['regression accrual end inclusivity 1', [[2027, 7, 31], [2028, 7, 31], [2028, 2, 28], [], 0.025, 1], 1.448087], ['regression accrual end inclusivity 2', [[2019, 11, 18], [2020, 2, 18], [2020, 2, 2], [[[2019, 11, 12], 0.06], [[2020, 1, 23], 0.06], [[2020, 1, 23], 0.03]], 0.02, 4], 1.23913], ['partial repair probe 1', [[2038, 4, 20], [2038, 10, 20], [2038, 6, 3], [[[2038, 7, 30], 0.03], [[2038, 10, 2], 0.07], [[2038, 6, 3], 0.08]], 0.02, 2], 0.240437], ['partial repair probe 2', [[2026, 3, 2], [2026, 6, 2], [2026, 5, 3], [[[2026, 4, 24], 0.03], [[2026, 3, 28], 0.07]], 0.02, 4], 0.728261], ['normal control 1', [[2014, 6, 27], [2015, 6, 27], [2015, 1, 25], [], 0.02, 1], 1.161644], ['normal control 2', [[2023, 5, 11], [2023, 11, 11], [2023, 8, 30], [[[2023, 9, 9], 0.03], [[2023, 5, 9], 0.035], [[2023, 8, 30], 0.08]], 0.02, 2], 1.055707], ['normal control 3', [[2010, 1, 30], [2011, 1, 30], [2010, 8, 26], [[[2010, 9, 1], 0.05], [[2010, 2, 10], 0.035], [[2010, 8, 26], 0.08]], 0.025, 1], 1.964384], ['normal control 4', [[2036, 10, 30], [2037, 4, 30], [2037, 2, 1], [[[2036, 10, 9], 0.07]], 0.025, 2], 1.807692]]]
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 fixtureActualExpectedOutcome
regression accrual end inclusivity 11.0997271.092896Failed
regression accrual end inclusivity 20.390110.384615Failed
partial repair probe 11.5597831.546196Failed
partial repair probe 20.8054790.8Failed
normal control 11.6657531.654795Failed
normal control 20.8980980.881793Failed
normal control 30.9494540.939891Failed
normal control 40.5109890.505495Failed

SHA-256 / 6eff81a2a07978831fcf664d780e7ae04f75ecb330e9f772a5c15ba4eaa4c0a4

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:
                r = v
        return r
    total = Fraction(0)
    x = P
    while x <= S and x < Q:
        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 accrual end inclusivity 1', [[2019, 12, 1], [2020, 6, 1], [2020, 5, 9], [], 0.025, 2], 1.092896], ['regression accrual end inclusivity 2', [[2021, 3, 31], [2021, 6, 30], [2021, 6, 9], [], 0.02, 4], 0.384615], ['partial repair probe 1', [[2015, 8, 6], [2016, 2, 6], [2016, 1, 13], [[[2015, 12, 22], 0.05], [[2015, 10, 22], 0.05]], 0.02, 2], 1.546196], ['partial repair probe 2', [[2040, 8, 28], [2041, 8, 28], [2041, 1, 21], [], 0.02, 1], 0.8], ['normal control 1', [[2037, 5, 31], [2038, 5, 31], [2037, 10, 11], [[[2037, 8, 17], 0.04], [[2037, 6, 3], 0.05], [[2037, 5, 6], 0.03]], 0.025, 1], 1.654795], ['normal control 2', [[2022, 10, 4], [2023, 1, 4], [2022, 12, 21], [[[2022, 11, 14], 0.06]], 0.025, 4], 0.881793], ['normal control 3', [[2039, 6, 4], [2039, 12, 4], [2039, 8, 31], [[[2039, 6, 27], 0.04], [[2039, 11, 1], 0.035], [[2039, 8, 29], 0.035], [[2039, 7, 21], 0.05]], 0.02, 2], 0.939891], ['normal control 4', [[2013, 10, 30], [2014, 4, 30], [2014, 1, 30], [[[2014, 3, 23], 0.06], [[2014, 3, 27], 0.07]], 0.02, 2], 0.505495]], [['regression accrual end inclusivity 1', [[2030, 9, 23], [2031, 9, 23], [2030, 11, 20], [[[2030, 12, 5], 0.04], [[2030, 11, 20], 0.08]], 0.025, 1], 0.39726], ['regression accrual end inclusivity 2', [[2017, 3, 21], [2017, 6, 21], [2017, 3, 31], [[[2017, 4, 6], 0.05], [[2017, 6, 17], 0.05]], 0.02, 4], 0.054348], ['partial repair probe 1', [[2020, 5, 30], [2020, 11, 30], [2020, 6, 18], [[[2020, 9, 12], 0.04], [[2020, 5, 19], 0.035]], 0.025, 2], 0.180707], ['partial repair probe 2', [[2040, 8, 27], [2041, 2, 27], [2040, 10, 20], [[[2040, 11, 9], 0.035], [[2040, 7, 31], 0.05], [[2040, 9, 25], 0.05]], 0.02, 2], 0.733696], ['normal control 1', [[2033, 9, 30], [2033, 12, 30], [2033, 10, 8], [], 0.025, 4], 0.054945], ['normal control 2', [[2028, 5, 31], [2029, 5, 31], [2029, 4, 16], [[[2028, 8, 18], 0.06]], 0.02, 1], 4.394521], ['normal control 3', [[2031, 6, 30], [2032, 6, 30], [2032, 6, 30], [[[2031, 10, 19], 0.04], [[2032, 2, 17], 0.035], [[2031, 6, 12], 0.06], [[2032, 1, 13], 0.07]], 0.02, 1], 4.710383], ['normal control 4', [[2020, 3, 1], [2020, 6, 1], [2020, 4, 29], [[[2020, 2, 12], 0.05], [[2020, 4, 6], 0.06], [[2020, 2, 6], 0.06], [[2020, 2, 28], 0.04]], 0.02, 4], 0.766304]], [['regression accrual end inclusivity 1', [[2023, 5, 7], [2024, 5, 7], [2023, 12, 4], [[[2023, 8, 29], 0.05], [[2023, 9, 12], 0.07], [[2023, 6, 15], 0.04], [[2023, 7, 9], 0.035]], 0.025, 1], 2.795082], ['regression accrual end inclusivity 2', [[2025, 8, 31], [2026, 8, 31], [2026, 5, 4], [[[2025, 10, 31], 0.06], [[2025, 12, 24], 0.06], [[2026, 5, 29], 0.035], [[2026, 3, 23], 0.06]], 0.02, 1], 3.375342], ['partial repair probe 1', [[2021, 3, 27], [2022, 3, 27], [2021, 5, 24], [[[2021, 12, 2], 0.07]], 0.025, 1], 0.39726], ['partial repair probe 2', [[2028, 9, 30], [2029, 9, 30], [2029, 8, 29], [[[2029, 8, 9], 0.03], [[2028, 11, 8], 0.05], [[2028, 11, 20], 0.04], [[2029, 8, 29], 0.08]], 0.025, 1], 3.467123], ['normal control 1', [[2022, 2, 28], [2023, 2, 28], [2022, 6, 8], [[[2022, 11, 1], 0.06]], 0.025, 1], 0.684932], ['normal control 2', [[2040, 5, 31], [2040, 11, 30], [2040, 6, 26], [[[2040, 8, 23], 0.03], [[2040, 7, 18], 0.03]], 0.025, 2], 0.177596], ['normal control 3', [[2013, 3, 24], [2014, 3, 24], [2014, 2, 4], [[[2013, 9, 17], 0.06], [[2013, 6, 18], 0.035]], 0.025, 1], 3.763014], ['normal control 4', [[2039, 6, 15], [2040, 6, 15], [2040, 1, 8], [[[2039, 9, 3], 0.03], [[2039, 10, 30], 0.04], [[2040, 5, 12], 0.07]], 0.02, 1], 1.669399]], [['regression accrual end inclusivity 1', [[2036, 9, 12], [2037, 3, 12], [2036, 12, 23], [[[2036, 11, 29], 0.03], [[2036, 10, 31], 0.04]], 0.02, 2], 0.790055], ['regression accrual end inclusivity 2', [[2021, 11, 19], [2022, 5, 19], [2022, 4, 30], [[[2021, 12, 23], 0.04], [[2022, 1, 3], 0.035], [[2022, 1, 21], 0.04], [[2022, 2, 8], 0.07], [[2022, 4, 30], 0.08]], 0.025, 2], 2.29558], ['partial repair probe 1', [[2032, 11, 24], [2033, 11, 24], [2033, 2, 3], [], 0.025, 1], 0.486301], ['partial repair probe 2', [[2021, 11, 7], [2022, 2, 7], [2021, 12, 17], [[[2021, 11, 28], 0.05], [[2022, 2, 12], 0.05], [[2022, 1, 19], 0.03]], 0.025, 4], 0.400815], ['normal control 1', [[2022, 1, 27], [2023, 1, 27], [2022, 4, 18], [[[2022, 5, 16], 0.03], [[2022, 2, 7], 0.06], [[2022, 11, 24], 0.03], [[2022, 4, 20], 0.05]], 0.025, 1], 1.226027], ['normal control 2', [[2028, 9, 1], [2029, 9, 1], [2028, 10, 7], [], 0.02, 1], 0.19726], ['normal control 3', [[2037, 2, 4], [2037, 5, 4], [2037, 4, 22], [[[2037, 4, 8], 0.035]], 0.02, 4], 0.491573], ['normal control 4', [[2015, 10, 1], [2016, 4, 1], [2015, 10, 24], [[[2016, 3, 16], 0.06]], 0.025, 2], 0.157104]], [['regression accrual end inclusivity 1', [[2027, 7, 31], [2028, 7, 31], [2028, 2, 28], [], 0.025, 1], 1.448087], ['regression accrual end inclusivity 2', [[2019, 11, 18], [2020, 2, 18], [2020, 2, 2], [[[2019, 11, 12], 0.06], [[2020, 1, 23], 0.06], [[2020, 1, 23], 0.03]], 0.02, 4], 1.23913], ['partial repair probe 1', [[2038, 4, 20], [2038, 10, 20], [2038, 6, 3], [[[2038, 7, 30], 0.03], [[2038, 10, 2], 0.07], [[2038, 6, 3], 0.08]], 0.02, 2], 0.240437], ['partial repair probe 2', [[2026, 3, 2], [2026, 6, 2], [2026, 5, 3], [[[2026, 4, 24], 0.03], [[2026, 3, 28], 0.07]], 0.02, 4], 0.728261], ['normal control 1', [[2014, 6, 27], [2015, 6, 27], [2015, 1, 25], [], 0.02, 1], 1.161644], ['normal control 2', [[2023, 5, 11], [2023, 11, 11], [2023, 8, 30], [[[2023, 9, 9], 0.03], [[2023, 5, 9], 0.035], [[2023, 8, 30], 0.08]], 0.02, 2], 1.055707], ['normal control 3', [[2010, 1, 30], [2011, 1, 30], [2010, 8, 26], [[[2010, 9, 1], 0.05], [[2010, 2, 10], 0.035], [[2010, 8, 26], 0.08]], 0.025, 1], 1.964384], ['normal control 4', [[2036, 10, 30], [2037, 4, 30], [2037, 2, 1], [[[2036, 10, 9], 0.07]], 0.025, 2], 1.807692]]]
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 fixtureActualExpectedOutcome
regression accrual end inclusivity 11.0997271.092896Failed
regression accrual end inclusivity 20.390110.384615Failed
partial repair probe 11.5597831.546196Failed
partial repair probe 20.8054790.8Failed
normal control 11.6657531.654795Failed
normal control 20.8980980.881793Failed
normal control 30.9494540.939891Failed
normal control 40.5109890.505495Failed

SHA-256 / ca6b80bf95f0fff80bade9df05eb02300ffe53645603a4dda84edd8045c5cd08

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 accrual end inclusivity 1', [[2019, 12, 1], [2020, 6, 1], [2020, 5, 9], [], 0.025, 2], 1.092896], ['regression accrual end inclusivity 2', [[2021, 3, 31], [2021, 6, 30], [2021, 6, 9], [], 0.02, 4], 0.384615], ['partial repair probe 1', [[2015, 8, 6], [2016, 2, 6], [2016, 1, 13], [[[2015, 12, 22], 0.05], [[2015, 10, 22], 0.05]], 0.02, 2], 1.546196], ['partial repair probe 2', [[2040, 8, 28], [2041, 8, 28], [2041, 1, 21], [], 0.02, 1], 0.8], ['normal control 1', [[2037, 5, 31], [2038, 5, 31], [2037, 10, 11], [[[2037, 8, 17], 0.04], [[2037, 6, 3], 0.05], [[2037, 5, 6], 0.03]], 0.025, 1], 1.654795], ['normal control 2', [[2022, 10, 4], [2023, 1, 4], [2022, 12, 21], [[[2022, 11, 14], 0.06]], 0.025, 4], 0.881793], ['normal control 3', [[2039, 6, 4], [2039, 12, 4], [2039, 8, 31], [[[2039, 6, 27], 0.04], [[2039, 11, 1], 0.035], [[2039, 8, 29], 0.035], [[2039, 7, 21], 0.05]], 0.02, 2], 0.939891], ['normal control 4', [[2013, 10, 30], [2014, 4, 30], [2014, 1, 30], [[[2014, 3, 23], 0.06], [[2014, 3, 27], 0.07]], 0.02, 2], 0.505495]], [['regression accrual end inclusivity 1', [[2030, 9, 23], [2031, 9, 23], [2030, 11, 20], [[[2030, 12, 5], 0.04], [[2030, 11, 20], 0.08]], 0.025, 1], 0.39726], ['regression accrual end inclusivity 2', [[2017, 3, 21], [2017, 6, 21], [2017, 3, 31], [[[2017, 4, 6], 0.05], [[2017, 6, 17], 0.05]], 0.02, 4], 0.054348], ['partial repair probe 1', [[2020, 5, 30], [2020, 11, 30], [2020, 6, 18], [[[2020, 9, 12], 0.04], [[2020, 5, 19], 0.035]], 0.025, 2], 0.180707], ['partial repair probe 2', [[2040, 8, 27], [2041, 2, 27], [2040, 10, 20], [[[2040, 11, 9], 0.035], [[2040, 7, 31], 0.05], [[2040, 9, 25], 0.05]], 0.02, 2], 0.733696], ['normal control 1', [[2033, 9, 30], [2033, 12, 30], [2033, 10, 8], [], 0.025, 4], 0.054945], ['normal control 2', [[2028, 5, 31], [2029, 5, 31], [2029, 4, 16], [[[2028, 8, 18], 0.06]], 0.02, 1], 4.394521], ['normal control 3', [[2031, 6, 30], [2032, 6, 30], [2032, 6, 30], [[[2031, 10, 19], 0.04], [[2032, 2, 17], 0.035], [[2031, 6, 12], 0.06], [[2032, 1, 13], 0.07]], 0.02, 1], 4.710383], ['normal control 4', [[2020, 3, 1], [2020, 6, 1], [2020, 4, 29], [[[2020, 2, 12], 0.05], [[2020, 4, 6], 0.06], [[2020, 2, 6], 0.06], [[2020, 2, 28], 0.04]], 0.02, 4], 0.766304]], [['regression accrual end inclusivity 1', [[2023, 5, 7], [2024, 5, 7], [2023, 12, 4], [[[2023, 8, 29], 0.05], [[2023, 9, 12], 0.07], [[2023, 6, 15], 0.04], [[2023, 7, 9], 0.035]], 0.025, 1], 2.795082], ['regression accrual end inclusivity 2', [[2025, 8, 31], [2026, 8, 31], [2026, 5, 4], [[[2025, 10, 31], 0.06], [[2025, 12, 24], 0.06], [[2026, 5, 29], 0.035], [[2026, 3, 23], 0.06]], 0.02, 1], 3.375342], ['partial repair probe 1', [[2021, 3, 27], [2022, 3, 27], [2021, 5, 24], [[[2021, 12, 2], 0.07]], 0.025, 1], 0.39726], ['partial repair probe 2', [[2028, 9, 30], [2029, 9, 30], [2029, 8, 29], [[[2029, 8, 9], 0.03], [[2028, 11, 8], 0.05], [[2028, 11, 20], 0.04], [[2029, 8, 29], 0.08]], 0.025, 1], 3.467123], ['normal control 1', [[2022, 2, 28], [2023, 2, 28], [2022, 6, 8], [[[2022, 11, 1], 0.06]], 0.025, 1], 0.684932], ['normal control 2', [[2040, 5, 31], [2040, 11, 30], [2040, 6, 26], [[[2040, 8, 23], 0.03], [[2040, 7, 18], 0.03]], 0.025, 2], 0.177596], ['normal control 3', [[2013, 3, 24], [2014, 3, 24], [2014, 2, 4], [[[2013, 9, 17], 0.06], [[2013, 6, 18], 0.035]], 0.025, 1], 3.763014], ['normal control 4', [[2039, 6, 15], [2040, 6, 15], [2040, 1, 8], [[[2039, 9, 3], 0.03], [[2039, 10, 30], 0.04], [[2040, 5, 12], 0.07]], 0.02, 1], 1.669399]], [['regression accrual end inclusivity 1', [[2036, 9, 12], [2037, 3, 12], [2036, 12, 23], [[[2036, 11, 29], 0.03], [[2036, 10, 31], 0.04]], 0.02, 2], 0.790055], ['regression accrual end inclusivity 2', [[2021, 11, 19], [2022, 5, 19], [2022, 4, 30], [[[2021, 12, 23], 0.04], [[2022, 1, 3], 0.035], [[2022, 1, 21], 0.04], [[2022, 2, 8], 0.07], [[2022, 4, 30], 0.08]], 0.025, 2], 2.29558], ['partial repair probe 1', [[2032, 11, 24], [2033, 11, 24], [2033, 2, 3], [], 0.025, 1], 0.486301], ['partial repair probe 2', [[2021, 11, 7], [2022, 2, 7], [2021, 12, 17], [[[2021, 11, 28], 0.05], [[2022, 2, 12], 0.05], [[2022, 1, 19], 0.03]], 0.025, 4], 0.400815], ['normal control 1', [[2022, 1, 27], [2023, 1, 27], [2022, 4, 18], [[[2022, 5, 16], 0.03], [[2022, 2, 7], 0.06], [[2022, 11, 24], 0.03], [[2022, 4, 20], 0.05]], 0.025, 1], 1.226027], ['normal control 2', [[2028, 9, 1], [2029, 9, 1], [2028, 10, 7], [], 0.02, 1], 0.19726], ['normal control 3', [[2037, 2, 4], [2037, 5, 4], [2037, 4, 22], [[[2037, 4, 8], 0.035]], 0.02, 4], 0.491573], ['normal control 4', [[2015, 10, 1], [2016, 4, 1], [2015, 10, 24], [[[2016, 3, 16], 0.06]], 0.025, 2], 0.157104]], [['regression accrual end inclusivity 1', [[2027, 7, 31], [2028, 7, 31], [2028, 2, 28], [], 0.025, 1], 1.448087], ['regression accrual end inclusivity 2', [[2019, 11, 18], [2020, 2, 18], [2020, 2, 2], [[[2019, 11, 12], 0.06], [[2020, 1, 23], 0.06], [[2020, 1, 23], 0.03]], 0.02, 4], 1.23913], ['partial repair probe 1', [[2038, 4, 20], [2038, 10, 20], [2038, 6, 3], [[[2038, 7, 30], 0.03], [[2038, 10, 2], 0.07], [[2038, 6, 3], 0.08]], 0.02, 2], 0.240437], ['partial repair probe 2', [[2026, 3, 2], [2026, 6, 2], [2026, 5, 3], [[[2026, 4, 24], 0.03], [[2026, 3, 28], 0.07]], 0.02, 4], 0.728261], ['normal control 1', [[2014, 6, 27], [2015, 6, 27], [2015, 1, 25], [], 0.02, 1], 1.161644], ['normal control 2', [[2023, 5, 11], [2023, 11, 11], [2023, 8, 30], [[[2023, 9, 9], 0.03], [[2023, 5, 9], 0.035], [[2023, 8, 30], 0.08]], 0.02, 2], 1.055707], ['normal control 3', [[2010, 1, 30], [2011, 1, 30], [2010, 8, 26], [[[2010, 9, 1], 0.05], [[2010, 2, 10], 0.035], [[2010, 8, 26], 0.08]], 0.025, 1], 1.964384], ['normal control 4', [[2036, 10, 30], [2037, 4, 30], [2037, 2, 1], [[[2036, 10, 9], 0.07]], 0.025, 2], 1.807692]]]
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 fixtureActualExpectedOutcome
regression accrual end inclusivity 11.0928961.092896Passed
regression accrual end inclusivity 20.3846150.384615Passed
partial repair probe 11.5461961.546196Passed
partial repair probe 20.80.8Passed
normal control 11.6547951.654795Passed
normal control 20.8817930.881793Passed
normal control 30.9398910.939891Passed
normal control 40.5054950.505495Passed

SHA-256 / 4b59fa537f158a85b90a227bc958ded9796f64a93ab05cffebcf318676fc0b5f

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

Case digest / c523fe35af655a1c4fea5530391ca7199f9625f6e53c62d7720ef1eb266ee223