FAILURE MAP
← Case archive

FA-59391 / Subscription proration billing / Open access

Month-end anchored renewal dates: leap-year month length · case 01

Renewals in February of a leap year land on the 28th instead of the 29th.

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

ROOT CAUSE

Month lengths come from a fixed table that ignores leap years.

THE FAILURE

Month lengths come from a fixed table that ignores leap years.

Unsuccessful approach: The attempt checks leap years using the anchor year rather than the renewal year.

Case contract

Input {anchor [y,m,d], n, interval months}. Renewal i (1..n) falls interval*i months after the anchor month, on the anchor day clamped to that month's length (so a 31st anchor returns to the 31st whenever possible). Return the list of [y, m, d].

Why this case matters

Month-end anchors must not drift to the 28th after February, and leap years change the clamp.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
import calendar
N = 1
observations = []
def solve(x):
    y, m, d = x['anchor']
    out = []
    for i in range(1, x['n'] + 1):
        total = (m - 1) + i * x['interval']
        ny, nm = y + total // 12, total % 12 + 1
        dim = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][nm - 1]
        out.append([ny, nm, min(d, dim)])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'anchor': [2023, 12, 31], 'n': 7, 'interval': 1}, [[2024, 1, 31], [2024, 2, 29], [2024, 3, 31], [2024, 4, 30], [2024, 5, 31], [2024, 6, 30], [2024, 7, 31]]), ('regression', {'anchor': [2019, 12, 29], 'n': 7, 'interval': 1}, [[2020, 1, 29], [2020, 2, 29], [2020, 3, 29], [2020, 4, 29], [2020, 5, 29], [2020, 6, 29], [2020, 7, 29]]), ('partial-repair probe', {'anchor': [2024, 2, 29], 'n': 6, 'interval': 2}, [[2024, 4, 29], [2024, 6, 29], [2024, 8, 29], [2024, 10, 29], [2024, 12, 29], [2025, 2, 28]]), ('partial-repair probe', {'anchor': [2024, 12, 29], 'n': 10, 'interval': 1}, [[2025, 1, 29], [2025, 2, 28], [2025, 3, 29], [2025, 4, 29], [2025, 5, 29], [2025, 6, 29], [2025, 7, 29], [2025, 8, 29], [2025, 9, 29], [2025, 10, 29]]), ('normal control', {'anchor': [2024, 7, 30], 'n': 7, 'interval': 3}, [[2024, 10, 30], [2025, 1, 30], [2025, 4, 30], [2025, 7, 30], [2025, 10, 30], [2026, 1, 30], [2026, 4, 30]]), ('normal control', {'anchor': [2025, 5, 31], 'n': 10, 'interval': 2}, [[2025, 7, 31], [2025, 9, 30], [2025, 11, 30], [2026, 1, 31], [2026, 3, 31], [2026, 5, 31], [2026, 7, 31], [2026, 9, 30], [2026, 11, 30], [2027, 1, 31]]), ('normal control', {'anchor': [2019, 5, 29], 'n': 11, 'interval': 2}, [[2019, 7, 29], [2019, 9, 29], [2019, 11, 29], [2020, 1, 29], [2020, 3, 29], [2020, 5, 29], [2020, 7, 29], [2020, 9, 29], [2020, 11, 29], [2021, 1, 29], [2021, 3, 29]]), ('normal control', {'anchor': [2023, 3, 28], 'n': 14, 'interval': 3}, [[2023, 6, 28], [2023, 9, 28], [2023, 12, 28], [2024, 3, 28], [2024, 6, 28], [2024, 9, 28], [2024, 12, 28], [2025, 3, 28], [2025, 6, 28], [2025, 9, 28], [2025, 12, 28], [2026, 3, 28], [2026, 6, 28], [2026, 9, 28]])], [('regression', {'anchor': [2019, 12, 29], 'n': 7, 'interval': 1}, [[2020, 1, 29], [2020, 2, 29], [2020, 3, 29], [2020, 4, 29], [2020, 5, 29], [2020, 6, 29], [2020, 7, 29]]), ('regression', {'anchor': [2019, 10, 29], 'n': 10, 'interval': 1}, [[2019, 11, 29], [2019, 12, 29], [2020, 1, 29], [2020, 2, 29], [2020, 3, 29], [2020, 4, 29], [2020, 5, 29], [2020, 6, 29], [2020, 7, 29], [2020, 8, 29]]), ('partial-repair probe', {'anchor': [2024, 12, 29], 'n': 10, 'interval': 1}, [[2025, 1, 29], [2025, 2, 28], [2025, 3, 29], [2025, 4, 29], [2025, 5, 29], [2025, 6, 29], [2025, 7, 29], [2025, 8, 29], [2025, 9, 29], [2025, 10, 29]]), ('partial-repair probe', {'anchor': [2024, 7, 30], 'n': 9, 'interval': 1}, [[2024, 8, 30], [2024, 9, 30], [2024, 10, 30], [2024, 11, 30], [2024, 12, 30], [2025, 1, 30], [2025, 2, 28], [2025, 3, 30], [2025, 4, 30]]), ('normal control', {'anchor': [2025, 8, 28], 'n': 1, 'interval': 1}, [[2025, 9, 28]]), ('normal control', {'anchor': [2025, 1, 29], 'n': 8, 'interval': 1}, [[2025, 2, 28], [2025, 3, 29], [2025, 4, 29], [2025, 5, 29], [2025, 6, 29], [2025, 7, 29], [2025, 8, 29], [2025, 9, 29]]), ('normal control', {'anchor': [2025, 4, 28], 'n': 8, 'interval': 12}, [[2026, 4, 28], [2027, 4, 28], [2028, 4, 28], [2029, 4, 28], [2030, 4, 28], [2031, 4, 28], [2032, 4, 28], [2033, 4, 28]]), ('normal control', {'anchor': [2025, 3, 31], 'n': 7, 'interval': 12}, [[2026, 3, 31], [2027, 3, 31], [2028, 3, 31], [2029, 3, 31], [2030, 3, 31], [2031, 3, 31], [2032, 3, 31]])], [('regression', {'anchor': [2019, 10, 29], 'n': 10, 'interval': 1}, [[2019, 11, 29], [2019, 12, 29], [2020, 1, 29], [2020, 2, 29], [2020, 3, 29], [2020, 4, 29], [2020, 5, 29], [2020, 6, 29], [2020, 7, 29], [2020, 8, 29]]), ('regression', {'anchor': [2019, 8, 31], 'n': 13, 'interval': 2}, [[2019, 10, 31], [2019, 12, 31], [2020, 2, 29], [2020, 4, 30], [2020, 6, 30], [2020, 8, 31], [2020, 10, 31], [2020, 12, 31], [2021, 2, 28], [2021, 4, 30], [2021, 6, 30], [2021, 8, 31], [2021, 10, 31]]), ('partial-repair probe', {'anchor': [2024, 7, 30], 'n': 9, 'interval': 1}, [[2024, 8, 30], [2024, 9, 30], [2024, 10, 30], [2024, 11, 30], [2024, 12, 30], [2025, 1, 30], [2025, 2, 28], [2025, 3, 30], [2025, 4, 30]]), ('partial-repair probe', {'anchor': [2019, 8, 31], 'n': 12, 'interval': 6}, [[2020, 2, 29], [2020, 8, 31], [2021, 2, 28], [2021, 8, 31], [2022, 2, 28], [2022, 8, 31], [2023, 2, 28], [2023, 8, 31], [2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]), ('normal control', {'anchor': [2025, 1, 31], 'n': 9, 'interval': 1}, [[2025, 2, 28], [2025, 3, 31], [2025, 4, 30], [2025, 5, 31], [2025, 6, 30], [2025, 7, 31], [2025, 8, 31], [2025, 9, 30], [2025, 10, 31]]), ('normal control', {'anchor': [2019, 1, 30], 'n': 2, 'interval': 1}, [[2019, 2, 28], [2019, 3, 30]]), ('normal control', {'anchor': [2025, 5, 16], 'n': 3, 'interval': 12}, [[2026, 5, 16], [2027, 5, 16], [2028, 5, 16]]), ('normal control', {'anchor': [2023, 3, 28], 'n': 12, 'interval': 1}, [[2023, 4, 28], [2023, 5, 28], [2023, 6, 28], [2023, 7, 28], [2023, 8, 28], [2023, 9, 28], [2023, 10, 28], [2023, 11, 28], [2023, 12, 28], [2024, 1, 28], [2024, 2, 28], [2024, 3, 28]])], [('regression', {'anchor': [2019, 8, 31], 'n': 13, 'interval': 2}, [[2019, 10, 31], [2019, 12, 31], [2020, 2, 29], [2020, 4, 30], [2020, 6, 30], [2020, 8, 31], [2020, 10, 31], [2020, 12, 31], [2021, 2, 28], [2021, 4, 30], [2021, 6, 30], [2021, 8, 31], [2021, 10, 31]]), ('regression', {'anchor': [2019, 8, 31], 'n': 12, 'interval': 6}, [[2020, 2, 29], [2020, 8, 31], [2021, 2, 28], [2021, 8, 31], [2022, 2, 28], [2022, 8, 31], [2023, 2, 28], [2023, 8, 31], [2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]), ('partial-repair probe', {'anchor': [2023, 5, 29], 'n': 14, 'interval': 1}, [[2023, 6, 29], [2023, 7, 29], [2023, 8, 29], [2023, 9, 29], [2023, 10, 29], [2023, 11, 29], [2023, 12, 29], [2024, 1, 29], [2024, 2, 29], [2024, 3, 29], [2024, 4, 29], [2024, 5, 29], [2024, 6, 29], [2024, 7, 29]]), ('partial-repair probe', {'anchor': [2024, 6, 30], 'n': 8, 'interval': 1}, [[2024, 7, 30], [2024, 8, 30], [2024, 9, 30], [2024, 10, 30], [2024, 11, 30], [2024, 12, 30], [2025, 1, 30], [2025, 2, 28]]), ('normal control', {'anchor': [2023, 11, 17], 'n': 7, 'interval': 1}, [[2023, 12, 17], [2024, 1, 17], [2024, 2, 17], [2024, 3, 17], [2024, 4, 17], [2024, 5, 17], [2024, 6, 17]]), ('normal control', {'anchor': [2025, 4, 28], 'n': 7, 'interval': 1}, [[2025, 5, 28], [2025, 6, 28], [2025, 7, 28], [2025, 8, 28], [2025, 9, 28], [2025, 10, 28], [2025, 11, 28]]), ('normal control', {'anchor': [2024, 5, 31], 'n': 3, 'interval': 1}, [[2024, 6, 30], [2024, 7, 31], [2024, 8, 31]]), ('normal control', {'anchor': [2019, 9, 29], 'n': 6, 'interval': 2}, [[2019, 11, 29], [2020, 1, 29], [2020, 3, 29], [2020, 5, 29], [2020, 7, 29], [2020, 9, 29]])], [('regression', {'anchor': [2019, 8, 31], 'n': 12, 'interval': 6}, [[2020, 2, 29], [2020, 8, 31], [2021, 2, 28], [2021, 8, 31], [2022, 2, 28], [2022, 8, 31], [2023, 2, 28], [2023, 8, 31], [2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]), ('regression', {'anchor': [2023, 5, 29], 'n': 14, 'interval': 1}, [[2023, 6, 29], [2023, 7, 29], [2023, 8, 29], [2023, 9, 29], [2023, 10, 29], [2023, 11, 29], [2023, 12, 29], [2024, 1, 29], [2024, 2, 29], [2024, 3, 29], [2024, 4, 29], [2024, 5, 29], [2024, 6, 29], [2024, 7, 29]]), ('partial-repair probe', {'anchor': [2024, 6, 30], 'n': 8, 'interval': 1}, [[2024, 7, 30], [2024, 8, 30], [2024, 9, 30], [2024, 10, 30], [2024, 11, 30], [2024, 12, 30], [2025, 1, 30], [2025, 2, 28]]), ('partial-repair probe', {'anchor': [2024, 2, 29], 'n': 14, 'interval': 2}, [[2024, 4, 29], [2024, 6, 29], [2024, 8, 29], [2024, 10, 29], [2024, 12, 29], [2025, 2, 28], [2025, 4, 29], [2025, 6, 29], [2025, 8, 29], [2025, 10, 29], [2025, 12, 29], [2026, 2, 28], [2026, 4, 29], [2026, 6, 29]]), ('normal control', {'anchor': [2025, 9, 30], 'n': 9, 'interval': 1}, [[2025, 10, 30], [2025, 11, 30], [2025, 12, 30], [2026, 1, 30], [2026, 2, 28], [2026, 3, 30], [2026, 4, 30], [2026, 5, 30], [2026, 6, 30]]), ('normal control', {'anchor': [2019, 7, 22], 'n': 2, 'interval': 2}, [[2019, 9, 22], [2019, 11, 22]]), ('normal control', {'anchor': [2023, 8, 28], 'n': 7, 'interval': 2}, [[2023, 10, 28], [2023, 12, 28], [2024, 2, 28], [2024, 4, 28], [2024, 6, 28], [2024, 8, 28], [2024, 10, 28]]), ('normal control', {'anchor': [2025, 10, 10], 'n': 8, 'interval': 3}, [[2026, 1, 10], [2026, 4, 10], [2026, 7, 10], [2026, 10, 10], [2027, 1, 10], [2027, 4, 10], [2027, 7, 10], [2027, 10, 10]])]]
for i, (label, args, expected) in enumerate(fixtures[N-1]):
    check("%s %d" % (label, i), 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 0[[2024, 1, 31], [2024, 2, 28], [2024, 3, 31], [2024, 4, 30], [2024, 5, 31], [2024, 6, 30], [2024, 7, 31]][[2024, 1, 31], [2024, 2, 29], [2024, 3, 31], [2024, 4, 30], [2024, 5, 31], [2024, 6, 30], [2024, 7, 31]]Failed
regression 1[[2020, 1, 29], [2020, 2, 28], [2020, 3, 29], [2020, 4, 29], [2020, 5, 29], [2020, 6, 29], [2020, 7, 29]][[2020, 1, 29], [2020, 2, 29], [2020, 3, 29], [2020, 4, 29], [2020, 5, 29], [2020, 6, 29], [2020, 7, 29]]Failed
partial-repair probe 2[[2024, 4, 29], [2024, 6, 29], [2024, 8, 29], [2024, 10, 29], [2024, 12, 29], [2025, 2, 28]][[2024, 4, 29], [2024, 6, 29], [2024, 8, 29], [2024, 10, 29], [2024, 12, 29], [2025, 2, 28]]Passed
partial-repair probe 3[[2025, 1, 29], [2025, 2, 28], [2025, 3, 29], [2025, 4, 29], [2025, 5, 29], [2025, 6, 29], [2025, 7, 29], [2025, 8, 29], [2025, 9, 29], [2025, 10, 29]][[2025, 1, 29], [2025, 2, 28], [2025, 3, 29], [2025, 4, 29], [2025, 5, 29], [2025, 6, 29], [2025, 7, 29], [2025, 8, 29], [2025, 9, 29], [2025, 10, 29]]Passed
normal control 4[[2024, 10, 30], [2025, 1, 30], [2025, 4, 30], [2025, 7, 30], [2025, 10, 30], [2026, 1, 30], [2026, 4, 30]][[2024, 10, 30], [2025, 1, 30], [2025, 4, 30], [2025, 7, 30], [2025, 10, 30], [2026, 1, 30], [2026, 4, 30]]Passed
normal control 5[[2025, 7, 31], [2025, 9, 30], [2025, 11, 30], [2026, 1, 31], [2026, 3, 31], [2026, 5, 31], [2026, 7, 31], [2026, 9, 30], [2026, 11, 30], [2027, 1, 31]][[2025, 7, 31], [2025, 9, 30], [2025, 11, 30], [2026, 1, 31], [2026, 3, 31], [2026, 5, 31], [2026, 7, 31], [2026, 9, 30], [2026, 11, 30], [2027, 1, 31]]Passed
normal control 6[[2019, 7, 29], [2019, 9, 29], [2019, 11, 29], [2020, 1, 29], [2020, 3, 29], [2020, 5, 29], [2020, 7, 29], [2020, 9, 29], [2020, 11, 29], [2021, 1, 29], [2021, 3, 29]][[2019, 7, 29], [2019, 9, 29], [2019, 11, 29], [2020, 1, 29], [2020, 3, 29], [2020, 5, 29], [2020, 7, 29], [2020, 9, 29], [2020, 11, 29], [2021, 1, 29], [2021, 3, 29]]Passed
normal control 7[[2023, 6, 28], [2023, 9, 28], [2023, 12, 28], [2024, 3, 28], [2024, 6, 28], [2024, 9, 28], [2024, 12, 28], [2025, 3, 28], [2025, 6, 28], [2025, 9, 28], [2025, 12, 28], [2026, 3, 28], [2026, 6, 28], [2026, 9, 28]][[2023, 6, 28], [2023, 9, 28], [2023, 12, 28], [2024, 3, 28], [2024, 6, 28], [2024, 9, 28], [2024, 12, 28], [2025, 3, 28], [2025, 6, 28], [2025, 9, 28], [2025, 12, 28], [2026, 3, 28], [2026, 6, 28], [2026, 9, 28]]Passed

SHA-256 / 082b02e5b5c55d5d939664534a5782b02e36b5db204701112af219561c71fc53

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import datetime
import calendar
N = 1
observations = []
def solve(x):
    y, m, d = x['anchor']
    out = []
    for i in range(1, x['n'] + 1):
        total = (m - 1) + i * x['interval']
        ny, nm = y + total // 12, total % 12 + 1
        dim = calendar.monthrange(y, nm)[1]
        out.append([ny, nm, min(d, dim)])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression', {'anchor': [2023, 12, 31], 'n': 7, 'interval': 1}, [[2024, 1, 31], [2024, 2, 29], [2024, 3, 31], [2024, 4, 30], [2024, 5, 31], [2024, 6, 30], [2024, 7, 31]]), ('regression', {'anchor': [2019, 12, 29], 'n': 7, 'interval': 1}, [[2020, 1, 29], [2020, 2, 29], [2020, 3, 29], [2020, 4, 29], [2020, 5, 29], [2020, 6, 29], [2020, 7, 29]]), ('partial-repair probe', {'anchor': [2024, 2, 29], 'n': 6, 'interval': 2}, [[2024, 4, 29], [2024, 6, 29], [2024, 8, 29], [2024, 10, 29], [2024, 12, 29], [2025, 2, 28]]), ('partial-repair probe', {'anchor': [2024, 12, 29], 'n': 10, 'interval': 1}, [[2025, 1, 29], [2025, 2, 28], [2025, 3, 29], [2025, 4, 29], [2025, 5, 29], [2025, 6, 29], [2025, 7, 29], [2025, 8, 29], [2025, 9, 29], [2025, 10, 29]]), ('normal control', {'anchor': [2024, 7, 30], 'n': 7, 'interval': 3}, [[2024, 10, 30], [2025, 1, 30], [2025, 4, 30], [2025, 7, 30], [2025, 10, 30], [2026, 1, 30], [2026, 4, 30]]), ('normal control', {'anchor': [2025, 5, 31], 'n': 10, 'interval': 2}, [[2025, 7, 31], [2025, 9, 30], [2025, 11, 30], [2026, 1, 31], [2026, 3, 31], [2026, 5, 31], [2026, 7, 31], [2026, 9, 30], [2026, 11, 30], [2027, 1, 31]]), ('normal control', {'anchor': [2019, 5, 29], 'n': 11, 'interval': 2}, [[2019, 7, 29], [2019, 9, 29], [2019, 11, 29], [2020, 1, 29], [2020, 3, 29], [2020, 5, 29], [2020, 7, 29], [2020, 9, 29], [2020, 11, 29], [2021, 1, 29], [2021, 3, 29]]), ('normal control', {'anchor': [2023, 3, 28], 'n': 14, 'interval': 3}, [[2023, 6, 28], [2023, 9, 28], [2023, 12, 28], [2024, 3, 28], [2024, 6, 28], [2024, 9, 28], [2024, 12, 28], [2025, 3, 28], [2025, 6, 28], [2025, 9, 28], [2025, 12, 28], [2026, 3, 28], [2026, 6, 28], [2026, 9, 28]])], [('regression', {'anchor': [2019, 12, 29], 'n': 7, 'interval': 1}, [[2020, 1, 29], [2020, 2, 29], [2020, 3, 29], [2020, 4, 29], [2020, 5, 29], [2020, 6, 29], [2020, 7, 29]]), ('regression', {'anchor': [2019, 10, 29], 'n': 10, 'interval': 1}, [[2019, 11, 29], [2019, 12, 29], [2020, 1, 29], [2020, 2, 29], [2020, 3, 29], [2020, 4, 29], [2020, 5, 29], [2020, 6, 29], [2020, 7, 29], [2020, 8, 29]]), ('partial-repair probe', {'anchor': [2024, 12, 29], 'n': 10, 'interval': 1}, [[2025, 1, 29], [2025, 2, 28], [2025, 3, 29], [2025, 4, 29], [2025, 5, 29], [2025, 6, 29], [2025, 7, 29], [2025, 8, 29], [2025, 9, 29], [2025, 10, 29]]), ('partial-repair probe', {'anchor': [2024, 7, 30], 'n': 9, 'interval': 1}, [[2024, 8, 30], [2024, 9, 30], [2024, 10, 30], [2024, 11, 30], [2024, 12, 30], [2025, 1, 30], [2025, 2, 28], [2025, 3, 30], [2025, 4, 30]]), ('normal control', {'anchor': [2025, 8, 28], 'n': 1, 'interval': 1}, [[2025, 9, 28]]), ('normal control', {'anchor': [2025, 1, 29], 'n': 8, 'interval': 1}, [[2025, 2, 28], [2025, 3, 29], [2025, 4, 29], [2025, 5, 29], [2025, 6, 29], [2025, 7, 29], [2025, 8, 29], [2025, 9, 29]]), ('normal control', {'anchor': [2025, 4, 28], 'n': 8, 'interval': 12}, [[2026, 4, 28], [2027, 4, 28], [2028, 4, 28], [2029, 4, 28], [2030, 4, 28], [2031, 4, 28], [2032, 4, 28], [2033, 4, 28]]), ('normal control', {'anchor': [2025, 3, 31], 'n': 7, 'interval': 12}, [[2026, 3, 31], [2027, 3, 31], [2028, 3, 31], [2029, 3, 31], [2030, 3, 31], [2031, 3, 31], [2032, 3, 31]])], [('regression', {'anchor': [2019, 10, 29], 'n': 10, 'interval': 1}, [[2019, 11, 29], [2019, 12, 29], [2020, 1, 29], [2020, 2, 29], [2020, 3, 29], [2020, 4, 29], [2020, 5, 29], [2020, 6, 29], [2020, 7, 29], [2020, 8, 29]]), ('regression', {'anchor': [2019, 8, 31], 'n': 13, 'interval': 2}, [[2019, 10, 31], [2019, 12, 31], [2020, 2, 29], [2020, 4, 30], [2020, 6, 30], [2020, 8, 31], [2020, 10, 31], [2020, 12, 31], [2021, 2, 28], [2021, 4, 30], [2021, 6, 30], [2021, 8, 31], [2021, 10, 31]]), ('partial-repair probe', {'anchor': [2024, 7, 30], 'n': 9, 'interval': 1}, [[2024, 8, 30], [2024, 9, 30], [2024, 10, 30], [2024, 11, 30], [2024, 12, 30], [2025, 1, 30], [2025, 2, 28], [2025, 3, 30], [2025, 4, 30]]), ('partial-repair probe', {'anchor': [2019, 8, 31], 'n': 12, 'interval': 6}, [[2020, 2, 29], [2020, 8, 31], [2021, 2, 28], [2021, 8, 31], [2022, 2, 28], [2022, 8, 31], [2023, 2, 28], [2023, 8, 31], [2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]), ('normal control', {'anchor': [2025, 1, 31], 'n': 9, 'interval': 1}, [[2025, 2, 28], [2025, 3, 31], [2025, 4, 30], [2025, 5, 31], [2025, 6, 30], [2025, 7, 31], [2025, 8, 31], [2025, 9, 30], [2025, 10, 31]]), ('normal control', {'anchor': [2019, 1, 30], 'n': 2, 'interval': 1}, [[2019, 2, 28], [2019, 3, 30]]), ('normal control', {'anchor': [2025, 5, 16], 'n': 3, 'interval': 12}, [[2026, 5, 16], [2027, 5, 16], [2028, 5, 16]]), ('normal control', {'anchor': [2023, 3, 28], 'n': 12, 'interval': 1}, [[2023, 4, 28], [2023, 5, 28], [2023, 6, 28], [2023, 7, 28], [2023, 8, 28], [2023, 9, 28], [2023, 10, 28], [2023, 11, 28], [2023, 12, 28], [2024, 1, 28], [2024, 2, 28], [2024, 3, 28]])], [('regression', {'anchor': [2019, 8, 31], 'n': 13, 'interval': 2}, [[2019, 10, 31], [2019, 12, 31], [2020, 2, 29], [2020, 4, 30], [2020, 6, 30], [2020, 8, 31], [2020, 10, 31], [2020, 12, 31], [2021, 2, 28], [2021, 4, 30], [2021, 6, 30], [2021, 8, 31], [2021, 10, 31]]), ('regression', {'anchor': [2019, 8, 31], 'n': 12, 'interval': 6}, [[2020, 2, 29], [2020, 8, 31], [2021, 2, 28], [2021, 8, 31], [2022, 2, 28], [2022, 8, 31], [2023, 2, 28], [2023, 8, 31], [2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]), ('partial-repair probe', {'anchor': [2023, 5, 29], 'n': 14, 'interval': 1}, [[2023, 6, 29], [2023, 7, 29], [2023, 8, 29], [2023, 9, 29], [2023, 10, 29], [2023, 11, 29], [2023, 12, 29], [2024, 1, 29], [2024, 2, 29], [2024, 3, 29], [2024, 4, 29], [2024, 5, 29], [2024, 6, 29], [2024, 7, 29]]), ('partial-repair probe', {'anchor': [2024, 6, 30], 'n': 8, 'interval': 1}, [[2024, 7, 30], [2024, 8, 30], [2024, 9, 30], [2024, 10, 30], [2024, 11, 30], [2024, 12, 30], [2025, 1, 30], [2025, 2, 28]]), ('normal control', {'anchor': [2023, 11, 17], 'n': 7, 'interval': 1}, [[2023, 12, 17], [2024, 1, 17], [2024, 2, 17], [2024, 3, 17], [2024, 4, 17], [2024, 5, 17], [2024, 6, 17]]), ('normal control', {'anchor': [2025, 4, 28], 'n': 7, 'interval': 1}, [[2025, 5, 28], [2025, 6, 28], [2025, 7, 28], [2025, 8, 28], [2025, 9, 28], [2025, 10, 28], [2025, 11, 28]]), ('normal control', {'anchor': [2024, 5, 31], 'n': 3, 'interval': 1}, [[2024, 6, 30], [2024, 7, 31], [2024, 8, 31]]), ('normal control', {'anchor': [2019, 9, 29], 'n': 6, 'interval': 2}, [[2019, 11, 29], [2020, 1, 29], [2020, 3, 29], [2020, 5, 29], [2020, 7, 29], [2020, 9, 29]])], [('regression', {'anchor': [2019, 8, 31], 'n': 12, 'interval': 6}, [[2020, 2, 29], [2020, 8, 31], [2021, 2, 28], [2021, 8, 31], [2022, 2, 28], [2022, 8, 31], [2023, 2, 28], [2023, 8, 31], [2024, 2, 29], [2024, 8, 31], [2025, 2, 28], [2025, 8, 31]]), ('regression', {'anchor': [2023, 5, 29], 'n': 14, 'interval': 1}, [[2023, 6, 29], [2023, 7, 29], [2023, 8, 29], [2023, 9, 29], [2023, 10, 29], [2023, 11, 29], [2023, 12, 29], [2024, 1, 29], [2024, 2, 29], [2024, 3, 29], [2024, 4, 29], [2024, 5, 29], [2024, 6, 29], [2024, 7, 29]]), ('partial-repair probe', {'anchor': [2024, 6, 30], 'n': 8, 'interval': 1}, [[2024, 7, 30], [2024, 8, 30], [2024, 9, 30], [2024, 10, 30], [2024, 11, 30], [2024, 12, 30], [2025, 1, 30], [2025, 2, 28]]), ('partial-repair probe', {'anchor': [2024, 2, 29], 'n': 14, 'interval': 2}, [[2024, 4, 29], [2024, 6, 29], [2024, 8, 29], [2024, 10, 29], [2024, 12, 29], [2025, 2, 28], [2025, 4, 29], [2025, 6, 29], [2025, 8, 29], [2025, 10, 29], [2025, 12, 29], [2026, 2, 28], [2026, 4, 29], [2026, 6, 29]]), ('normal control', {'anchor': [2025, 9, 30], 'n': 9, 'interval': 1}, [[2025, 10, 30], [2025, 11, 30], [2025, 12, 30], [2026, 1, 30], [2026, 2, 28], [2026, 3, 30], [2026, 4, 30], [2026, 5, 30], [2026, 6, 30]]), ('normal control', {'anchor': [2019, 7, 22], 'n': 2, 'interval': 2}, [[2019, 9, 22], [2019, 11, 22]]), ('normal control', {'anchor': [2023, 8, 28], 'n': 7, 'interval': 2}, [[2023, 10, 28], [2023, 12, 28], [2024, 2, 28], [2024, 4, 28], [2024, 6, 28], [2024, 8, 28], [2024, 10, 28]]), ('normal control', {'anchor': [2025, 10, 10], 'n': 8, 'interval': 3}, [[2026, 1, 10], [2026, 4, 10], [2026, 7, 10], [2026, 10, 10], [2027, 1, 10], [2027, 4, 10], [2027, 7, 10], [2027, 10, 10]])]]
for i, (label, args, expected) in enumerate(fixtures[N-1]):
    check("%s %d" % (label, i), 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 0[[2024, 1, 31], [2024, 2, 28], [2024, 3, 31], [2024, 4, 30], [2024, 5, 31], [2024, 6, 30], [2024, 7, 31]][[2024, 1, 31], [2024, 2, 29], [2024, 3, 31], [2024, 4, 30], [2024, 5, 31], [2024, 6, 30], [2024, 7, 31]]Failed
regression 1[[2020, 1, 29], [2020, 2, 28], [2020, 3, 29], [2020, 4, 29], [2020, 5, 29], [2020, 6, 29], [2020, 7, 29]][[2020, 1, 29], [2020, 2, 29], [2020, 3, 29], [2020, 4, 29], [2020, 5, 29], [2020, 6, 29], [2020, 7, 29]]Failed
partial-repair probe 2[[2024, 4, 29], [2024, 6, 29], [2024, 8, 29], [2024, 10, 29], [2024, 12, 29], [2025, 2, 29]][[2024, 4, 29], [2024, 6, 29], [2024, 8, 29], [2024, 10, 29], [2024, 12, 29], [2025, 2, 28]]Failed
partial-repair probe 3[[2025, 1, 29], [2025, 2, 29], [2025, 3, 29], [2025, 4, 29], [2025, 5, 29], [2025, 6, 29], [2025, 7, 29], [2025, 8, 29], [2025, 9, 29], [2025, 10, 29]][[2025, 1, 29], [2025, 2, 28], [2025, 3, 29], [2025, 4, 29], [2025, 5, 29], [2025, 6, 29], [2025, 7, 29], [2025, 8, 29], [2025, 9, 29], [2025, 10, 29]]Failed
normal control 4[[2024, 10, 30], [2025, 1, 30], [2025, 4, 30], [2025, 7, 30], [2025, 10, 30], [2026, 1, 30], [2026, 4, 30]][[2024, 10, 30], [2025, 1, 30], [2025, 4, 30], [2025, 7, 30], [2025, 10, 30], [2026, 1, 30], [2026, 4, 30]]Passed
normal control 5[[2025, 7, 31], [2025, 9, 30], [2025, 11, 30], [2026, 1, 31], [2026, 3, 31], [2026, 5, 31], [2026, 7, 31], [2026, 9, 30], [2026, 11, 30], [2027, 1, 31]][[2025, 7, 31], [2025, 9, 30], [2025, 11, 30], [2026, 1, 31], [2026, 3, 31], [2026, 5, 31], [2026, 7, 31], [2026, 9, 30], [2026, 11, 30], [2027, 1, 31]]Passed
normal control 6[[2019, 7, 29], [2019, 9, 29], [2019, 11, 29], [2020, 1, 29], [2020, 3, 29], [2020, 5, 29], [2020, 7, 29], [2020, 9, 29], [2020, 11, 29], [2021, 1, 29], [2021, 3, 29]][[2019, 7, 29], [2019, 9, 29], [2019, 11, 29], [2020, 1, 29], [2020, 3, 29], [2020, 5, 29], [2020, 7, 29], [2020, 9, 29], [2020, 11, 29], [2021, 1, 29], [2021, 3, 29]]Passed
normal control 7[[2023, 6, 28], [2023, 9, 28], [2023, 12, 28], [2024, 3, 28], [2024, 6, 28], [2024, 9, 28], [2024, 12, 28], [2025, 3, 28], [2025, 6, 28], [2025, 9, 28], [2025, 12, 28], [2026, 3, 28], [2026, 6, 28], [2026, 9, 28]][[2023, 6, 28], [2023, 9, 28], [2023, 12, 28], [2024, 3, 28], [2024, 6, 28], [2024, 9, 28], [2024, 12, 28], [2025, 3, 28], [2025, 6, 28], [2025, 9, 28], [2025, 12, 28], [2026, 3, 28], [2026, 6, 28], [2026, 9, 28]]Passed

SHA-256 / 7301290f087a87883aa88964e45eaf0e90dd473af2a834347e8c101006220aad

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

A deterministic teaching model of a stipulated billing rule. It makes no claim to reproduce any billing provider's exact behaviour and is not billing software. 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:35.865109+00:00.

Case digest / 56fe46170fadc4a5b2ae777194a6c0c5617a62fe8535b45b34e7850f2cb52cdd