FAILURE MAP
← Case archive

FA-76941 / Calendar recurrence rules / Open access

Yearly BYMONTH/BYMONTHDAY with leap-day skipping: leap rule · case 01

A February 29 series reports an instance in 2100.

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

ROOT CAUSE

The leap-year test ignores the century exception.

VERIFIED REPAIR

At the leap rule decision use `y % 4 == 0 and (y % 100 != 0 or y % 400 == 0)`, leaving the other decision sites of the model unchanged.

Unsuccessful approach: The partial repair `y % 4 == 0 and y % 100 != 0` excludes every century, including 2000 which is a leap year.

Case contract

FREQ=YEARLY on a fixed month and day. Years are dtstart.year + k*interval. A year in which the date does not exist (for example February 29 in a common year) is skipped, never clamped. Gregorian leap years: divisible by 4, except centuries not divisible by 400. Instances before dtstart are dropped and the series ends at until (inclusive). Return ISO dates.

Why this case matters

Recurring calendar series are expanded into concrete instances for display, reminders and conflict checks.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import datetime as dt
import calendar
N = 1
observations = []
def solve(dtstart, month, day, interval, until):
    start = tuple(int(x) for x in dtstart.split('-'))
    last = tuple(int(x) for x in until.split('-'))
    def is_leap(y):
        return y % 4 == 0
    out = []
    for k in range(500):
        y = start[0] + k * interval
        if y > last[0]:
            break
        dim = [31, 29 if is_leap(y) else 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1]
        dd = day
        if dd > dim:
            continue
        d = (y, month, dd)
        if d < start:
            continue
        if d > last:
            break
        out.append('%04d-%02d-%02d' % d)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: leap day across 2100',
   ['2092-02-29', 2, 29, 4, '2108-12-31'],
   ['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29']),
  ('anniversary before dtstart, interval 2',
   ['2024-06-01', 3, 15, 2, '2031-01-01'],
   ['2026-03-15', '2028-03-15', '2030-03-15']),
  ('until exactly on instance',
   ['2020-07-04', 7, 4, 1, '2023-07-04'],
   ['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']),
  ('until year partial', ['2020-01-10', 12, 25, 1, '2022-06-30'], ['2020-12-25', '2021-12-25']),
  ('leap day from common year',
   ['2023-01-01', 2, 29, 1, '2033-01-01'],
   ['2024-02-29', '2028-02-29', '2032-02-29']),
  ('same month earlier day',
   ['2024-05-20', 5, 10, 1, '2027-12-31'],
   ['2025-05-10', '2026-05-10', '2027-05-10'])],
 [('anniversary before dtstart, interval 2',
   ['2024-06-01', 3, 15, 2, '2031-01-01'],
   ['2026-03-15', '2028-03-15', '2030-03-15']),
  ('until exactly on instance',
   ['2020-07-04', 7, 4, 1, '2023-07-04'],
   ['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']),
  ('until year partial', ['2020-01-10', 12, 25, 1, '2022-06-30'], ['2020-12-25', '2021-12-25']),
  ('leap day from common year',
   ['2023-01-01', 2, 29, 1, '2033-01-01'],
   ['2024-02-29', '2028-02-29', '2032-02-29']),
  ('same month earlier day',
   ['2024-05-20', 5, 10, 1, '2027-12-31'],
   ['2025-05-10', '2026-05-10', '2027-05-10']),
  ('dtstart on anniversary',
   ['2021-11-11', 11, 11, 3, '2031-11-11'],
   ['2021-11-11', '2024-11-11', '2027-11-11', '2030-11-11']),
  ('interval 4 leap-day from 2023', ['2023-03-01', 2, 29, 4, '2040-12-31'], []),
  ('regression: leap day across 2100',
   ['2092-02-29', 2, 29, 4, '2108-12-31'],
   ['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29'])],
 [('until year partial', ['2020-01-10', 12, 25, 1, '2022-06-30'], ['2020-12-25', '2021-12-25']),
  ('leap day from common year',
   ['2023-01-01', 2, 29, 1, '2033-01-01'],
   ['2024-02-29', '2028-02-29', '2032-02-29']),
  ('same month earlier day',
   ['2024-05-20', 5, 10, 1, '2027-12-31'],
   ['2025-05-10', '2026-05-10', '2027-05-10']),
  ('dtstart on anniversary',
   ['2021-11-11', 11, 11, 3, '2031-11-11'],
   ['2021-11-11', '2024-11-11', '2027-11-11', '2030-11-11']),
  ('interval 4 leap-day from 2023', ['2023-03-01', 2, 29, 4, '2040-12-31'], []),
  ('year-end date',
   ['2019-12-31', 12, 31, 2, '2026-01-01'],
   ['2019-12-31', '2021-12-31', '2023-12-31', '2025-12-31']),
  ('century non-leap interval 1', ['2098-01-01', 2, 29, 1, '2105-01-01'], ['2104-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29'])],
 [('same month earlier day',
   ['2024-05-20', 5, 10, 1, '2027-12-31'],
   ['2025-05-10', '2026-05-10', '2027-05-10']),
  ('dtstart on anniversary',
   ['2021-11-11', 11, 11, 3, '2031-11-11'],
   ['2021-11-11', '2024-11-11', '2027-11-11', '2030-11-11']),
  ('interval 4 leap-day from 2023', ['2023-03-01', 2, 29, 4, '2040-12-31'], []),
  ('year-end date',
   ['2019-12-31', 12, 31, 2, '2026-01-01'],
   ['2019-12-31', '2021-12-31', '2023-12-31', '2025-12-31']),
  ('century non-leap interval 1', ['2098-01-01', 2, 29, 1, '2105-01-01'], ['2104-02-29']),
  ('regression: leap day across 2100',
   ['2092-02-29', 2, 29, 4, '2108-12-31'],
   ['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29'])],
 [('interval 4 leap-day from 2023', ['2023-03-01', 2, 29, 4, '2040-12-31'], []),
  ('year-end date',
   ['2019-12-31', 12, 31, 2, '2026-01-01'],
   ['2019-12-31', '2021-12-31', '2023-12-31', '2025-12-31']),
  ('century non-leap interval 1', ['2098-01-01', 2, 29, 1, '2105-01-01'], ['2104-02-29']),
  ('regression: leap day across 2100',
   ['2092-02-29', 2, 29, 4, '2108-12-31'],
   ['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29']),
  ('anniversary before dtstart, interval 2',
   ['2024-06-01', 3, 15, 2, '2031-01-01'],
   ['2026-03-15', '2028-03-15', '2030-03-15']),
  ('until exactly on instance',
   ['2020-07-04', 7, 4, 1, '2023-07-04'],
   ['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04'])]]
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: leap day across 2100['2092-02-29', '2096-02-29', '2100-02-29', '2104-02-29', '2108-02-29']['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']Failed
leap day includes 2000['1996-02-29', '2000-02-29', '2004-02-29']['1996-02-29', '2000-02-29', '2004-02-29']Passed
anniversary before dtstart, interval 2['2026-03-15', '2028-03-15', '2030-03-15']['2026-03-15', '2028-03-15', '2030-03-15']Passed
until exactly on instance['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']Passed
until year partial['2020-12-25', '2021-12-25']['2020-12-25', '2021-12-25']Passed
leap day from common year['2024-02-29', '2028-02-29', '2032-02-29']['2024-02-29', '2028-02-29', '2032-02-29']Passed
same month earlier day['2025-05-10', '2026-05-10', '2027-05-10']['2025-05-10', '2026-05-10', '2027-05-10']Passed

SHA-256 / d3a71eb554b466e36f613925fc39b0a00c30c06a682ebcc46622aa145b47182a

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import datetime as dt
import calendar
N = 1
observations = []
def solve(dtstart, month, day, interval, until):
    start = tuple(int(x) for x in dtstart.split('-'))
    last = tuple(int(x) for x in until.split('-'))
    def is_leap(y):
        return y % 4 == 0 and y % 100 != 0
    out = []
    for k in range(500):
        y = start[0] + k * interval
        if y > last[0]:
            break
        dim = [31, 29 if is_leap(y) else 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1]
        dd = day
        if dd > dim:
            continue
        d = (y, month, dd)
        if d < start:
            continue
        if d > last:
            break
        out.append('%04d-%02d-%02d' % d)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: leap day across 2100',
   ['2092-02-29', 2, 29, 4, '2108-12-31'],
   ['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29']),
  ('anniversary before dtstart, interval 2',
   ['2024-06-01', 3, 15, 2, '2031-01-01'],
   ['2026-03-15', '2028-03-15', '2030-03-15']),
  ('until exactly on instance',
   ['2020-07-04', 7, 4, 1, '2023-07-04'],
   ['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']),
  ('until year partial', ['2020-01-10', 12, 25, 1, '2022-06-30'], ['2020-12-25', '2021-12-25']),
  ('leap day from common year',
   ['2023-01-01', 2, 29, 1, '2033-01-01'],
   ['2024-02-29', '2028-02-29', '2032-02-29']),
  ('same month earlier day',
   ['2024-05-20', 5, 10, 1, '2027-12-31'],
   ['2025-05-10', '2026-05-10', '2027-05-10'])],
 [('anniversary before dtstart, interval 2',
   ['2024-06-01', 3, 15, 2, '2031-01-01'],
   ['2026-03-15', '2028-03-15', '2030-03-15']),
  ('until exactly on instance',
   ['2020-07-04', 7, 4, 1, '2023-07-04'],
   ['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']),
  ('until year partial', ['2020-01-10', 12, 25, 1, '2022-06-30'], ['2020-12-25', '2021-12-25']),
  ('leap day from common year',
   ['2023-01-01', 2, 29, 1, '2033-01-01'],
   ['2024-02-29', '2028-02-29', '2032-02-29']),
  ('same month earlier day',
   ['2024-05-20', 5, 10, 1, '2027-12-31'],
   ['2025-05-10', '2026-05-10', '2027-05-10']),
  ('dtstart on anniversary',
   ['2021-11-11', 11, 11, 3, '2031-11-11'],
   ['2021-11-11', '2024-11-11', '2027-11-11', '2030-11-11']),
  ('interval 4 leap-day from 2023', ['2023-03-01', 2, 29, 4, '2040-12-31'], []),
  ('regression: leap day across 2100',
   ['2092-02-29', 2, 29, 4, '2108-12-31'],
   ['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29'])],
 [('until year partial', ['2020-01-10', 12, 25, 1, '2022-06-30'], ['2020-12-25', '2021-12-25']),
  ('leap day from common year',
   ['2023-01-01', 2, 29, 1, '2033-01-01'],
   ['2024-02-29', '2028-02-29', '2032-02-29']),
  ('same month earlier day',
   ['2024-05-20', 5, 10, 1, '2027-12-31'],
   ['2025-05-10', '2026-05-10', '2027-05-10']),
  ('dtstart on anniversary',
   ['2021-11-11', 11, 11, 3, '2031-11-11'],
   ['2021-11-11', '2024-11-11', '2027-11-11', '2030-11-11']),
  ('interval 4 leap-day from 2023', ['2023-03-01', 2, 29, 4, '2040-12-31'], []),
  ('year-end date',
   ['2019-12-31', 12, 31, 2, '2026-01-01'],
   ['2019-12-31', '2021-12-31', '2023-12-31', '2025-12-31']),
  ('century non-leap interval 1', ['2098-01-01', 2, 29, 1, '2105-01-01'], ['2104-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29'])],
 [('same month earlier day',
   ['2024-05-20', 5, 10, 1, '2027-12-31'],
   ['2025-05-10', '2026-05-10', '2027-05-10']),
  ('dtstart on anniversary',
   ['2021-11-11', 11, 11, 3, '2031-11-11'],
   ['2021-11-11', '2024-11-11', '2027-11-11', '2030-11-11']),
  ('interval 4 leap-day from 2023', ['2023-03-01', 2, 29, 4, '2040-12-31'], []),
  ('year-end date',
   ['2019-12-31', 12, 31, 2, '2026-01-01'],
   ['2019-12-31', '2021-12-31', '2023-12-31', '2025-12-31']),
  ('century non-leap interval 1', ['2098-01-01', 2, 29, 1, '2105-01-01'], ['2104-02-29']),
  ('regression: leap day across 2100',
   ['2092-02-29', 2, 29, 4, '2108-12-31'],
   ['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29'])],
 [('interval 4 leap-day from 2023', ['2023-03-01', 2, 29, 4, '2040-12-31'], []),
  ('year-end date',
   ['2019-12-31', 12, 31, 2, '2026-01-01'],
   ['2019-12-31', '2021-12-31', '2023-12-31', '2025-12-31']),
  ('century non-leap interval 1', ['2098-01-01', 2, 29, 1, '2105-01-01'], ['2104-02-29']),
  ('regression: leap day across 2100',
   ['2092-02-29', 2, 29, 4, '2108-12-31'],
   ['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29']),
  ('anniversary before dtstart, interval 2',
   ['2024-06-01', 3, 15, 2, '2031-01-01'],
   ['2026-03-15', '2028-03-15', '2030-03-15']),
  ('until exactly on instance',
   ['2020-07-04', 7, 4, 1, '2023-07-04'],
   ['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04'])]]
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: leap day across 2100['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']Passed
leap day includes 2000['1996-02-29', '2004-02-29']['1996-02-29', '2000-02-29', '2004-02-29']Failed
anniversary before dtstart, interval 2['2026-03-15', '2028-03-15', '2030-03-15']['2026-03-15', '2028-03-15', '2030-03-15']Passed
until exactly on instance['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']Passed
until year partial['2020-12-25', '2021-12-25']['2020-12-25', '2021-12-25']Passed
leap day from common year['2024-02-29', '2028-02-29', '2032-02-29']['2024-02-29', '2028-02-29', '2032-02-29']Passed
same month earlier day['2025-05-10', '2026-05-10', '2027-05-10']['2025-05-10', '2026-05-10', '2027-05-10']Passed

SHA-256 / 92d8f59f0388ddad7d70bf76b0d141e56bbb0889a8289fba535bdff1acd7bf77

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import datetime as dt
import calendar
N = 1
observations = []
def solve(dtstart, month, day, interval, until):
    start = tuple(int(x) for x in dtstart.split('-'))
    last = tuple(int(x) for x in until.split('-'))
    def is_leap(y):
        return y % 4 == 0 and (y % 100 != 0 or y % 400 == 0)
    out = []
    for k in range(500):
        y = start[0] + k * interval
        if y > last[0]:
            break
        dim = [31, 29 if is_leap(y) else 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][month - 1]
        dd = day
        if dd > dim:
            continue
        d = (y, month, dd)
        if d < start:
            continue
        if d > last:
            break
        out.append('%04d-%02d-%02d' % d)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: leap day across 2100',
   ['2092-02-29', 2, 29, 4, '2108-12-31'],
   ['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29']),
  ('anniversary before dtstart, interval 2',
   ['2024-06-01', 3, 15, 2, '2031-01-01'],
   ['2026-03-15', '2028-03-15', '2030-03-15']),
  ('until exactly on instance',
   ['2020-07-04', 7, 4, 1, '2023-07-04'],
   ['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']),
  ('until year partial', ['2020-01-10', 12, 25, 1, '2022-06-30'], ['2020-12-25', '2021-12-25']),
  ('leap day from common year',
   ['2023-01-01', 2, 29, 1, '2033-01-01'],
   ['2024-02-29', '2028-02-29', '2032-02-29']),
  ('same month earlier day',
   ['2024-05-20', 5, 10, 1, '2027-12-31'],
   ['2025-05-10', '2026-05-10', '2027-05-10'])],
 [('anniversary before dtstart, interval 2',
   ['2024-06-01', 3, 15, 2, '2031-01-01'],
   ['2026-03-15', '2028-03-15', '2030-03-15']),
  ('until exactly on instance',
   ['2020-07-04', 7, 4, 1, '2023-07-04'],
   ['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']),
  ('until year partial', ['2020-01-10', 12, 25, 1, '2022-06-30'], ['2020-12-25', '2021-12-25']),
  ('leap day from common year',
   ['2023-01-01', 2, 29, 1, '2033-01-01'],
   ['2024-02-29', '2028-02-29', '2032-02-29']),
  ('same month earlier day',
   ['2024-05-20', 5, 10, 1, '2027-12-31'],
   ['2025-05-10', '2026-05-10', '2027-05-10']),
  ('dtstart on anniversary',
   ['2021-11-11', 11, 11, 3, '2031-11-11'],
   ['2021-11-11', '2024-11-11', '2027-11-11', '2030-11-11']),
  ('interval 4 leap-day from 2023', ['2023-03-01', 2, 29, 4, '2040-12-31'], []),
  ('regression: leap day across 2100',
   ['2092-02-29', 2, 29, 4, '2108-12-31'],
   ['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29'])],
 [('until year partial', ['2020-01-10', 12, 25, 1, '2022-06-30'], ['2020-12-25', '2021-12-25']),
  ('leap day from common year',
   ['2023-01-01', 2, 29, 1, '2033-01-01'],
   ['2024-02-29', '2028-02-29', '2032-02-29']),
  ('same month earlier day',
   ['2024-05-20', 5, 10, 1, '2027-12-31'],
   ['2025-05-10', '2026-05-10', '2027-05-10']),
  ('dtstart on anniversary',
   ['2021-11-11', 11, 11, 3, '2031-11-11'],
   ['2021-11-11', '2024-11-11', '2027-11-11', '2030-11-11']),
  ('interval 4 leap-day from 2023', ['2023-03-01', 2, 29, 4, '2040-12-31'], []),
  ('year-end date',
   ['2019-12-31', 12, 31, 2, '2026-01-01'],
   ['2019-12-31', '2021-12-31', '2023-12-31', '2025-12-31']),
  ('century non-leap interval 1', ['2098-01-01', 2, 29, 1, '2105-01-01'], ['2104-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29'])],
 [('same month earlier day',
   ['2024-05-20', 5, 10, 1, '2027-12-31'],
   ['2025-05-10', '2026-05-10', '2027-05-10']),
  ('dtstart on anniversary',
   ['2021-11-11', 11, 11, 3, '2031-11-11'],
   ['2021-11-11', '2024-11-11', '2027-11-11', '2030-11-11']),
  ('interval 4 leap-day from 2023', ['2023-03-01', 2, 29, 4, '2040-12-31'], []),
  ('year-end date',
   ['2019-12-31', 12, 31, 2, '2026-01-01'],
   ['2019-12-31', '2021-12-31', '2023-12-31', '2025-12-31']),
  ('century non-leap interval 1', ['2098-01-01', 2, 29, 1, '2105-01-01'], ['2104-02-29']),
  ('regression: leap day across 2100',
   ['2092-02-29', 2, 29, 4, '2108-12-31'],
   ['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29'])],
 [('interval 4 leap-day from 2023', ['2023-03-01', 2, 29, 4, '2040-12-31'], []),
  ('year-end date',
   ['2019-12-31', 12, 31, 2, '2026-01-01'],
   ['2019-12-31', '2021-12-31', '2023-12-31', '2025-12-31']),
  ('century non-leap interval 1', ['2098-01-01', 2, 29, 1, '2105-01-01'], ['2104-02-29']),
  ('regression: leap day across 2100',
   ['2092-02-29', 2, 29, 4, '2108-12-31'],
   ['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']),
  ('leap day includes 2000',
   ['1996-02-29', 2, 29, 1, '2004-03-01'],
   ['1996-02-29', '2000-02-29', '2004-02-29']),
  ('anniversary before dtstart, interval 2',
   ['2024-06-01', 3, 15, 2, '2031-01-01'],
   ['2026-03-15', '2028-03-15', '2030-03-15']),
  ('until exactly on instance',
   ['2020-07-04', 7, 4, 1, '2023-07-04'],
   ['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04'])]]
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: leap day across 2100['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']Passed
leap day includes 2000['1996-02-29', '2000-02-29', '2004-02-29']['1996-02-29', '2000-02-29', '2004-02-29']Passed
anniversary before dtstart, interval 2['2026-03-15', '2028-03-15', '2030-03-15']['2026-03-15', '2028-03-15', '2030-03-15']Passed
until exactly on instance['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']Passed
until year partial['2020-12-25', '2021-12-25']['2020-12-25', '2021-12-25']Passed
leap day from common year['2024-02-29', '2028-02-29', '2032-02-29']['2024-02-29', '2028-02-29', '2032-02-29']Passed
same month earlier day['2025-05-10', '2026-05-10', '2027-05-10']['2025-05-10', '2026-05-10', '2027-05-10']Passed

SHA-256 / 7a1cb20804979af7f04ed451c449747122471af0545b1505788e2793cccd735c

Verification & scope

Stipulated, bounded recurrence-expansion model evaluated offline on explicit fixtures; it is not a complete iCalendar implementation and makes no claim of standards conformance. 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:49:20.977825+00:00.

Case digest / 4cfcbb98ed68c01ba228a8250b79b78e9ff1c7f3bf78b49977053f2fa73c3d4c