FAILURE MAP
← Case archive

FA-76961 / Calendar recurrence rules / Open access

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

An instance falling exactly on UNTIL is missing.

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

ROOT CAUSE

UNTIL is treated as exclusive.

VERIFIED REPAIR

At the until inclusive decision use `d > last`, leaving the other decision sites of the model unchanged.

Unsuccessful approach: The partial repair `d[0] >= last[0]` compares years only and drops every instance in the UNTIL 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 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'], [])],
 [('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']),
  ('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'])],
 [('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']),
  ('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'])],
 [('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']['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']Failed
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 / 971274325396837da32171f5587e706d2f1437ea783f1f3c43ba204da0c8123f

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 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[0] >= last[0]:
            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'], [])],
 [('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']),
  ('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'])],
 [('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']),
  ('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'])],
 [('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']['2092-02-29', '2096-02-29', '2104-02-29', '2108-02-29']Failed
leap day includes 2000['1996-02-29', '2000-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']['2020-07-04', '2021-07-04', '2022-07-04', '2023-07-04']Failed
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']['2025-05-10', '2026-05-10', '2027-05-10']Failed

SHA-256 / 24e3444185ff1fcfeb701f4508fa74f1209324c9f8283751580831e47e703e34

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'], [])],
 [('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']),
  ('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'])],
 [('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']),
  ('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'])],
 [('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 / d52e274c8e275dc08ebe5446bdb66c2755df4c56f0ac316f87b78ca9c104cce7

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

Case digest / ea6308b4eb638e179f988c66ce26019c7b329975034cf59b646abd5e24787c39