FA-60961 / Bond day-count conventions / Open access
Backward coupon schedule generation: the end-of-month flag is not consulted · case 01
Month-end maturities with the flag set produce coupons on the 28th or 30th instead of month end.
ROOT CAUSE
The day rule always clamps the maturity day and never applies month-end rolling.
VERIFIED REPAIR
Roll to month end only when the flag is set and maturity is a month end.
Unsuccessful approach: Applying month-end rolling whenever maturity is a month end ignores a cleared flag.
Case contract
Inputs issue and maturity [y,m,d], months per period and an end-of-month flag. Unadjusted coupon dates are generated backward from maturity: the k-th date is maturity shifted back k*months calendar months, keeping the maturity day clamped to the month length; if the flag is set and maturity is the last day of its month, every date is the last day of its month. Dates on or before issue are dropped. If more than one date remains and the first is fewer than 15 days after issue, it is removed (long first coupon). Return the dates ascending.
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(issue, maturity, months, eom):
def mlen(y, m):
if m == 2:
return 29 if (y % 4 == 0 and y % 100 != 0) or y % 400 == 0 else 28
return 30 if m in (4, 6, 9, 11) else 31
def shift(y, m, k):
t = y * 12 + (m - 1) - k
return t // 12, t % 12 + 1
I = datetime.date(*issue)
my, mm, md = maturity
end_eom = md == mlen(my, mm)
out = []
k = 0
while True:
y, m = shift(my, mm, k * months)
d = min(md, mlen(y, m))
if datetime.date(y, m, d) <= I:
break
out.append([y, m, d])
k += 1
out.reverse()
if len(out) > 1 and (datetime.date(*out[0]) - I).days < 15:
out.pop(0)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression end-of-month flag 1', [[2016, 10, 14], [2019, 9, 30], 6, True], [[2017, 3, 31], [2017, 9, 30], [2018, 3, 31], [2018, 9, 30], [2019, 3, 31], [2019, 9, 30]]], ['regression end-of-month flag 2', [[2008, 4, 3], [2011, 9, 30], 3, True], [[2008, 6, 30], [2008, 9, 30], [2008, 12, 31], [2009, 3, 31], [2009, 6, 30], [2009, 9, 30], [2009, 12, 31], [2010, 3, 31], [2010, 6, 30], [2010, 9, 30], [2010, 12, 31], [2011, 3, 31], [2011, 6, 30], [2011, 9, 30]]], ['partial repair probe 1', [[2035, 9, 1], [2036, 6, 30], 6, False], [[2035, 12, 30], [2036, 6, 30]]], ['partial repair probe 2', [[2006, 8, 13], [2009, 6, 30], 1, False], [[2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30], [2008, 5, 30], [2008, 6, 30], [2008, 7, 30], [2008, 8, 30], [2008, 9, 30], [2008, 10, 30], [2008, 11, 30], [2008, 12, 30], [2009, 1, 30], [2009, 2, 28], [2009, 3, 30], [2009, 4, 30], [2009, 5, 30], [2009, 6, 30]]], ['boundary control 1', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2003, 5, 3], [2005, 4, 30], 12, False], [[2004, 4, 30], [2005, 4, 30]]], ['normal control 2', [[2026, 3, 1], [2028, 9, 1], 6, True], [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]]]], [['regression end-of-month flag 1', [[2027, 9, 4], [2029, 6, 30], 6, True], [[2027, 12, 31], [2028, 6, 30], [2028, 12, 31], [2029, 6, 30]]], ['regression end-of-month flag 2', [[2034, 4, 30], [2035, 9, 30], 6, True], [[2034, 9, 30], [2035, 3, 31], [2035, 9, 30]]], ['partial repair probe 1', [[2010, 6, 19], [2011, 11, 30], 6, False], [[2010, 11, 30], [2011, 5, 30], [2011, 11, 30]]], ['partial repair probe 2', [[2030, 11, 28], [2033, 2, 28], 3, False], [[2031, 2, 28], [2031, 5, 28], [2031, 8, 28], [2031, 11, 28], [2032, 2, 28], [2032, 5, 28], [2032, 8, 28], [2032, 11, 28], [2033, 2, 28]]], ['boundary control 1', [[2024, 3, 1], [2025, 3, 15], 6, False], [[2024, 9, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2022, 8, 18], [2024, 9, 30], 12, True], [[2022, 9, 30], [2023, 9, 30], [2024, 9, 30]]], ['normal control 2', [[2035, 6, 17], [2036, 5, 31], 6, False], [[2035, 11, 30], [2036, 5, 31]]]], [['regression end-of-month flag 1', [[2034, 3, 3], [2034, 9, 30], 3, True], [[2034, 3, 31], [2034, 6, 30], [2034, 9, 30]]], ['regression end-of-month flag 2', [[2015, 3, 25], [2016, 6, 30], 3, True], [[2015, 6, 30], [2015, 9, 30], [2015, 12, 31], [2016, 3, 31], [2016, 6, 30]]], ['partial repair probe 1', [[2035, 6, 29], [2037, 4, 30], 3, False], [[2035, 7, 30], [2035, 10, 30], [2036, 1, 30], [2036, 4, 30], [2036, 7, 30], [2036, 10, 30], [2037, 1, 30], [2037, 4, 30]]], ['partial repair probe 2', [[2014, 6, 8], [2015, 2, 28], 3, False], [[2014, 8, 28], [2014, 11, 28], [2015, 2, 28]]], ['boundary control 1', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2030, 4, 20], [2033, 5, 1], 3, True], [[2030, 8, 1], [2030, 11, 1], [2031, 2, 1], [2031, 5, 1], [2031, 8, 1], [2031, 11, 1], [2032, 2, 1], [2032, 5, 1], [2032, 8, 1], [2032, 11, 1], [2033, 2, 1], [2033, 5, 1]]], ['normal control 2', [[2009, 3, 15], [2013, 3, 1], 12, False], [[2010, 3, 1], [2011, 3, 1], [2012, 3, 1], [2013, 3, 1]]]], [['regression end-of-month flag 1', [[2028, 3, 15], [2031, 6, 30], 3, True], [[2028, 3, 31], [2028, 6, 30], [2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31], [2030, 6, 30], [2030, 9, 30], [2030, 12, 31], [2031, 3, 31], [2031, 6, 30]]], ['regression end-of-month flag 2', [[2031, 2, 15], [2031, 9, 30], 3, True], [[2031, 3, 31], [2031, 6, 30], [2031, 9, 30]]], ['partial repair probe 1', [[2009, 4, 25], [2011, 4, 30], 1, False], [[2009, 5, 30], [2009, 6, 30], [2009, 7, 30], [2009, 8, 30], [2009, 9, 30], [2009, 10, 30], [2009, 11, 30], [2009, 12, 30], [2010, 1, 30], [2010, 2, 28], [2010, 3, 30], [2010, 4, 30], [2010, 5, 30], [2010, 6, 30], [2010, 7, 30], [2010, 8, 30], [2010, 9, 30], [2010, 10, 30], [2010, 11, 30], [2010, 12, 30], [2011, 1, 30], [2011, 2, 28], [2011, 3, 30], [2011, 4, 30]]], ['partial repair probe 2', [[2002, 3, 19], [2004, 6, 30], 1, False], [[2002, 4, 30], [2002, 5, 30], [2002, 6, 30], [2002, 7, 30], [2002, 8, 30], [2002, 9, 30], [2002, 10, 30], [2002, 11, 30], [2002, 12, 30], [2003, 1, 30], [2003, 2, 28], [2003, 3, 30], [2003, 4, 30], [2003, 5, 30], [2003, 6, 30], [2003, 7, 30], [2003, 8, 30], [2003, 9, 30], [2003, 10, 30], [2003, 11, 30], [2003, 12, 30], [2004, 1, 30], [2004, 2, 29], [2004, 3, 30], [2004, 4, 30], [2004, 5, 30], [2004, 6, 30]]], ['boundary control 1', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['boundary control 2', [[2024, 3, 1], [2025, 3, 15], 6, False], [[2024, 9, 15], [2025, 3, 15]]], ['normal control 1', [[2027, 9, 10], [2030, 3, 31], 3, True], [[2027, 9, 30], [2027, 12, 31], [2028, 3, 31], [2028, 6, 30], [2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31]]], ['normal control 2', [[2019, 6, 13], [2019, 6, 30], 6, False], [[2019, 6, 30]]]], [['regression end-of-month flag 1', [[2028, 7, 26], [2031, 6, 30], 3, True], [[2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31], [2030, 6, 30], [2030, 9, 30], [2030, 12, 31], [2031, 3, 31], [2031, 6, 30]]], ['regression end-of-month flag 2', [[2037, 7, 29], [2040, 4, 30], 6, True], [[2037, 10, 31], [2038, 4, 30], [2038, 10, 31], [2039, 4, 30], [2039, 10, 31], [2040, 4, 30]]], ['partial repair probe 1', [[2005, 11, 4], [2008, 4, 30], 1, False], [[2005, 11, 30], [2005, 12, 30], [2006, 1, 30], [2006, 2, 28], [2006, 3, 30], [2006, 4, 30], [2006, 5, 30], [2006, 6, 30], [2006, 7, 30], [2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30]]], ['partial repair probe 2', [[2005, 8, 13], [2009, 2, 28], 1, False], [[2005, 8, 28], [2005, 9, 28], [2005, 10, 28], [2005, 11, 28], [2005, 12, 28], [2006, 1, 28], [2006, 2, 28], [2006, 3, 28], [2006, 4, 28], [2006, 5, 28], [2006, 6, 28], [2006, 7, 28], [2006, 8, 28], [2006, 9, 28], [2006, 10, 28], [2006, 11, 28], [2006, 12, 28], [2007, 1, 28], [2007, 2, 28], [2007, 3, 28], [2007, 4, 28], [2007, 5, 28], [2007, 6, 28], [2007, 7, 28], [2007, 8, 28], [2007, 9, 28], [2007, 10, 28], [2007, 11, 28], [2007, 12, 28], [2008, 1, 28], [2008, 2, 28], [2008, 3, 28], [2008, 4, 28], [2008, 5, 28], [2008, 6, 28], [2008, 7, 28], [2008, 8, 28], [2008, 9, 28], [2008, 10, 28], [2008, 11, 28], [2008, 12, 28], [2009, 1, 28], [2009, 2, 28]]], ['boundary control 1', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['boundary control 2', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['normal control 1', [[2027, 9, 25], [2027, 9, 30], 1, True], [[2027, 9, 30]]], ['normal control 2', [[2038, 4, 7], [2038, 4, 21], 6, False], [[2038, 4, 21]]]]]
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 end-of-month flag 1 | [[2017, 3, 30], [2017, 9, 30], [2018, 3, 30], [2018, 9, 30], [2019, 3, 30], [2019, 9, 30]] | [[2017, 3, 31], [2017, 9, 30], [2018, 3, 31], [2018, 9, 30], [2019, 3, 31], [2019, 9, 30]] | Failed |
| regression end-of-month flag 2 | [[2008, 6, 30], [2008, 9, 30], [2008, 12, 30], [2009, 3, 30], [2009, 6, 30], [2009, 9, 30], [2009, 12, 30], [2010, 3, 30], [2010, 6, 30], [2010, 9, 30], [2010, 12, 30], [2011, 3, 30], [2011, 6, 30], [2011, 9, 30]] | [[2008, 6, 30], [2008, 9, 30], [2008, 12, 31], [2009, 3, 31], [2009, 6, 30], [2009, 9, 30], [2009, 12, 31], [2010, 3, 31], [2010, 6, 30], [2010, 9, 30], [2010, 12, 31], [2011, 3, 31], [2011, 6, 30], [2011, 9, 30]] | Failed |
| partial repair probe 1 | [[2035, 12, 30], [2036, 6, 30]] | [[2035, 12, 30], [2036, 6, 30]] | Passed |
| partial repair probe 2 | [[2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30], [2008, 5, 30], [2008, 6, 30], [2008, 7, 30], [2008, 8, 30], [2008, 9, 30], [2008, 10, 30], [2008, 11, 30], [2008, 12, 30], [2009, 1, 30], [2009, 2, 28], [2009, 3, 30], [2009, 4, 30], [2009, 5, 30], [2009, 6, 30]] | [[2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30], [2008, 5, 30], [2008, 6, 30], [2008, 7, 30], [2008, 8, 30], [2008, 9, 30], [2008, 10, 30], [2008, 11, 30], [2008, 12, 30], [2009, 1, 30], [2009, 2, 28], [2009, 3, 30], [2009, 4, 30], [2009, 5, 30], [2009, 6, 30]] | Passed |
| boundary control 1 | [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]] | [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]] | Passed |
| boundary control 2 | [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]] | [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]] | Passed |
| normal control 1 | [[2004, 4, 30], [2005, 4, 30]] | [[2004, 4, 30], [2005, 4, 30]] | Passed |
| normal control 2 | [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]] | [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]] | Passed |
SHA-256 / 2cb6a8e99628590f4d7f43516cff9f7015d3b2381f2dee78055894cfce704a6b
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(issue, maturity, months, eom):
def mlen(y, m):
if m == 2:
return 29 if (y % 4 == 0 and y % 100 != 0) or y % 400 == 0 else 28
return 30 if m in (4, 6, 9, 11) else 31
def shift(y, m, k):
t = y * 12 + (m - 1) - k
return t // 12, t % 12 + 1
I = datetime.date(*issue)
my, mm, md = maturity
end_eom = md == mlen(my, mm)
out = []
k = 0
while True:
y, m = shift(my, mm, k * months)
d = mlen(y, m) if end_eom else min(md, mlen(y, m))
if datetime.date(y, m, d) <= I:
break
out.append([y, m, d])
k += 1
out.reverse()
if len(out) > 1 and (datetime.date(*out[0]) - I).days < 15:
out.pop(0)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression end-of-month flag 1', [[2016, 10, 14], [2019, 9, 30], 6, True], [[2017, 3, 31], [2017, 9, 30], [2018, 3, 31], [2018, 9, 30], [2019, 3, 31], [2019, 9, 30]]], ['regression end-of-month flag 2', [[2008, 4, 3], [2011, 9, 30], 3, True], [[2008, 6, 30], [2008, 9, 30], [2008, 12, 31], [2009, 3, 31], [2009, 6, 30], [2009, 9, 30], [2009, 12, 31], [2010, 3, 31], [2010, 6, 30], [2010, 9, 30], [2010, 12, 31], [2011, 3, 31], [2011, 6, 30], [2011, 9, 30]]], ['partial repair probe 1', [[2035, 9, 1], [2036, 6, 30], 6, False], [[2035, 12, 30], [2036, 6, 30]]], ['partial repair probe 2', [[2006, 8, 13], [2009, 6, 30], 1, False], [[2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30], [2008, 5, 30], [2008, 6, 30], [2008, 7, 30], [2008, 8, 30], [2008, 9, 30], [2008, 10, 30], [2008, 11, 30], [2008, 12, 30], [2009, 1, 30], [2009, 2, 28], [2009, 3, 30], [2009, 4, 30], [2009, 5, 30], [2009, 6, 30]]], ['boundary control 1', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2003, 5, 3], [2005, 4, 30], 12, False], [[2004, 4, 30], [2005, 4, 30]]], ['normal control 2', [[2026, 3, 1], [2028, 9, 1], 6, True], [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]]]], [['regression end-of-month flag 1', [[2027, 9, 4], [2029, 6, 30], 6, True], [[2027, 12, 31], [2028, 6, 30], [2028, 12, 31], [2029, 6, 30]]], ['regression end-of-month flag 2', [[2034, 4, 30], [2035, 9, 30], 6, True], [[2034, 9, 30], [2035, 3, 31], [2035, 9, 30]]], ['partial repair probe 1', [[2010, 6, 19], [2011, 11, 30], 6, False], [[2010, 11, 30], [2011, 5, 30], [2011, 11, 30]]], ['partial repair probe 2', [[2030, 11, 28], [2033, 2, 28], 3, False], [[2031, 2, 28], [2031, 5, 28], [2031, 8, 28], [2031, 11, 28], [2032, 2, 28], [2032, 5, 28], [2032, 8, 28], [2032, 11, 28], [2033, 2, 28]]], ['boundary control 1', [[2024, 3, 1], [2025, 3, 15], 6, False], [[2024, 9, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2022, 8, 18], [2024, 9, 30], 12, True], [[2022, 9, 30], [2023, 9, 30], [2024, 9, 30]]], ['normal control 2', [[2035, 6, 17], [2036, 5, 31], 6, False], [[2035, 11, 30], [2036, 5, 31]]]], [['regression end-of-month flag 1', [[2034, 3, 3], [2034, 9, 30], 3, True], [[2034, 3, 31], [2034, 6, 30], [2034, 9, 30]]], ['regression end-of-month flag 2', [[2015, 3, 25], [2016, 6, 30], 3, True], [[2015, 6, 30], [2015, 9, 30], [2015, 12, 31], [2016, 3, 31], [2016, 6, 30]]], ['partial repair probe 1', [[2035, 6, 29], [2037, 4, 30], 3, False], [[2035, 7, 30], [2035, 10, 30], [2036, 1, 30], [2036, 4, 30], [2036, 7, 30], [2036, 10, 30], [2037, 1, 30], [2037, 4, 30]]], ['partial repair probe 2', [[2014, 6, 8], [2015, 2, 28], 3, False], [[2014, 8, 28], [2014, 11, 28], [2015, 2, 28]]], ['boundary control 1', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2030, 4, 20], [2033, 5, 1], 3, True], [[2030, 8, 1], [2030, 11, 1], [2031, 2, 1], [2031, 5, 1], [2031, 8, 1], [2031, 11, 1], [2032, 2, 1], [2032, 5, 1], [2032, 8, 1], [2032, 11, 1], [2033, 2, 1], [2033, 5, 1]]], ['normal control 2', [[2009, 3, 15], [2013, 3, 1], 12, False], [[2010, 3, 1], [2011, 3, 1], [2012, 3, 1], [2013, 3, 1]]]], [['regression end-of-month flag 1', [[2028, 3, 15], [2031, 6, 30], 3, True], [[2028, 3, 31], [2028, 6, 30], [2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31], [2030, 6, 30], [2030, 9, 30], [2030, 12, 31], [2031, 3, 31], [2031, 6, 30]]], ['regression end-of-month flag 2', [[2031, 2, 15], [2031, 9, 30], 3, True], [[2031, 3, 31], [2031, 6, 30], [2031, 9, 30]]], ['partial repair probe 1', [[2009, 4, 25], [2011, 4, 30], 1, False], [[2009, 5, 30], [2009, 6, 30], [2009, 7, 30], [2009, 8, 30], [2009, 9, 30], [2009, 10, 30], [2009, 11, 30], [2009, 12, 30], [2010, 1, 30], [2010, 2, 28], [2010, 3, 30], [2010, 4, 30], [2010, 5, 30], [2010, 6, 30], [2010, 7, 30], [2010, 8, 30], [2010, 9, 30], [2010, 10, 30], [2010, 11, 30], [2010, 12, 30], [2011, 1, 30], [2011, 2, 28], [2011, 3, 30], [2011, 4, 30]]], ['partial repair probe 2', [[2002, 3, 19], [2004, 6, 30], 1, False], [[2002, 4, 30], [2002, 5, 30], [2002, 6, 30], [2002, 7, 30], [2002, 8, 30], [2002, 9, 30], [2002, 10, 30], [2002, 11, 30], [2002, 12, 30], [2003, 1, 30], [2003, 2, 28], [2003, 3, 30], [2003, 4, 30], [2003, 5, 30], [2003, 6, 30], [2003, 7, 30], [2003, 8, 30], [2003, 9, 30], [2003, 10, 30], [2003, 11, 30], [2003, 12, 30], [2004, 1, 30], [2004, 2, 29], [2004, 3, 30], [2004, 4, 30], [2004, 5, 30], [2004, 6, 30]]], ['boundary control 1', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['boundary control 2', [[2024, 3, 1], [2025, 3, 15], 6, False], [[2024, 9, 15], [2025, 3, 15]]], ['normal control 1', [[2027, 9, 10], [2030, 3, 31], 3, True], [[2027, 9, 30], [2027, 12, 31], [2028, 3, 31], [2028, 6, 30], [2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31]]], ['normal control 2', [[2019, 6, 13], [2019, 6, 30], 6, False], [[2019, 6, 30]]]], [['regression end-of-month flag 1', [[2028, 7, 26], [2031, 6, 30], 3, True], [[2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31], [2030, 6, 30], [2030, 9, 30], [2030, 12, 31], [2031, 3, 31], [2031, 6, 30]]], ['regression end-of-month flag 2', [[2037, 7, 29], [2040, 4, 30], 6, True], [[2037, 10, 31], [2038, 4, 30], [2038, 10, 31], [2039, 4, 30], [2039, 10, 31], [2040, 4, 30]]], ['partial repair probe 1', [[2005, 11, 4], [2008, 4, 30], 1, False], [[2005, 11, 30], [2005, 12, 30], [2006, 1, 30], [2006, 2, 28], [2006, 3, 30], [2006, 4, 30], [2006, 5, 30], [2006, 6, 30], [2006, 7, 30], [2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30]]], ['partial repair probe 2', [[2005, 8, 13], [2009, 2, 28], 1, False], [[2005, 8, 28], [2005, 9, 28], [2005, 10, 28], [2005, 11, 28], [2005, 12, 28], [2006, 1, 28], [2006, 2, 28], [2006, 3, 28], [2006, 4, 28], [2006, 5, 28], [2006, 6, 28], [2006, 7, 28], [2006, 8, 28], [2006, 9, 28], [2006, 10, 28], [2006, 11, 28], [2006, 12, 28], [2007, 1, 28], [2007, 2, 28], [2007, 3, 28], [2007, 4, 28], [2007, 5, 28], [2007, 6, 28], [2007, 7, 28], [2007, 8, 28], [2007, 9, 28], [2007, 10, 28], [2007, 11, 28], [2007, 12, 28], [2008, 1, 28], [2008, 2, 28], [2008, 3, 28], [2008, 4, 28], [2008, 5, 28], [2008, 6, 28], [2008, 7, 28], [2008, 8, 28], [2008, 9, 28], [2008, 10, 28], [2008, 11, 28], [2008, 12, 28], [2009, 1, 28], [2009, 2, 28]]], ['boundary control 1', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['boundary control 2', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['normal control 1', [[2027, 9, 25], [2027, 9, 30], 1, True], [[2027, 9, 30]]], ['normal control 2', [[2038, 4, 7], [2038, 4, 21], 6, False], [[2038, 4, 21]]]]]
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 end-of-month flag 1 | [[2017, 3, 31], [2017, 9, 30], [2018, 3, 31], [2018, 9, 30], [2019, 3, 31], [2019, 9, 30]] | [[2017, 3, 31], [2017, 9, 30], [2018, 3, 31], [2018, 9, 30], [2019, 3, 31], [2019, 9, 30]] | Passed |
| regression end-of-month flag 2 | [[2008, 6, 30], [2008, 9, 30], [2008, 12, 31], [2009, 3, 31], [2009, 6, 30], [2009, 9, 30], [2009, 12, 31], [2010, 3, 31], [2010, 6, 30], [2010, 9, 30], [2010, 12, 31], [2011, 3, 31], [2011, 6, 30], [2011, 9, 30]] | [[2008, 6, 30], [2008, 9, 30], [2008, 12, 31], [2009, 3, 31], [2009, 6, 30], [2009, 9, 30], [2009, 12, 31], [2010, 3, 31], [2010, 6, 30], [2010, 9, 30], [2010, 12, 31], [2011, 3, 31], [2011, 6, 30], [2011, 9, 30]] | Passed |
| partial repair probe 1 | [[2035, 12, 31], [2036, 6, 30]] | [[2035, 12, 30], [2036, 6, 30]] | Failed |
| partial repair probe 2 | [[2006, 8, 31], [2006, 9, 30], [2006, 10, 31], [2006, 11, 30], [2006, 12, 31], [2007, 1, 31], [2007, 2, 28], [2007, 3, 31], [2007, 4, 30], [2007, 5, 31], [2007, 6, 30], [2007, 7, 31], [2007, 8, 31], [2007, 9, 30], [2007, 10, 31], [2007, 11, 30], [2007, 12, 31], [2008, 1, 31], [2008, 2, 29], [2008, 3, 31], [2008, 4, 30], [2008, 5, 31], [2008, 6, 30], [2008, 7, 31], [2008, 8, 31], [2008, 9, 30], [2008, 10, 31], [2008, 11, 30], [2008, 12, 31], [2009, 1, 31], [2009, 2, 28], [2009, 3, 31], [2009, 4, 30], [2009, 5, 31], [2009, 6, 30]] | [[2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30], [2008, 5, 30], [2008, 6, 30], [2008, 7, 30], [2008, 8, 30], [2008, 9, 30], [2008, 10, 30], [2008, 11, 30], [2008, 12, 30], [2009, 1, 30], [2009, 2, 28], [2009, 3, 30], [2009, 4, 30], [2009, 5, 30], [2009, 6, 30]] | Failed |
| boundary control 1 | [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]] | [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]] | Passed |
| boundary control 2 | [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]] | [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]] | Passed |
| normal control 1 | [[2004, 4, 30], [2005, 4, 30]] | [[2004, 4, 30], [2005, 4, 30]] | Passed |
| normal control 2 | [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]] | [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]] | Passed |
SHA-256 / 2c8991514d6838831f5615993fc9d02fa5d6bf409fba6792da0f34b3274a5335
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(issue, maturity, months, eom):
def mlen(y, m):
if m == 2:
return 29 if (y % 4 == 0 and y % 100 != 0) or y % 400 == 0 else 28
return 30 if m in (4, 6, 9, 11) else 31
def shift(y, m, k):
t = y * 12 + (m - 1) - k
return t // 12, t % 12 + 1
I = datetime.date(*issue)
my, mm, md = maturity
end_eom = md == mlen(my, mm)
out = []
k = 0
while True:
y, m = shift(my, mm, k * months)
d = mlen(y, m) if (eom and end_eom) else min(md, mlen(y, m))
if datetime.date(y, m, d) <= I:
break
out.append([y, m, d])
k += 1
out.reverse()
if len(out) > 1 and (datetime.date(*out[0]) - I).days < 15:
out.pop(0)
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['regression end-of-month flag 1', [[2016, 10, 14], [2019, 9, 30], 6, True], [[2017, 3, 31], [2017, 9, 30], [2018, 3, 31], [2018, 9, 30], [2019, 3, 31], [2019, 9, 30]]], ['regression end-of-month flag 2', [[2008, 4, 3], [2011, 9, 30], 3, True], [[2008, 6, 30], [2008, 9, 30], [2008, 12, 31], [2009, 3, 31], [2009, 6, 30], [2009, 9, 30], [2009, 12, 31], [2010, 3, 31], [2010, 6, 30], [2010, 9, 30], [2010, 12, 31], [2011, 3, 31], [2011, 6, 30], [2011, 9, 30]]], ['partial repair probe 1', [[2035, 9, 1], [2036, 6, 30], 6, False], [[2035, 12, 30], [2036, 6, 30]]], ['partial repair probe 2', [[2006, 8, 13], [2009, 6, 30], 1, False], [[2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30], [2008, 5, 30], [2008, 6, 30], [2008, 7, 30], [2008, 8, 30], [2008, 9, 30], [2008, 10, 30], [2008, 11, 30], [2008, 12, 30], [2009, 1, 30], [2009, 2, 28], [2009, 3, 30], [2009, 4, 30], [2009, 5, 30], [2009, 6, 30]]], ['boundary control 1', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2003, 5, 3], [2005, 4, 30], 12, False], [[2004, 4, 30], [2005, 4, 30]]], ['normal control 2', [[2026, 3, 1], [2028, 9, 1], 6, True], [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]]]], [['regression end-of-month flag 1', [[2027, 9, 4], [2029, 6, 30], 6, True], [[2027, 12, 31], [2028, 6, 30], [2028, 12, 31], [2029, 6, 30]]], ['regression end-of-month flag 2', [[2034, 4, 30], [2035, 9, 30], 6, True], [[2034, 9, 30], [2035, 3, 31], [2035, 9, 30]]], ['partial repair probe 1', [[2010, 6, 19], [2011, 11, 30], 6, False], [[2010, 11, 30], [2011, 5, 30], [2011, 11, 30]]], ['partial repair probe 2', [[2030, 11, 28], [2033, 2, 28], 3, False], [[2031, 2, 28], [2031, 5, 28], [2031, 8, 28], [2031, 11, 28], [2032, 2, 28], [2032, 5, 28], [2032, 8, 28], [2032, 11, 28], [2033, 2, 28]]], ['boundary control 1', [[2024, 3, 1], [2025, 3, 15], 6, False], [[2024, 9, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2022, 8, 18], [2024, 9, 30], 12, True], [[2022, 9, 30], [2023, 9, 30], [2024, 9, 30]]], ['normal control 2', [[2035, 6, 17], [2036, 5, 31], 6, False], [[2035, 11, 30], [2036, 5, 31]]]], [['regression end-of-month flag 1', [[2034, 3, 3], [2034, 9, 30], 3, True], [[2034, 3, 31], [2034, 6, 30], [2034, 9, 30]]], ['regression end-of-month flag 2', [[2015, 3, 25], [2016, 6, 30], 3, True], [[2015, 6, 30], [2015, 9, 30], [2015, 12, 31], [2016, 3, 31], [2016, 6, 30]]], ['partial repair probe 1', [[2035, 6, 29], [2037, 4, 30], 3, False], [[2035, 7, 30], [2035, 10, 30], [2036, 1, 30], [2036, 4, 30], [2036, 7, 30], [2036, 10, 30], [2037, 1, 30], [2037, 4, 30]]], ['partial repair probe 2', [[2014, 6, 8], [2015, 2, 28], 3, False], [[2014, 8, 28], [2014, 11, 28], [2015, 2, 28]]], ['boundary control 1', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['boundary control 2', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['normal control 1', [[2030, 4, 20], [2033, 5, 1], 3, True], [[2030, 8, 1], [2030, 11, 1], [2031, 2, 1], [2031, 5, 1], [2031, 8, 1], [2031, 11, 1], [2032, 2, 1], [2032, 5, 1], [2032, 8, 1], [2032, 11, 1], [2033, 2, 1], [2033, 5, 1]]], ['normal control 2', [[2009, 3, 15], [2013, 3, 1], 12, False], [[2010, 3, 1], [2011, 3, 1], [2012, 3, 1], [2013, 3, 1]]]], [['regression end-of-month flag 1', [[2028, 3, 15], [2031, 6, 30], 3, True], [[2028, 3, 31], [2028, 6, 30], [2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31], [2030, 6, 30], [2030, 9, 30], [2030, 12, 31], [2031, 3, 31], [2031, 6, 30]]], ['regression end-of-month flag 2', [[2031, 2, 15], [2031, 9, 30], 3, True], [[2031, 3, 31], [2031, 6, 30], [2031, 9, 30]]], ['partial repair probe 1', [[2009, 4, 25], [2011, 4, 30], 1, False], [[2009, 5, 30], [2009, 6, 30], [2009, 7, 30], [2009, 8, 30], [2009, 9, 30], [2009, 10, 30], [2009, 11, 30], [2009, 12, 30], [2010, 1, 30], [2010, 2, 28], [2010, 3, 30], [2010, 4, 30], [2010, 5, 30], [2010, 6, 30], [2010, 7, 30], [2010, 8, 30], [2010, 9, 30], [2010, 10, 30], [2010, 11, 30], [2010, 12, 30], [2011, 1, 30], [2011, 2, 28], [2011, 3, 30], [2011, 4, 30]]], ['partial repair probe 2', [[2002, 3, 19], [2004, 6, 30], 1, False], [[2002, 4, 30], [2002, 5, 30], [2002, 6, 30], [2002, 7, 30], [2002, 8, 30], [2002, 9, 30], [2002, 10, 30], [2002, 11, 30], [2002, 12, 30], [2003, 1, 30], [2003, 2, 28], [2003, 3, 30], [2003, 4, 30], [2003, 5, 30], [2003, 6, 30], [2003, 7, 30], [2003, 8, 30], [2003, 9, 30], [2003, 10, 30], [2003, 11, 30], [2003, 12, 30], [2004, 1, 30], [2004, 2, 29], [2004, 3, 30], [2004, 4, 30], [2004, 5, 30], [2004, 6, 30]]], ['boundary control 1', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['boundary control 2', [[2024, 3, 1], [2025, 3, 15], 6, False], [[2024, 9, 15], [2025, 3, 15]]], ['normal control 1', [[2027, 9, 10], [2030, 3, 31], 3, True], [[2027, 9, 30], [2027, 12, 31], [2028, 3, 31], [2028, 6, 30], [2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31]]], ['normal control 2', [[2019, 6, 13], [2019, 6, 30], 6, False], [[2019, 6, 30]]]], [['regression end-of-month flag 1', [[2028, 7, 26], [2031, 6, 30], 3, True], [[2028, 9, 30], [2028, 12, 31], [2029, 3, 31], [2029, 6, 30], [2029, 9, 30], [2029, 12, 31], [2030, 3, 31], [2030, 6, 30], [2030, 9, 30], [2030, 12, 31], [2031, 3, 31], [2031, 6, 30]]], ['regression end-of-month flag 2', [[2037, 7, 29], [2040, 4, 30], 6, True], [[2037, 10, 31], [2038, 4, 30], [2038, 10, 31], [2039, 4, 30], [2039, 10, 31], [2040, 4, 30]]], ['partial repair probe 1', [[2005, 11, 4], [2008, 4, 30], 1, False], [[2005, 11, 30], [2005, 12, 30], [2006, 1, 30], [2006, 2, 28], [2006, 3, 30], [2006, 4, 30], [2006, 5, 30], [2006, 6, 30], [2006, 7, 30], [2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30]]], ['partial repair probe 2', [[2005, 8, 13], [2009, 2, 28], 1, False], [[2005, 8, 28], [2005, 9, 28], [2005, 10, 28], [2005, 11, 28], [2005, 12, 28], [2006, 1, 28], [2006, 2, 28], [2006, 3, 28], [2006, 4, 28], [2006, 5, 28], [2006, 6, 28], [2006, 7, 28], [2006, 8, 28], [2006, 9, 28], [2006, 10, 28], [2006, 11, 28], [2006, 12, 28], [2007, 1, 28], [2007, 2, 28], [2007, 3, 28], [2007, 4, 28], [2007, 5, 28], [2007, 6, 28], [2007, 7, 28], [2007, 8, 28], [2007, 9, 28], [2007, 10, 28], [2007, 11, 28], [2007, 12, 28], [2008, 1, 28], [2008, 2, 28], [2008, 3, 28], [2008, 4, 28], [2008, 5, 28], [2008, 6, 28], [2008, 7, 28], [2008, 8, 28], [2008, 9, 28], [2008, 10, 28], [2008, 11, 28], [2008, 12, 28], [2009, 1, 28], [2009, 2, 28]]], ['boundary control 1', [[2024, 1, 10], [2025, 8, 31], 6, False], [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]], ['boundary control 2', [[2024, 3, 15], [2025, 3, 15], 3, False], [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]]], ['normal control 1', [[2027, 9, 25], [2027, 9, 30], 1, True], [[2027, 9, 30]]], ['normal control 2', [[2038, 4, 7], [2038, 4, 21], 6, False], [[2038, 4, 21]]]]]
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 end-of-month flag 1 | [[2017, 3, 31], [2017, 9, 30], [2018, 3, 31], [2018, 9, 30], [2019, 3, 31], [2019, 9, 30]] | [[2017, 3, 31], [2017, 9, 30], [2018, 3, 31], [2018, 9, 30], [2019, 3, 31], [2019, 9, 30]] | Passed |
| regression end-of-month flag 2 | [[2008, 6, 30], [2008, 9, 30], [2008, 12, 31], [2009, 3, 31], [2009, 6, 30], [2009, 9, 30], [2009, 12, 31], [2010, 3, 31], [2010, 6, 30], [2010, 9, 30], [2010, 12, 31], [2011, 3, 31], [2011, 6, 30], [2011, 9, 30]] | [[2008, 6, 30], [2008, 9, 30], [2008, 12, 31], [2009, 3, 31], [2009, 6, 30], [2009, 9, 30], [2009, 12, 31], [2010, 3, 31], [2010, 6, 30], [2010, 9, 30], [2010, 12, 31], [2011, 3, 31], [2011, 6, 30], [2011, 9, 30]] | Passed |
| partial repair probe 1 | [[2035, 12, 30], [2036, 6, 30]] | [[2035, 12, 30], [2036, 6, 30]] | Passed |
| partial repair probe 2 | [[2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30], [2008, 5, 30], [2008, 6, 30], [2008, 7, 30], [2008, 8, 30], [2008, 9, 30], [2008, 10, 30], [2008, 11, 30], [2008, 12, 30], [2009, 1, 30], [2009, 2, 28], [2009, 3, 30], [2009, 4, 30], [2009, 5, 30], [2009, 6, 30]] | [[2006, 8, 30], [2006, 9, 30], [2006, 10, 30], [2006, 11, 30], [2006, 12, 30], [2007, 1, 30], [2007, 2, 28], [2007, 3, 30], [2007, 4, 30], [2007, 5, 30], [2007, 6, 30], [2007, 7, 30], [2007, 8, 30], [2007, 9, 30], [2007, 10, 30], [2007, 11, 30], [2007, 12, 30], [2008, 1, 30], [2008, 2, 29], [2008, 3, 30], [2008, 4, 30], [2008, 5, 30], [2008, 6, 30], [2008, 7, 30], [2008, 8, 30], [2008, 9, 30], [2008, 10, 30], [2008, 11, 30], [2008, 12, 30], [2009, 1, 30], [2009, 2, 28], [2009, 3, 30], [2009, 4, 30], [2009, 5, 30], [2009, 6, 30]] | Passed |
| boundary control 1 | [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]] | [[2024, 6, 15], [2024, 9, 15], [2024, 12, 15], [2025, 3, 15]] | Passed |
| boundary control 2 | [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]] | [[2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]] | Passed |
| normal control 1 | [[2004, 4, 30], [2005, 4, 30]] | [[2004, 4, 30], [2005, 4, 30]] | Passed |
| normal control 2 | [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]] | [[2026, 9, 1], [2027, 3, 1], [2027, 9, 1], [2028, 3, 1], [2028, 9, 1]] | Passed |
SHA-256 / 895316259b7788a198303107c10f655adf68443c3b9e639f7c2b57588f5989a7
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:50.633844+00:00.
Case digest / 4ef1ea56b0b64f0ee32ea003929a55f5ab35d50890c7a38f6d5026452da26b34