FAILURE MAP
← Case archive

FA-77006 / Calendar recurrence rules / Open access

Applying moved and cancelled instance overrides in a window query: window test · case 01

An instance moved out of the window is still returned, and one moved into it is missing.

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

ROOT CAUSE

The window is tested against the original date instead of the actual date.

THE FAILURE

The window is tested against the original date instead of the actual date.

Unsuccessful approach: The partial repair `ws <= o <= we or ws <= a <= we` accepts either date, so instances moved out of the window still appear.

Case contract

A daily-interval series of count instances. overrides is an ordered list of [original_date, new_date] where new_date None cancels; for repeated originals the last override wins; overrides whose original is not a series instance are ignored. Return [original, actual] pairs for instances whose actual date lies in [window_start, window_end], sorted by actual then original date.

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, interval, count, overrides, window_start, window_end):
    start = dt.date.fromisoformat(dtstart)
    ws = dt.date.fromisoformat(window_start)
    we = dt.date.fromisoformat(window_end)
    originals = [start + dt.timedelta(days=k * interval) for k in range(count)]
    origset = set(originals)
    actual = {o: o for o in originals}
    for orig, new in overrides:
        o = dt.date.fromisoformat(orig)
        if o not in origset:
            continue
        actual[o] = None if new is None else dt.date.fromisoformat(new)
    rows = [[o.isoformat(), a.isoformat()] for o, a in actual.items() if a is not None and ws <= o <= we]
    return sorted(rows, key=lambda r: (r[1], r[0]))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: moved into window',
   ['2024-01-01', 1, 10, [['2024-01-02', '2024-01-06']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'],
    ['2024-01-02', '2024-01-06'],
    ['2024-01-06', '2024-01-06'],
    ['2024-01-07', '2024-01-07']]),
  ('moved out of window',
   ['2024-01-01', 1, 10, [['2024-01-06', '2024-01-20']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07']]),
  ('orphan move',
   ['2024-01-01', 2, 5, [['2024-01-02', '2024-01-04']], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'],
    ['2024-01-03', '2024-01-03'],
    ['2024-01-05', '2024-01-05'],
    ['2024-01-07', '2024-01-07'],
    ['2024-01-09', '2024-01-09']]),
  ('orphan cancel',
   ['2024-01-01', 2, 3, [['2024-01-04', None]], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05']]),
  ('last override wins',
   ['2024-02-01',
    1,
    4,
    [['2024-02-02', '2024-02-10'], ['2024-02-02', '2024-02-03']],
    '2024-02-01',
    '2024-02-10'],
   [['2024-02-01', '2024-02-01'],
    ['2024-02-02', '2024-02-03'],
    ['2024-02-03', '2024-02-03'],
    ['2024-02-04', '2024-02-04']]),
  ('cancel then move',
   ['2024-02-01', 1, 3, [['2024-02-02', None], ['2024-02-02', '2024-02-05']], '2024-02-01', '2024-02-05'],
   [['2024-02-01', '2024-02-01'], ['2024-02-03', '2024-02-03'], ['2024-02-02', '2024-02-05']]),
  ('restated original date',
   ['2024-03-01', 7, 3, [['2024-03-08', '2024-03-08']], '2024-03-01', '2024-03-31'],
   [['2024-03-01', '2024-03-01'], ['2024-03-08', '2024-03-08'], ['2024-03-15', '2024-03-15']])],
 [('orphan move',
   ['2024-01-01', 2, 5, [['2024-01-02', '2024-01-04']], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'],
    ['2024-01-03', '2024-01-03'],
    ['2024-01-05', '2024-01-05'],
    ['2024-01-07', '2024-01-07'],
    ['2024-01-09', '2024-01-09']]),
  ('orphan cancel',
   ['2024-01-01', 2, 3, [['2024-01-04', None]], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05']]),
  ('last override wins',
   ['2024-02-01',
    1,
    4,
    [['2024-02-02', '2024-02-10'], ['2024-02-02', '2024-02-03']],
    '2024-02-01',
    '2024-02-10'],
   [['2024-02-01', '2024-02-01'],
    ['2024-02-02', '2024-02-03'],
    ['2024-02-03', '2024-02-03'],
    ['2024-02-04', '2024-02-04']]),
  ('cancel then move',
   ['2024-02-01', 1, 3, [['2024-02-02', None], ['2024-02-02', '2024-02-05']], '2024-02-01', '2024-02-05'],
   [['2024-02-01', '2024-02-01'], ['2024-02-03', '2024-02-03'], ['2024-02-02', '2024-02-05']]),
  ('restated original date',
   ['2024-03-01', 7, 3, [['2024-03-08', '2024-03-08']], '2024-03-01', '2024-03-31'],
   [['2024-03-01', '2024-03-01'], ['2024-03-08', '2024-03-08'], ['2024-03-15', '2024-03-15']]),
  ('two moved onto same day',
   ['2024-04-01',
    1,
    5,
    [['2024-04-04', '2024-04-02'], ['2024-04-05', '2024-04-02']],
    '2024-04-02',
    '2024-04-03'],
   [['2024-04-02', '2024-04-02'],
    ['2024-04-04', '2024-04-02'],
    ['2024-04-05', '2024-04-02'],
    ['2024-04-03', '2024-04-03']]),
  ('orphan after series end',
   ['2024-05-01', 1, 3, [['2024-05-10', '2024-05-02']], '2024-05-01', '2024-05-10'],
   [['2024-05-01', '2024-05-01'], ['2024-05-02', '2024-05-02'], ['2024-05-03', '2024-05-03']]),
  ('moved out of window',
   ['2024-01-01', 1, 10, [['2024-01-06', '2024-01-20']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07']])],
 [('last override wins',
   ['2024-02-01',
    1,
    4,
    [['2024-02-02', '2024-02-10'], ['2024-02-02', '2024-02-03']],
    '2024-02-01',
    '2024-02-10'],
   [['2024-02-01', '2024-02-01'],
    ['2024-02-02', '2024-02-03'],
    ['2024-02-03', '2024-02-03'],
    ['2024-02-04', '2024-02-04']]),
  ('cancel then move',
   ['2024-02-01', 1, 3, [['2024-02-02', None], ['2024-02-02', '2024-02-05']], '2024-02-01', '2024-02-05'],
   [['2024-02-01', '2024-02-01'], ['2024-02-03', '2024-02-03'], ['2024-02-02', '2024-02-05']]),
  ('restated original date',
   ['2024-03-01', 7, 3, [['2024-03-08', '2024-03-08']], '2024-03-01', '2024-03-31'],
   [['2024-03-01', '2024-03-01'], ['2024-03-08', '2024-03-08'], ['2024-03-15', '2024-03-15']]),
  ('two moved onto same day',
   ['2024-04-01',
    1,
    5,
    [['2024-04-04', '2024-04-02'], ['2024-04-05', '2024-04-02']],
    '2024-04-02',
    '2024-04-03'],
   [['2024-04-02', '2024-04-02'],
    ['2024-04-04', '2024-04-02'],
    ['2024-04-05', '2024-04-02'],
    ['2024-04-03', '2024-04-03']]),
  ('orphan after series end',
   ['2024-05-01', 1, 3, [['2024-05-10', '2024-05-02']], '2024-05-01', '2024-05-10'],
   [['2024-05-01', '2024-05-01'], ['2024-05-02', '2024-05-02'], ['2024-05-03', '2024-05-03']]),
  ('no overrides',
   ['2024-06-01', 3, 3, [], '2024-06-02', '2024-06-07'],
   [['2024-06-04', '2024-06-04'], ['2024-06-07', '2024-06-07']]),
  ('regression: moved into window',
   ['2024-01-01', 1, 10, [['2024-01-02', '2024-01-06']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'],
    ['2024-01-02', '2024-01-06'],
    ['2024-01-06', '2024-01-06'],
    ['2024-01-07', '2024-01-07']]),
  ('moved out of window',
   ['2024-01-01', 1, 10, [['2024-01-06', '2024-01-20']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07']])],
 [('restated original date',
   ['2024-03-01', 7, 3, [['2024-03-08', '2024-03-08']], '2024-03-01', '2024-03-31'],
   [['2024-03-01', '2024-03-01'], ['2024-03-08', '2024-03-08'], ['2024-03-15', '2024-03-15']]),
  ('two moved onto same day',
   ['2024-04-01',
    1,
    5,
    [['2024-04-04', '2024-04-02'], ['2024-04-05', '2024-04-02']],
    '2024-04-02',
    '2024-04-03'],
   [['2024-04-02', '2024-04-02'],
    ['2024-04-04', '2024-04-02'],
    ['2024-04-05', '2024-04-02'],
    ['2024-04-03', '2024-04-03']]),
  ('orphan after series end',
   ['2024-05-01', 1, 3, [['2024-05-10', '2024-05-02']], '2024-05-01', '2024-05-10'],
   [['2024-05-01', '2024-05-01'], ['2024-05-02', '2024-05-02'], ['2024-05-03', '2024-05-03']]),
  ('no overrides',
   ['2024-06-01', 3, 3, [], '2024-06-02', '2024-06-07'],
   [['2024-06-04', '2024-06-04'], ['2024-06-07', '2024-06-07']]),
  ('regression: moved into window',
   ['2024-01-01', 1, 10, [['2024-01-02', '2024-01-06']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'],
    ['2024-01-02', '2024-01-06'],
    ['2024-01-06', '2024-01-06'],
    ['2024-01-07', '2024-01-07']]),
  ('moved out of window',
   ['2024-01-01', 1, 10, [['2024-01-06', '2024-01-20']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07']]),
  ('orphan move',
   ['2024-01-01', 2, 5, [['2024-01-02', '2024-01-04']], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'],
    ['2024-01-03', '2024-01-03'],
    ['2024-01-05', '2024-01-05'],
    ['2024-01-07', '2024-01-07'],
    ['2024-01-09', '2024-01-09']])],
 [('orphan after series end',
   ['2024-05-01', 1, 3, [['2024-05-10', '2024-05-02']], '2024-05-01', '2024-05-10'],
   [['2024-05-01', '2024-05-01'], ['2024-05-02', '2024-05-02'], ['2024-05-03', '2024-05-03']]),
  ('no overrides',
   ['2024-06-01', 3, 3, [], '2024-06-02', '2024-06-07'],
   [['2024-06-04', '2024-06-04'], ['2024-06-07', '2024-06-07']]),
  ('regression: moved into window',
   ['2024-01-01', 1, 10, [['2024-01-02', '2024-01-06']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'],
    ['2024-01-02', '2024-01-06'],
    ['2024-01-06', '2024-01-06'],
    ['2024-01-07', '2024-01-07']]),
  ('moved out of window',
   ['2024-01-01', 1, 10, [['2024-01-06', '2024-01-20']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07']]),
  ('orphan move',
   ['2024-01-01', 2, 5, [['2024-01-02', '2024-01-04']], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'],
    ['2024-01-03', '2024-01-03'],
    ['2024-01-05', '2024-01-05'],
    ['2024-01-07', '2024-01-07'],
    ['2024-01-09', '2024-01-09']]),
  ('orphan cancel',
   ['2024-01-01', 2, 3, [['2024-01-04', None]], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05']]),
  ('last override wins',
   ['2024-02-01',
    1,
    4,
    [['2024-02-02', '2024-02-10'], ['2024-02-02', '2024-02-03']],
    '2024-02-01',
    '2024-02-10'],
   [['2024-02-01', '2024-02-01'],
    ['2024-02-02', '2024-02-03'],
    ['2024-02-03', '2024-02-03'],
    ['2024-02-04', '2024-02-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: moved into window[['2024-01-05', '2024-01-05'], ['2024-01-06', '2024-01-06'], ['2024-01-07', '2024-01-07']][['2024-01-05', '2024-01-05'], ['2024-01-02', '2024-01-06'], ['2024-01-06', '2024-01-06'], ['2024-01-07', '2024-01-07']]Failed
moved out of window[['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07'], ['2024-01-06', '2024-01-20']][['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07']]Failed
orphan move[['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07'], ['2024-01-09', '2024-01-09']][['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07'], ['2024-01-09', '2024-01-09']]Passed
orphan cancel[['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05']][['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05']]Passed
last override wins[['2024-02-01', '2024-02-01'], ['2024-02-02', '2024-02-03'], ['2024-02-03', '2024-02-03'], ['2024-02-04', '2024-02-04']][['2024-02-01', '2024-02-01'], ['2024-02-02', '2024-02-03'], ['2024-02-03', '2024-02-03'], ['2024-02-04', '2024-02-04']]Passed
cancel then move[['2024-02-01', '2024-02-01'], ['2024-02-03', '2024-02-03'], ['2024-02-02', '2024-02-05']][['2024-02-01', '2024-02-01'], ['2024-02-03', '2024-02-03'], ['2024-02-02', '2024-02-05']]Passed
restated original date[['2024-03-01', '2024-03-01'], ['2024-03-08', '2024-03-08'], ['2024-03-15', '2024-03-15']][['2024-03-01', '2024-03-01'], ['2024-03-08', '2024-03-08'], ['2024-03-15', '2024-03-15']]Passed

SHA-256 / 05ee162bf0bdcc827d987a633d42f83179c567538e3b4293c804bc92b0e9a5fc

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, interval, count, overrides, window_start, window_end):
    start = dt.date.fromisoformat(dtstart)
    ws = dt.date.fromisoformat(window_start)
    we = dt.date.fromisoformat(window_end)
    originals = [start + dt.timedelta(days=k * interval) for k in range(count)]
    origset = set(originals)
    actual = {o: o for o in originals}
    for orig, new in overrides:
        o = dt.date.fromisoformat(orig)
        if o not in origset:
            continue
        actual[o] = None if new is None else dt.date.fromisoformat(new)
    rows = [[o.isoformat(), a.isoformat()] for o, a in actual.items() if a is not None and ws <= o <= we or ws <= a <= we]
    return sorted(rows, key=lambda r: (r[1], r[0]))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: moved into window',
   ['2024-01-01', 1, 10, [['2024-01-02', '2024-01-06']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'],
    ['2024-01-02', '2024-01-06'],
    ['2024-01-06', '2024-01-06'],
    ['2024-01-07', '2024-01-07']]),
  ('moved out of window',
   ['2024-01-01', 1, 10, [['2024-01-06', '2024-01-20']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07']]),
  ('orphan move',
   ['2024-01-01', 2, 5, [['2024-01-02', '2024-01-04']], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'],
    ['2024-01-03', '2024-01-03'],
    ['2024-01-05', '2024-01-05'],
    ['2024-01-07', '2024-01-07'],
    ['2024-01-09', '2024-01-09']]),
  ('orphan cancel',
   ['2024-01-01', 2, 3, [['2024-01-04', None]], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05']]),
  ('last override wins',
   ['2024-02-01',
    1,
    4,
    [['2024-02-02', '2024-02-10'], ['2024-02-02', '2024-02-03']],
    '2024-02-01',
    '2024-02-10'],
   [['2024-02-01', '2024-02-01'],
    ['2024-02-02', '2024-02-03'],
    ['2024-02-03', '2024-02-03'],
    ['2024-02-04', '2024-02-04']]),
  ('cancel then move',
   ['2024-02-01', 1, 3, [['2024-02-02', None], ['2024-02-02', '2024-02-05']], '2024-02-01', '2024-02-05'],
   [['2024-02-01', '2024-02-01'], ['2024-02-03', '2024-02-03'], ['2024-02-02', '2024-02-05']]),
  ('restated original date',
   ['2024-03-01', 7, 3, [['2024-03-08', '2024-03-08']], '2024-03-01', '2024-03-31'],
   [['2024-03-01', '2024-03-01'], ['2024-03-08', '2024-03-08'], ['2024-03-15', '2024-03-15']])],
 [('orphan move',
   ['2024-01-01', 2, 5, [['2024-01-02', '2024-01-04']], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'],
    ['2024-01-03', '2024-01-03'],
    ['2024-01-05', '2024-01-05'],
    ['2024-01-07', '2024-01-07'],
    ['2024-01-09', '2024-01-09']]),
  ('orphan cancel',
   ['2024-01-01', 2, 3, [['2024-01-04', None]], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05']]),
  ('last override wins',
   ['2024-02-01',
    1,
    4,
    [['2024-02-02', '2024-02-10'], ['2024-02-02', '2024-02-03']],
    '2024-02-01',
    '2024-02-10'],
   [['2024-02-01', '2024-02-01'],
    ['2024-02-02', '2024-02-03'],
    ['2024-02-03', '2024-02-03'],
    ['2024-02-04', '2024-02-04']]),
  ('cancel then move',
   ['2024-02-01', 1, 3, [['2024-02-02', None], ['2024-02-02', '2024-02-05']], '2024-02-01', '2024-02-05'],
   [['2024-02-01', '2024-02-01'], ['2024-02-03', '2024-02-03'], ['2024-02-02', '2024-02-05']]),
  ('restated original date',
   ['2024-03-01', 7, 3, [['2024-03-08', '2024-03-08']], '2024-03-01', '2024-03-31'],
   [['2024-03-01', '2024-03-01'], ['2024-03-08', '2024-03-08'], ['2024-03-15', '2024-03-15']]),
  ('two moved onto same day',
   ['2024-04-01',
    1,
    5,
    [['2024-04-04', '2024-04-02'], ['2024-04-05', '2024-04-02']],
    '2024-04-02',
    '2024-04-03'],
   [['2024-04-02', '2024-04-02'],
    ['2024-04-04', '2024-04-02'],
    ['2024-04-05', '2024-04-02'],
    ['2024-04-03', '2024-04-03']]),
  ('orphan after series end',
   ['2024-05-01', 1, 3, [['2024-05-10', '2024-05-02']], '2024-05-01', '2024-05-10'],
   [['2024-05-01', '2024-05-01'], ['2024-05-02', '2024-05-02'], ['2024-05-03', '2024-05-03']]),
  ('moved out of window',
   ['2024-01-01', 1, 10, [['2024-01-06', '2024-01-20']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07']])],
 [('last override wins',
   ['2024-02-01',
    1,
    4,
    [['2024-02-02', '2024-02-10'], ['2024-02-02', '2024-02-03']],
    '2024-02-01',
    '2024-02-10'],
   [['2024-02-01', '2024-02-01'],
    ['2024-02-02', '2024-02-03'],
    ['2024-02-03', '2024-02-03'],
    ['2024-02-04', '2024-02-04']]),
  ('cancel then move',
   ['2024-02-01', 1, 3, [['2024-02-02', None], ['2024-02-02', '2024-02-05']], '2024-02-01', '2024-02-05'],
   [['2024-02-01', '2024-02-01'], ['2024-02-03', '2024-02-03'], ['2024-02-02', '2024-02-05']]),
  ('restated original date',
   ['2024-03-01', 7, 3, [['2024-03-08', '2024-03-08']], '2024-03-01', '2024-03-31'],
   [['2024-03-01', '2024-03-01'], ['2024-03-08', '2024-03-08'], ['2024-03-15', '2024-03-15']]),
  ('two moved onto same day',
   ['2024-04-01',
    1,
    5,
    [['2024-04-04', '2024-04-02'], ['2024-04-05', '2024-04-02']],
    '2024-04-02',
    '2024-04-03'],
   [['2024-04-02', '2024-04-02'],
    ['2024-04-04', '2024-04-02'],
    ['2024-04-05', '2024-04-02'],
    ['2024-04-03', '2024-04-03']]),
  ('orphan after series end',
   ['2024-05-01', 1, 3, [['2024-05-10', '2024-05-02']], '2024-05-01', '2024-05-10'],
   [['2024-05-01', '2024-05-01'], ['2024-05-02', '2024-05-02'], ['2024-05-03', '2024-05-03']]),
  ('no overrides',
   ['2024-06-01', 3, 3, [], '2024-06-02', '2024-06-07'],
   [['2024-06-04', '2024-06-04'], ['2024-06-07', '2024-06-07']]),
  ('regression: moved into window',
   ['2024-01-01', 1, 10, [['2024-01-02', '2024-01-06']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'],
    ['2024-01-02', '2024-01-06'],
    ['2024-01-06', '2024-01-06'],
    ['2024-01-07', '2024-01-07']]),
  ('moved out of window',
   ['2024-01-01', 1, 10, [['2024-01-06', '2024-01-20']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07']])],
 [('restated original date',
   ['2024-03-01', 7, 3, [['2024-03-08', '2024-03-08']], '2024-03-01', '2024-03-31'],
   [['2024-03-01', '2024-03-01'], ['2024-03-08', '2024-03-08'], ['2024-03-15', '2024-03-15']]),
  ('two moved onto same day',
   ['2024-04-01',
    1,
    5,
    [['2024-04-04', '2024-04-02'], ['2024-04-05', '2024-04-02']],
    '2024-04-02',
    '2024-04-03'],
   [['2024-04-02', '2024-04-02'],
    ['2024-04-04', '2024-04-02'],
    ['2024-04-05', '2024-04-02'],
    ['2024-04-03', '2024-04-03']]),
  ('orphan after series end',
   ['2024-05-01', 1, 3, [['2024-05-10', '2024-05-02']], '2024-05-01', '2024-05-10'],
   [['2024-05-01', '2024-05-01'], ['2024-05-02', '2024-05-02'], ['2024-05-03', '2024-05-03']]),
  ('no overrides',
   ['2024-06-01', 3, 3, [], '2024-06-02', '2024-06-07'],
   [['2024-06-04', '2024-06-04'], ['2024-06-07', '2024-06-07']]),
  ('regression: moved into window',
   ['2024-01-01', 1, 10, [['2024-01-02', '2024-01-06']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'],
    ['2024-01-02', '2024-01-06'],
    ['2024-01-06', '2024-01-06'],
    ['2024-01-07', '2024-01-07']]),
  ('moved out of window',
   ['2024-01-01', 1, 10, [['2024-01-06', '2024-01-20']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07']]),
  ('orphan move',
   ['2024-01-01', 2, 5, [['2024-01-02', '2024-01-04']], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'],
    ['2024-01-03', '2024-01-03'],
    ['2024-01-05', '2024-01-05'],
    ['2024-01-07', '2024-01-07'],
    ['2024-01-09', '2024-01-09']])],
 [('orphan after series end',
   ['2024-05-01', 1, 3, [['2024-05-10', '2024-05-02']], '2024-05-01', '2024-05-10'],
   [['2024-05-01', '2024-05-01'], ['2024-05-02', '2024-05-02'], ['2024-05-03', '2024-05-03']]),
  ('no overrides',
   ['2024-06-01', 3, 3, [], '2024-06-02', '2024-06-07'],
   [['2024-06-04', '2024-06-04'], ['2024-06-07', '2024-06-07']]),
  ('regression: moved into window',
   ['2024-01-01', 1, 10, [['2024-01-02', '2024-01-06']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'],
    ['2024-01-02', '2024-01-06'],
    ['2024-01-06', '2024-01-06'],
    ['2024-01-07', '2024-01-07']]),
  ('moved out of window',
   ['2024-01-01', 1, 10, [['2024-01-06', '2024-01-20']], '2024-01-05', '2024-01-07'],
   [['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07']]),
  ('orphan move',
   ['2024-01-01', 2, 5, [['2024-01-02', '2024-01-04']], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'],
    ['2024-01-03', '2024-01-03'],
    ['2024-01-05', '2024-01-05'],
    ['2024-01-07', '2024-01-07'],
    ['2024-01-09', '2024-01-09']]),
  ('orphan cancel',
   ['2024-01-01', 2, 3, [['2024-01-04', None]], '2024-01-01', '2024-01-09'],
   [['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05']]),
  ('last override wins',
   ['2024-02-01',
    1,
    4,
    [['2024-02-02', '2024-02-10'], ['2024-02-02', '2024-02-03']],
    '2024-02-01',
    '2024-02-10'],
   [['2024-02-01', '2024-02-01'],
    ['2024-02-02', '2024-02-03'],
    ['2024-02-03', '2024-02-03'],
    ['2024-02-04', '2024-02-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: moved into window[['2024-01-05', '2024-01-05'], ['2024-01-02', '2024-01-06'], ['2024-01-06', '2024-01-06'], ['2024-01-07', '2024-01-07']][['2024-01-05', '2024-01-05'], ['2024-01-02', '2024-01-06'], ['2024-01-06', '2024-01-06'], ['2024-01-07', '2024-01-07']]Passed
moved out of window[['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07'], ['2024-01-06', '2024-01-20']][['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07']]Failed
orphan move[['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07'], ['2024-01-09', '2024-01-09']][['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05'], ['2024-01-07', '2024-01-07'], ['2024-01-09', '2024-01-09']]Passed
orphan cancel[['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05']][['2024-01-01', '2024-01-01'], ['2024-01-03', '2024-01-03'], ['2024-01-05', '2024-01-05']]Passed
last override wins[['2024-02-01', '2024-02-01'], ['2024-02-02', '2024-02-03'], ['2024-02-03', '2024-02-03'], ['2024-02-04', '2024-02-04']][['2024-02-01', '2024-02-01'], ['2024-02-02', '2024-02-03'], ['2024-02-03', '2024-02-03'], ['2024-02-04', '2024-02-04']]Passed
cancel then move[['2024-02-01', '2024-02-01'], ['2024-02-03', '2024-02-03'], ['2024-02-02', '2024-02-05']][['2024-02-01', '2024-02-01'], ['2024-02-03', '2024-02-03'], ['2024-02-02', '2024-02-05']]Passed
restated original date[['2024-03-01', '2024-03-01'], ['2024-03-08', '2024-03-08'], ['2024-03-15', '2024-03-15']][['2024-03-01', '2024-03-01'], ['2024-03-08', '2024-03-08'], ['2024-03-15', '2024-03-15']]Passed

SHA-256 / e14738b7f9cee5096b07a320b5c167137ca5ca481d1f662922b8c024f07123b1

HELD IN THE MEMBER ARCHIVE

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

This mechanism has 7 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

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

Case digest / 2cff27aff3491fa4f34a19e898fc27adf278b820884e30fcce4436306eb7026d