FA-61151 / Bond day-count conventions / Open access
Business/252 day count with daily compounding factor: listed holidays are subtracted from a weekday count · case 01
Holidays on weekends and duplicated holiday entries remove business days twice.
ROOT CAUSE
Holidays are subtracted from the weekday count by list length instead of excluded per day.
VERIFIED REPAIR
Exclude a day only if it is a weekday that appears in the holiday set.
Unsuccessful approach: Deduplicating the list still subtracts holidays that fall on weekends.
Case contract
Inputs start and end [y,m,d], a holiday list (may contain weekend dates and duplicates) and an annual rate in percent. bd counts weekdays in [start, end) that are not holidays. Factor = (1 + rate/100)^(bd/252). Return [bd, factor rounded to 8 decimals].
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
N = 1
observations = []
def solve(start, end, holidays, rate):
S = datetime.date(*start)
E = datetime.date(*end)
H = {datetime.date(*h) for h in holidays}
bd = 0
x = S
while x < E:
if x.weekday() < 5:
bd += 1
x += datetime.timedelta(days=1)
bd -= len([h for h in holidays if S <= datetime.date(*h) < E])
factor = (1 + rate / 100) ** (bd / 252)
return [bd, round(factor, 8)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression holiday subtraction 1', [[2030, 6, 1], [2030, 10, 30], [[2030, 8, 1], [2030, 8, 22], [2030, 6, 19], [2030, 9, 13], [2030, 10, 24], [2030, 9, 4], [2030, 9, 4]], 13.65], [101, 1.05262063]], ['regression holiday subtraction 2', [[2018, 12, 8], [2018, 12, 18], [[2018, 12, 6], [2018, 12, 5], [2018, 12, 12], [2018, 12, 15], [2018, 12, 9], [2018, 12, 9]], 2.0], [5, 1.00039299]], ['partial repair probe 1', [[2025, 4, 25], [2026, 5, 9], [[2025, 8, 25], [2025, 8, 25], [2025, 7, 26], [2025, 5, 31]], 10.75], [270, 1.11560678]], ['partial repair probe 2', [[2024, 12, 1], [2025, 1, 23], [[2024, 12, 7], [2025, 1, 27]], 13.65], [38, 1.0194819]], ['boundary control 1', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['boundary control 2', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['normal control 1', [[2025, 2, 13], [2025, 2, 22], [[2025, 2, 10]], 2.0], [7, 1.00055022]], ['normal control 2', [[2023, 10, 20], [2023, 10, 27], [[2023, 10, 17], [2023, 10, 17], [2023, 11, 1]], 6.5], [5, 1.00125028]]], [['regression holiday subtraction 1', [[2028, 2, 28], [2028, 9, 11], [[2028, 9, 15], [2028, 4, 16], [2028, 8, 1]], 10.75], [139, 1.05793611]], ['regression holiday subtraction 2', [[2022, 2, 28], [2023, 3, 28], [[2022, 2, 28], [2023, 2, 23], [2022, 6, 11], [2022, 8, 12], [2022, 8, 12], [2022, 11, 25], [2022, 11, 25], [2022, 12, 16], [2022, 12, 16]], 10.75], [276, 1.1183222]], ['partial repair probe 1', [[2022, 7, 31], [2023, 1, 11], [[2022, 7, 31], [2022, 12, 4], [2022, 9, 3], [2022, 12, 31], [2022, 9, 20], [2022, 11, 14], [2022, 11, 14]], 2.0], [115, 1.00907787]], ['partial repair probe 2', [[2022, 12, 30], [2023, 1, 12], [[2022, 12, 31], [2022, 12, 29], [2022, 12, 29], [2023, 1, 2], [2023, 1, 6]], 6.5], [7, 1.00175083]], ['boundary control 1', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['boundary control 2', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['normal control 1', [[2021, 12, 3], [2022, 4, 20], [], 10.75], [98, 1.04050647]], ['normal control 2', [[2029, 3, 1], [2029, 3, 2], [[2029, 3, 6], [2029, 3, 5], [2029, 3, 4], [2029, 3, 6], [2029, 3, 6], [2029, 2, 25]], 10.75], [1, 1.00040526]]], [['regression holiday subtraction 1', [[2028, 8, 30], [2029, 1, 12], [[2028, 10, 15], [2028, 10, 31], [2028, 9, 15], [2028, 10, 14], [2028, 11, 10]], 10.75], [94, 1.03882147]], ['regression holiday subtraction 2', [[2027, 2, 28], [2027, 9, 23], [[2027, 7, 14], [2027, 7, 22], [2027, 7, 22], [2027, 9, 9]], 10.75], [145, 1.06051116]], ['partial repair probe 1', [[2022, 1, 1], [2022, 8, 15], [[2022, 4, 18], [2022, 4, 3], [2022, 5, 7]], 13.65], [159, 1.08408084]], ['partial repair probe 2', [[2023, 5, 17], [2023, 11, 28], [[2023, 9, 24], [2023, 6, 16], [2023, 6, 1]], 13.65], [137, 1.07203847]], ['boundary control 1', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['boundary control 2', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['normal control 1', [[2020, 4, 10], [2020, 9, 27], [[2020, 5, 20]], 6.5], [120, 1.03044217]], ['normal control 2', [[2024, 2, 16], [2024, 2, 18], [[2024, 2, 19], [2024, 2, 19], [2024, 2, 16], [2024, 2, 18]], 10.75], [0, 1.0]]], [['regression holiday subtraction 1', [[2021, 3, 8], [2021, 9, 28], [[2021, 8, 26], [2021, 5, 21], [2021, 7, 16], [2021, 9, 4], [2021, 9, 4], [2021, 9, 7], [2021, 9, 25]], 6.5], [142, 1.03612293]], ['regression holiday subtraction 2', [[2027, 11, 23], [2028, 4, 7], [[2027, 12, 28], [2027, 12, 15], [2027, 12, 16], [2028, 2, 14], [2028, 2, 14], [2028, 2, 15], [2028, 4, 1]], 2.0], [93, 1.00733488]], ['partial repair probe 1', [[2019, 11, 9], [2020, 4, 3], [[2019, 12, 7]], 6.5], [104, 1.02633027]], ['partial repair probe 2', [[2025, 10, 7], [2026, 11, 2], [[2026, 4, 18], [2026, 5, 8], [2026, 7, 2], [2026, 7, 2]], 2.0], [277, 1.02200581]], ['boundary control 1', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['boundary control 2', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['normal control 1', [[2020, 6, 19], [2021, 3, 4], [[2021, 3, 3]], 6.5], [183, 1.04679352]], ['normal control 2', [[2024, 11, 4], [2024, 11, 12], [[2024, 11, 17], [2024, 11, 4], [2024, 11, 2], [2024, 11, 5]], 13.65], [4, 1.00203307]]], [['regression holiday subtraction 1', [[2020, 8, 9], [2020, 8, 26], [[2020, 8, 20], [2020, 8, 15], [2020, 8, 24], [2020, 8, 24]], 2.0], [10, 1.00078613]], ['regression holiday subtraction 2', [[2023, 3, 4], [2023, 8, 25], [[2023, 8, 10], [2023, 3, 2], [2023, 4, 14], [2023, 4, 14], [2023, 5, 15], [2023, 5, 16]], 6.5], [120, 1.03044217]], ['partial repair probe 1', [[2027, 9, 26], [2028, 1, 18], [[2027, 12, 28], [2027, 11, 24], [2027, 11, 24], [2027, 10, 16]], 10.75], [79, 1.03252698]], ['partial repair probe 2', [[2028, 2, 21], [2028, 4, 21], [[2028, 3, 5], [2028, 3, 5], [2028, 3, 28], [2028, 4, 23]], 10.75], [43, 1.01757538]], ['boundary control 1', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['boundary control 2', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['normal control 1', [[2021, 5, 29], [2021, 8, 5], [[2021, 5, 31]], 6.5], [47, 1.01181455]], ['normal control 2', [[2019, 6, 30], [2020, 4, 5], [[2020, 2, 12]], 10.75], [199, 1.08397053]]]]
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 holiday subtraction 1 | [100, 1.0520863] | [101, 1.05262063] | Failed |
| regression holiday subtraction 2 | [2, 1.00015718] | [5, 1.00039299] | Failed |
| partial repair probe 1 | [267, 1.11425154] | [270, 1.11560678] | Failed |
| partial repair probe 2 | [37, 1.01896439] | [38, 1.0194819] | Failed |
| boundary control 1 | [0, 1.0] | [0, 1.0] | Passed |
| boundary control 2 | [1, 1.00037829] | [1, 1.00037829] | Passed |
| normal control 1 | [7, 1.00055022] | [7, 1.00055022] | Passed |
| normal control 2 | [5, 1.00125028] | [5, 1.00125028] | Passed |
SHA-256 / ad7cff72c57f46f37929cd94e3cfeef08cfd3d53eb61170c944bd8e1f1d9e314
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
N = 1
observations = []
def solve(start, end, holidays, rate):
S = datetime.date(*start)
E = datetime.date(*end)
H = {datetime.date(*h) for h in holidays}
bd = 0
x = S
while x < E:
if x.weekday() < 5:
bd += 1
x += datetime.timedelta(days=1)
bd -= len({tuple(h) for h in holidays if S <= datetime.date(*h) < E})
factor = (1 + rate / 100) ** (bd / 252)
return [bd, round(factor, 8)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression holiday subtraction 1', [[2030, 6, 1], [2030, 10, 30], [[2030, 8, 1], [2030, 8, 22], [2030, 6, 19], [2030, 9, 13], [2030, 10, 24], [2030, 9, 4], [2030, 9, 4]], 13.65], [101, 1.05262063]], ['regression holiday subtraction 2', [[2018, 12, 8], [2018, 12, 18], [[2018, 12, 6], [2018, 12, 5], [2018, 12, 12], [2018, 12, 15], [2018, 12, 9], [2018, 12, 9]], 2.0], [5, 1.00039299]], ['partial repair probe 1', [[2025, 4, 25], [2026, 5, 9], [[2025, 8, 25], [2025, 8, 25], [2025, 7, 26], [2025, 5, 31]], 10.75], [270, 1.11560678]], ['partial repair probe 2', [[2024, 12, 1], [2025, 1, 23], [[2024, 12, 7], [2025, 1, 27]], 13.65], [38, 1.0194819]], ['boundary control 1', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['boundary control 2', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['normal control 1', [[2025, 2, 13], [2025, 2, 22], [[2025, 2, 10]], 2.0], [7, 1.00055022]], ['normal control 2', [[2023, 10, 20], [2023, 10, 27], [[2023, 10, 17], [2023, 10, 17], [2023, 11, 1]], 6.5], [5, 1.00125028]]], [['regression holiday subtraction 1', [[2028, 2, 28], [2028, 9, 11], [[2028, 9, 15], [2028, 4, 16], [2028, 8, 1]], 10.75], [139, 1.05793611]], ['regression holiday subtraction 2', [[2022, 2, 28], [2023, 3, 28], [[2022, 2, 28], [2023, 2, 23], [2022, 6, 11], [2022, 8, 12], [2022, 8, 12], [2022, 11, 25], [2022, 11, 25], [2022, 12, 16], [2022, 12, 16]], 10.75], [276, 1.1183222]], ['partial repair probe 1', [[2022, 7, 31], [2023, 1, 11], [[2022, 7, 31], [2022, 12, 4], [2022, 9, 3], [2022, 12, 31], [2022, 9, 20], [2022, 11, 14], [2022, 11, 14]], 2.0], [115, 1.00907787]], ['partial repair probe 2', [[2022, 12, 30], [2023, 1, 12], [[2022, 12, 31], [2022, 12, 29], [2022, 12, 29], [2023, 1, 2], [2023, 1, 6]], 6.5], [7, 1.00175083]], ['boundary control 1', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['boundary control 2', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['normal control 1', [[2021, 12, 3], [2022, 4, 20], [], 10.75], [98, 1.04050647]], ['normal control 2', [[2029, 3, 1], [2029, 3, 2], [[2029, 3, 6], [2029, 3, 5], [2029, 3, 4], [2029, 3, 6], [2029, 3, 6], [2029, 2, 25]], 10.75], [1, 1.00040526]]], [['regression holiday subtraction 1', [[2028, 8, 30], [2029, 1, 12], [[2028, 10, 15], [2028, 10, 31], [2028, 9, 15], [2028, 10, 14], [2028, 11, 10]], 10.75], [94, 1.03882147]], ['regression holiday subtraction 2', [[2027, 2, 28], [2027, 9, 23], [[2027, 7, 14], [2027, 7, 22], [2027, 7, 22], [2027, 9, 9]], 10.75], [145, 1.06051116]], ['partial repair probe 1', [[2022, 1, 1], [2022, 8, 15], [[2022, 4, 18], [2022, 4, 3], [2022, 5, 7]], 13.65], [159, 1.08408084]], ['partial repair probe 2', [[2023, 5, 17], [2023, 11, 28], [[2023, 9, 24], [2023, 6, 16], [2023, 6, 1]], 13.65], [137, 1.07203847]], ['boundary control 1', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['boundary control 2', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['normal control 1', [[2020, 4, 10], [2020, 9, 27], [[2020, 5, 20]], 6.5], [120, 1.03044217]], ['normal control 2', [[2024, 2, 16], [2024, 2, 18], [[2024, 2, 19], [2024, 2, 19], [2024, 2, 16], [2024, 2, 18]], 10.75], [0, 1.0]]], [['regression holiday subtraction 1', [[2021, 3, 8], [2021, 9, 28], [[2021, 8, 26], [2021, 5, 21], [2021, 7, 16], [2021, 9, 4], [2021, 9, 4], [2021, 9, 7], [2021, 9, 25]], 6.5], [142, 1.03612293]], ['regression holiday subtraction 2', [[2027, 11, 23], [2028, 4, 7], [[2027, 12, 28], [2027, 12, 15], [2027, 12, 16], [2028, 2, 14], [2028, 2, 14], [2028, 2, 15], [2028, 4, 1]], 2.0], [93, 1.00733488]], ['partial repair probe 1', [[2019, 11, 9], [2020, 4, 3], [[2019, 12, 7]], 6.5], [104, 1.02633027]], ['partial repair probe 2', [[2025, 10, 7], [2026, 11, 2], [[2026, 4, 18], [2026, 5, 8], [2026, 7, 2], [2026, 7, 2]], 2.0], [277, 1.02200581]], ['boundary control 1', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['boundary control 2', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['normal control 1', [[2020, 6, 19], [2021, 3, 4], [[2021, 3, 3]], 6.5], [183, 1.04679352]], ['normal control 2', [[2024, 11, 4], [2024, 11, 12], [[2024, 11, 17], [2024, 11, 4], [2024, 11, 2], [2024, 11, 5]], 13.65], [4, 1.00203307]]], [['regression holiday subtraction 1', [[2020, 8, 9], [2020, 8, 26], [[2020, 8, 20], [2020, 8, 15], [2020, 8, 24], [2020, 8, 24]], 2.0], [10, 1.00078613]], ['regression holiday subtraction 2', [[2023, 3, 4], [2023, 8, 25], [[2023, 8, 10], [2023, 3, 2], [2023, 4, 14], [2023, 4, 14], [2023, 5, 15], [2023, 5, 16]], 6.5], [120, 1.03044217]], ['partial repair probe 1', [[2027, 9, 26], [2028, 1, 18], [[2027, 12, 28], [2027, 11, 24], [2027, 11, 24], [2027, 10, 16]], 10.75], [79, 1.03252698]], ['partial repair probe 2', [[2028, 2, 21], [2028, 4, 21], [[2028, 3, 5], [2028, 3, 5], [2028, 3, 28], [2028, 4, 23]], 10.75], [43, 1.01757538]], ['boundary control 1', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['boundary control 2', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['normal control 1', [[2021, 5, 29], [2021, 8, 5], [[2021, 5, 31]], 6.5], [47, 1.01181455]], ['normal control 2', [[2019, 6, 30], [2020, 4, 5], [[2020, 2, 12]], 10.75], [199, 1.08397053]]]]
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 holiday subtraction 1 | [101, 1.05262063] | [101, 1.05262063] | Passed |
| regression holiday subtraction 2 | [3, 1.00023577] | [5, 1.00039299] | Failed |
| partial repair probe 1 | [268, 1.1147031] | [270, 1.11560678] | Failed |
| partial repair probe 2 | [37, 1.01896439] | [38, 1.0194819] | Failed |
| boundary control 1 | [0, 1.0] | [0, 1.0] | Passed |
| boundary control 2 | [1, 1.00037829] | [1, 1.00037829] | Passed |
| normal control 1 | [7, 1.00055022] | [7, 1.00055022] | Passed |
| normal control 2 | [5, 1.00125028] | [5, 1.00125028] | Passed |
SHA-256 / 279e4353e26a7d70ff89cd950733e4aa6b8077ea01c5448d5f5f699cc0016d5f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
N = 1
observations = []
def solve(start, end, holidays, rate):
S = datetime.date(*start)
E = datetime.date(*end)
H = {datetime.date(*h) for h in holidays}
bd = 0
x = S
while x < E:
if x.weekday() < 5 and x not in H:
bd += 1
x += datetime.timedelta(days=1)
factor = (1 + rate / 100) ** (bd / 252)
return [bd, round(factor, 8)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression holiday subtraction 1', [[2030, 6, 1], [2030, 10, 30], [[2030, 8, 1], [2030, 8, 22], [2030, 6, 19], [2030, 9, 13], [2030, 10, 24], [2030, 9, 4], [2030, 9, 4]], 13.65], [101, 1.05262063]], ['regression holiday subtraction 2', [[2018, 12, 8], [2018, 12, 18], [[2018, 12, 6], [2018, 12, 5], [2018, 12, 12], [2018, 12, 15], [2018, 12, 9], [2018, 12, 9]], 2.0], [5, 1.00039299]], ['partial repair probe 1', [[2025, 4, 25], [2026, 5, 9], [[2025, 8, 25], [2025, 8, 25], [2025, 7, 26], [2025, 5, 31]], 10.75], [270, 1.11560678]], ['partial repair probe 2', [[2024, 12, 1], [2025, 1, 23], [[2024, 12, 7], [2025, 1, 27]], 13.65], [38, 1.0194819]], ['boundary control 1', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['boundary control 2', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['normal control 1', [[2025, 2, 13], [2025, 2, 22], [[2025, 2, 10]], 2.0], [7, 1.00055022]], ['normal control 2', [[2023, 10, 20], [2023, 10, 27], [[2023, 10, 17], [2023, 10, 17], [2023, 11, 1]], 6.5], [5, 1.00125028]]], [['regression holiday subtraction 1', [[2028, 2, 28], [2028, 9, 11], [[2028, 9, 15], [2028, 4, 16], [2028, 8, 1]], 10.75], [139, 1.05793611]], ['regression holiday subtraction 2', [[2022, 2, 28], [2023, 3, 28], [[2022, 2, 28], [2023, 2, 23], [2022, 6, 11], [2022, 8, 12], [2022, 8, 12], [2022, 11, 25], [2022, 11, 25], [2022, 12, 16], [2022, 12, 16]], 10.75], [276, 1.1183222]], ['partial repair probe 1', [[2022, 7, 31], [2023, 1, 11], [[2022, 7, 31], [2022, 12, 4], [2022, 9, 3], [2022, 12, 31], [2022, 9, 20], [2022, 11, 14], [2022, 11, 14]], 2.0], [115, 1.00907787]], ['partial repair probe 2', [[2022, 12, 30], [2023, 1, 12], [[2022, 12, 31], [2022, 12, 29], [2022, 12, 29], [2023, 1, 2], [2023, 1, 6]], 6.5], [7, 1.00175083]], ['boundary control 1', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['boundary control 2', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['normal control 1', [[2021, 12, 3], [2022, 4, 20], [], 10.75], [98, 1.04050647]], ['normal control 2', [[2029, 3, 1], [2029, 3, 2], [[2029, 3, 6], [2029, 3, 5], [2029, 3, 4], [2029, 3, 6], [2029, 3, 6], [2029, 2, 25]], 10.75], [1, 1.00040526]]], [['regression holiday subtraction 1', [[2028, 8, 30], [2029, 1, 12], [[2028, 10, 15], [2028, 10, 31], [2028, 9, 15], [2028, 10, 14], [2028, 11, 10]], 10.75], [94, 1.03882147]], ['regression holiday subtraction 2', [[2027, 2, 28], [2027, 9, 23], [[2027, 7, 14], [2027, 7, 22], [2027, 7, 22], [2027, 9, 9]], 10.75], [145, 1.06051116]], ['partial repair probe 1', [[2022, 1, 1], [2022, 8, 15], [[2022, 4, 18], [2022, 4, 3], [2022, 5, 7]], 13.65], [159, 1.08408084]], ['partial repair probe 2', [[2023, 5, 17], [2023, 11, 28], [[2023, 9, 24], [2023, 6, 16], [2023, 6, 1]], 13.65], [137, 1.07203847]], ['boundary control 1', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['boundary control 2', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['normal control 1', [[2020, 4, 10], [2020, 9, 27], [[2020, 5, 20]], 6.5], [120, 1.03044217]], ['normal control 2', [[2024, 2, 16], [2024, 2, 18], [[2024, 2, 19], [2024, 2, 19], [2024, 2, 16], [2024, 2, 18]], 10.75], [0, 1.0]]], [['regression holiday subtraction 1', [[2021, 3, 8], [2021, 9, 28], [[2021, 8, 26], [2021, 5, 21], [2021, 7, 16], [2021, 9, 4], [2021, 9, 4], [2021, 9, 7], [2021, 9, 25]], 6.5], [142, 1.03612293]], ['regression holiday subtraction 2', [[2027, 11, 23], [2028, 4, 7], [[2027, 12, 28], [2027, 12, 15], [2027, 12, 16], [2028, 2, 14], [2028, 2, 14], [2028, 2, 15], [2028, 4, 1]], 2.0], [93, 1.00733488]], ['partial repair probe 1', [[2019, 11, 9], [2020, 4, 3], [[2019, 12, 7]], 6.5], [104, 1.02633027]], ['partial repair probe 2', [[2025, 10, 7], [2026, 11, 2], [[2026, 4, 18], [2026, 5, 8], [2026, 7, 2], [2026, 7, 2]], 2.0], [277, 1.02200581]], ['boundary control 1', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['boundary control 2', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['normal control 1', [[2020, 6, 19], [2021, 3, 4], [[2021, 3, 3]], 6.5], [183, 1.04679352]], ['normal control 2', [[2024, 11, 4], [2024, 11, 12], [[2024, 11, 17], [2024, 11, 4], [2024, 11, 2], [2024, 11, 5]], 13.65], [4, 1.00203307]]], [['regression holiday subtraction 1', [[2020, 8, 9], [2020, 8, 26], [[2020, 8, 20], [2020, 8, 15], [2020, 8, 24], [2020, 8, 24]], 2.0], [10, 1.00078613]], ['regression holiday subtraction 2', [[2023, 3, 4], [2023, 8, 25], [[2023, 8, 10], [2023, 3, 2], [2023, 4, 14], [2023, 4, 14], [2023, 5, 15], [2023, 5, 16]], 6.5], [120, 1.03044217]], ['partial repair probe 1', [[2027, 9, 26], [2028, 1, 18], [[2027, 12, 28], [2027, 11, 24], [2027, 11, 24], [2027, 10, 16]], 10.75], [79, 1.03252698]], ['partial repair probe 2', [[2028, 2, 21], [2028, 4, 21], [[2028, 3, 5], [2028, 3, 5], [2028, 3, 28], [2028, 4, 23]], 10.75], [43, 1.01757538]], ['boundary control 1', [[2024, 5, 6], [2024, 5, 6], [], 10.0], [0, 1.0]], ['boundary control 2', [[2024, 5, 3], [2024, 5, 6], [], 10.0], [1, 1.00037829]], ['normal control 1', [[2021, 5, 29], [2021, 8, 5], [[2021, 5, 31]], 6.5], [47, 1.01181455]], ['normal control 2', [[2019, 6, 30], [2020, 4, 5], [[2020, 2, 12]], 10.75], [199, 1.08397053]]]]
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 holiday subtraction 1 | [101, 1.05262063] | [101, 1.05262063] | Passed |
| regression holiday subtraction 2 | [5, 1.00039299] | [5, 1.00039299] | Passed |
| partial repair probe 1 | [270, 1.11560678] | [270, 1.11560678] | Passed |
| partial repair probe 2 | [38, 1.0194819] | [38, 1.0194819] | Passed |
| boundary control 1 | [0, 1.0] | [0, 1.0] | Passed |
| boundary control 2 | [1, 1.00037829] | [1, 1.00037829] | Passed |
| normal control 1 | [7, 1.00055022] | [7, 1.00055022] | Passed |
| normal control 2 | [5, 1.00125028] | [5, 1.00125028] | Passed |
SHA-256 / d3004cc0be77d1242a72921f2052b6d26551f2faa04dc3da2a3841023ae18bf2
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.445990+00:00.
Case digest / 9cec1703be13504ad4d015cc48f67f104dcf61d535efcaf326216247a540dc3a