FAILURE MAP
← Case archive

FA-77296 / Calendar recurrence rules / Open access

Re-keying instance overrides after a series start or interval change: instance check · case 01

An override for a date before the series start survives the edit as a phantom exception.

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

ROOT CAUSE

Only misaligned originals are dropped; originals before or after the series are kept.

VERIFIED REPAIR

At the instance check decision use `diff < 0 or diff % interval != 0 or diff // interval >= count`, leaving the other decision sites of the model unchanged.

Unsuccessful approach: The partial repair `diff < 0 or diff % interval != 0` still keeps overrides beyond the last occurrence.

Case contract

An all-day series (old_start, interval, count) is edited to start at new_start with new_interval. Each override [original, target] (target None = cancelled) is keyed by occurrence index i, where original = old_start + i*interval; overrides not on an old instance (before the series, misaligned or at i >= count) are dropped. The override is re-keyed to new_start + i*new_interval; moved targets are absolute and kept unchanged; an override whose target equals its new key is dropped as a no-op; the last override for a key wins. Return [[new_key, target]] sorted by new key.

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(old_start, interval, count, new_start, new_interval, overrides):
    old = dt.date.fromisoformat(old_start)
    new = dt.date.fromisoformat(new_start)
    out = {}
    for orig, target in overrides:
        o = dt.date.fromisoformat(orig)
        diff = (o - old).days
        if diff % interval != 0:
            continue
        i = diff // interval
        key = new + dt.timedelta(days=i * new_interval)
        if target == key.isoformat():
            continue
        out[key.isoformat()] = target
    return [[k, out[k]] for k in sorted(out)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: override before series start',
   ['2024-01-08', 7, 5, '2024-01-10', 7, [['2024-01-01', None], ['2024-01-15', '2024-01-20']]],
   [['2024-01-17', '2024-01-20']]),
  ('interval change',
   ['2024-01-01', 7, 6, '2024-01-01', 14, [['2024-01-15', '2024-01-16']]],
   [['2024-01-29', '2024-01-16']]),
  ('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']]),
  ('target becomes new key', ['2024-01-01', 7, 4, '2024-01-02', 7, [['2024-01-08', '2024-01-09']]], []),
  ('former no-op now moves',
   ['2024-01-01', 7, 4, '2024-01-03', 7, [['2024-01-08', '2024-01-08']]],
   [['2024-01-10', '2024-01-08']]),
  ('reverse edit order',
   ['2024-03-01', 1, 10, '2024-03-05', 1, [['2024-03-07', '2024-03-30'], ['2024-03-02', None]]],
   [['2024-03-06', None], ['2024-03-11', '2024-03-30']]),
  ('shrinking interval',
   ['2024-03-01', 14, 5, '2024-03-01', 7, [['2024-03-29', None], ['2024-03-15', '2024-03-16']]],
   [['2024-03-08', '2024-03-16'], ['2024-03-15', None]])],
 [('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']]),
  ('target becomes new key', ['2024-01-01', 7, 4, '2024-01-02', 7, [['2024-01-08', '2024-01-09']]], []),
  ('former no-op now moves',
   ['2024-01-01', 7, 4, '2024-01-03', 7, [['2024-01-08', '2024-01-08']]],
   [['2024-01-10', '2024-01-08']]),
  ('reverse edit order',
   ['2024-03-01', 1, 10, '2024-03-05', 1, [['2024-03-07', '2024-03-30'], ['2024-03-02', None]]],
   [['2024-03-06', None], ['2024-03-11', '2024-03-30']]),
  ('shrinking interval',
   ['2024-03-01', 14, 5, '2024-03-01', 7, [['2024-03-29', None], ['2024-03-15', '2024-03-16']]],
   [['2024-03-08', '2024-03-16'], ['2024-03-15', None]]),
  ('misaligned override',
   ['2024-04-01', 3, 5, '2024-04-02', 3, [['2024-04-02', None], ['2024-04-04', '2024-04-30']]],
   [['2024-04-05', '2024-04-30']]),
  ('last wins',
   ['2024-05-01', 2, 4, '2024-05-02', 2, [['2024-05-03', '2024-05-20'], ['2024-05-03', '2024-05-21']]],
   [['2024-05-04', '2024-05-21']])],
 [('former no-op now moves',
   ['2024-01-01', 7, 4, '2024-01-03', 7, [['2024-01-08', '2024-01-08']]],
   [['2024-01-10', '2024-01-08']]),
  ('reverse edit order',
   ['2024-03-01', 1, 10, '2024-03-05', 1, [['2024-03-07', '2024-03-30'], ['2024-03-02', None]]],
   [['2024-03-06', None], ['2024-03-11', '2024-03-30']]),
  ('shrinking interval',
   ['2024-03-01', 14, 5, '2024-03-01', 7, [['2024-03-29', None], ['2024-03-15', '2024-03-16']]],
   [['2024-03-08', '2024-03-16'], ['2024-03-15', None]]),
  ('misaligned override',
   ['2024-04-01', 3, 5, '2024-04-02', 3, [['2024-04-02', None], ['2024-04-04', '2024-04-30']]],
   [['2024-04-05', '2024-04-30']]),
  ('last wins',
   ['2024-05-01', 2, 4, '2024-05-02', 2, [['2024-05-03', '2024-05-20'], ['2024-05-03', '2024-05-21']]],
   [['2024-05-04', '2024-05-21']]),
  ('moved forward past neighbour',
   ['2024-06-01',
    1,
    5,
    '2024-06-11',
    1,
    [['2024-06-01', '2024-06-30'], ['2024-06-03', None], ['2024-06-04', '2024-06-12']]],
   [['2024-06-11', '2024-06-30'], ['2024-06-13', None], ['2024-06-14', '2024-06-12']]),
  ('earlier-moved target',
   ['2024-07-10', 7, 3, '2024-07-12', 7, [['2024-07-17', '2024-07-01']]],
   [['2024-07-19', '2024-07-01']]),
  ('regression: override before series start',
   ['2024-01-08', 7, 5, '2024-01-10', 7, [['2024-01-01', None], ['2024-01-15', '2024-01-20']]],
   [['2024-01-17', '2024-01-20']]),
  ('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']])],
 [('shrinking interval',
   ['2024-03-01', 14, 5, '2024-03-01', 7, [['2024-03-29', None], ['2024-03-15', '2024-03-16']]],
   [['2024-03-08', '2024-03-16'], ['2024-03-15', None]]),
  ('misaligned override',
   ['2024-04-01', 3, 5, '2024-04-02', 3, [['2024-04-02', None], ['2024-04-04', '2024-04-30']]],
   [['2024-04-05', '2024-04-30']]),
  ('last wins',
   ['2024-05-01', 2, 4, '2024-05-02', 2, [['2024-05-03', '2024-05-20'], ['2024-05-03', '2024-05-21']]],
   [['2024-05-04', '2024-05-21']]),
  ('moved forward past neighbour',
   ['2024-06-01',
    1,
    5,
    '2024-06-11',
    1,
    [['2024-06-01', '2024-06-30'], ['2024-06-03', None], ['2024-06-04', '2024-06-12']]],
   [['2024-06-11', '2024-06-30'], ['2024-06-13', None], ['2024-06-14', '2024-06-12']]),
  ('earlier-moved target',
   ['2024-07-10', 7, 3, '2024-07-12', 7, [['2024-07-17', '2024-07-01']]],
   [['2024-07-19', '2024-07-01']]),
  ('regression: override before series start',
   ['2024-01-08', 7, 5, '2024-01-10', 7, [['2024-01-01', None], ['2024-01-15', '2024-01-20']]],
   [['2024-01-17', '2024-01-20']]),
  ('interval change',
   ['2024-01-01', 7, 6, '2024-01-01', 14, [['2024-01-15', '2024-01-16']]],
   [['2024-01-29', '2024-01-16']]),
  ('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']])],
 [('last wins',
   ['2024-05-01', 2, 4, '2024-05-02', 2, [['2024-05-03', '2024-05-20'], ['2024-05-03', '2024-05-21']]],
   [['2024-05-04', '2024-05-21']]),
  ('moved forward past neighbour',
   ['2024-06-01',
    1,
    5,
    '2024-06-11',
    1,
    [['2024-06-01', '2024-06-30'], ['2024-06-03', None], ['2024-06-04', '2024-06-12']]],
   [['2024-06-11', '2024-06-30'], ['2024-06-13', None], ['2024-06-14', '2024-06-12']]),
  ('earlier-moved target',
   ['2024-07-10', 7, 3, '2024-07-12', 7, [['2024-07-17', '2024-07-01']]],
   [['2024-07-19', '2024-07-01']]),
  ('regression: override before series start',
   ['2024-01-08', 7, 5, '2024-01-10', 7, [['2024-01-01', None], ['2024-01-15', '2024-01-20']]],
   [['2024-01-17', '2024-01-20']]),
  ('interval change',
   ['2024-01-01', 7, 6, '2024-01-01', 14, [['2024-01-15', '2024-01-16']]],
   [['2024-01-29', '2024-01-16']]),
  ('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']]),
  ('target becomes new key', ['2024-01-01', 7, 4, '2024-01-02', 7, [['2024-01-08', '2024-01-09']]], [])]]
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: override before series start[['2024-01-03', None], ['2024-01-17', '2024-01-20']][['2024-01-17', '2024-01-20']]Failed
interval change[['2024-01-29', '2024-01-16']][['2024-01-29', '2024-01-16']]Passed
beyond count[['2024-01-03', '2024-01-10'], ['2024-01-06', None]][['2024-01-03', '2024-01-10']]Failed
target becomes new key[][]Passed
former no-op now moves[['2024-01-10', '2024-01-08']][['2024-01-10', '2024-01-08']]Passed
reverse edit order[['2024-03-06', None], ['2024-03-11', '2024-03-30']][['2024-03-06', None], ['2024-03-11', '2024-03-30']]Passed
shrinking interval[['2024-03-08', '2024-03-16'], ['2024-03-15', None]][['2024-03-08', '2024-03-16'], ['2024-03-15', None]]Passed

SHA-256 / 6ae1a4fb08c2c98bf99550f26c1911d586767dd481e91773fcd7a90922696603

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(old_start, interval, count, new_start, new_interval, overrides):
    old = dt.date.fromisoformat(old_start)
    new = dt.date.fromisoformat(new_start)
    out = {}
    for orig, target in overrides:
        o = dt.date.fromisoformat(orig)
        diff = (o - old).days
        if diff < 0 or diff % interval != 0:
            continue
        i = diff // interval
        key = new + dt.timedelta(days=i * new_interval)
        if target == key.isoformat():
            continue
        out[key.isoformat()] = target
    return [[k, out[k]] for k in sorted(out)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: override before series start',
   ['2024-01-08', 7, 5, '2024-01-10', 7, [['2024-01-01', None], ['2024-01-15', '2024-01-20']]],
   [['2024-01-17', '2024-01-20']]),
  ('interval change',
   ['2024-01-01', 7, 6, '2024-01-01', 14, [['2024-01-15', '2024-01-16']]],
   [['2024-01-29', '2024-01-16']]),
  ('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']]),
  ('target becomes new key', ['2024-01-01', 7, 4, '2024-01-02', 7, [['2024-01-08', '2024-01-09']]], []),
  ('former no-op now moves',
   ['2024-01-01', 7, 4, '2024-01-03', 7, [['2024-01-08', '2024-01-08']]],
   [['2024-01-10', '2024-01-08']]),
  ('reverse edit order',
   ['2024-03-01', 1, 10, '2024-03-05', 1, [['2024-03-07', '2024-03-30'], ['2024-03-02', None]]],
   [['2024-03-06', None], ['2024-03-11', '2024-03-30']]),
  ('shrinking interval',
   ['2024-03-01', 14, 5, '2024-03-01', 7, [['2024-03-29', None], ['2024-03-15', '2024-03-16']]],
   [['2024-03-08', '2024-03-16'], ['2024-03-15', None]])],
 [('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']]),
  ('target becomes new key', ['2024-01-01', 7, 4, '2024-01-02', 7, [['2024-01-08', '2024-01-09']]], []),
  ('former no-op now moves',
   ['2024-01-01', 7, 4, '2024-01-03', 7, [['2024-01-08', '2024-01-08']]],
   [['2024-01-10', '2024-01-08']]),
  ('reverse edit order',
   ['2024-03-01', 1, 10, '2024-03-05', 1, [['2024-03-07', '2024-03-30'], ['2024-03-02', None]]],
   [['2024-03-06', None], ['2024-03-11', '2024-03-30']]),
  ('shrinking interval',
   ['2024-03-01', 14, 5, '2024-03-01', 7, [['2024-03-29', None], ['2024-03-15', '2024-03-16']]],
   [['2024-03-08', '2024-03-16'], ['2024-03-15', None]]),
  ('misaligned override',
   ['2024-04-01', 3, 5, '2024-04-02', 3, [['2024-04-02', None], ['2024-04-04', '2024-04-30']]],
   [['2024-04-05', '2024-04-30']]),
  ('last wins',
   ['2024-05-01', 2, 4, '2024-05-02', 2, [['2024-05-03', '2024-05-20'], ['2024-05-03', '2024-05-21']]],
   [['2024-05-04', '2024-05-21']])],
 [('former no-op now moves',
   ['2024-01-01', 7, 4, '2024-01-03', 7, [['2024-01-08', '2024-01-08']]],
   [['2024-01-10', '2024-01-08']]),
  ('reverse edit order',
   ['2024-03-01', 1, 10, '2024-03-05', 1, [['2024-03-07', '2024-03-30'], ['2024-03-02', None]]],
   [['2024-03-06', None], ['2024-03-11', '2024-03-30']]),
  ('shrinking interval',
   ['2024-03-01', 14, 5, '2024-03-01', 7, [['2024-03-29', None], ['2024-03-15', '2024-03-16']]],
   [['2024-03-08', '2024-03-16'], ['2024-03-15', None]]),
  ('misaligned override',
   ['2024-04-01', 3, 5, '2024-04-02', 3, [['2024-04-02', None], ['2024-04-04', '2024-04-30']]],
   [['2024-04-05', '2024-04-30']]),
  ('last wins',
   ['2024-05-01', 2, 4, '2024-05-02', 2, [['2024-05-03', '2024-05-20'], ['2024-05-03', '2024-05-21']]],
   [['2024-05-04', '2024-05-21']]),
  ('moved forward past neighbour',
   ['2024-06-01',
    1,
    5,
    '2024-06-11',
    1,
    [['2024-06-01', '2024-06-30'], ['2024-06-03', None], ['2024-06-04', '2024-06-12']]],
   [['2024-06-11', '2024-06-30'], ['2024-06-13', None], ['2024-06-14', '2024-06-12']]),
  ('earlier-moved target',
   ['2024-07-10', 7, 3, '2024-07-12', 7, [['2024-07-17', '2024-07-01']]],
   [['2024-07-19', '2024-07-01']]),
  ('regression: override before series start',
   ['2024-01-08', 7, 5, '2024-01-10', 7, [['2024-01-01', None], ['2024-01-15', '2024-01-20']]],
   [['2024-01-17', '2024-01-20']]),
  ('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']])],
 [('shrinking interval',
   ['2024-03-01', 14, 5, '2024-03-01', 7, [['2024-03-29', None], ['2024-03-15', '2024-03-16']]],
   [['2024-03-08', '2024-03-16'], ['2024-03-15', None]]),
  ('misaligned override',
   ['2024-04-01', 3, 5, '2024-04-02', 3, [['2024-04-02', None], ['2024-04-04', '2024-04-30']]],
   [['2024-04-05', '2024-04-30']]),
  ('last wins',
   ['2024-05-01', 2, 4, '2024-05-02', 2, [['2024-05-03', '2024-05-20'], ['2024-05-03', '2024-05-21']]],
   [['2024-05-04', '2024-05-21']]),
  ('moved forward past neighbour',
   ['2024-06-01',
    1,
    5,
    '2024-06-11',
    1,
    [['2024-06-01', '2024-06-30'], ['2024-06-03', None], ['2024-06-04', '2024-06-12']]],
   [['2024-06-11', '2024-06-30'], ['2024-06-13', None], ['2024-06-14', '2024-06-12']]),
  ('earlier-moved target',
   ['2024-07-10', 7, 3, '2024-07-12', 7, [['2024-07-17', '2024-07-01']]],
   [['2024-07-19', '2024-07-01']]),
  ('regression: override before series start',
   ['2024-01-08', 7, 5, '2024-01-10', 7, [['2024-01-01', None], ['2024-01-15', '2024-01-20']]],
   [['2024-01-17', '2024-01-20']]),
  ('interval change',
   ['2024-01-01', 7, 6, '2024-01-01', 14, [['2024-01-15', '2024-01-16']]],
   [['2024-01-29', '2024-01-16']]),
  ('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']])],
 [('last wins',
   ['2024-05-01', 2, 4, '2024-05-02', 2, [['2024-05-03', '2024-05-20'], ['2024-05-03', '2024-05-21']]],
   [['2024-05-04', '2024-05-21']]),
  ('moved forward past neighbour',
   ['2024-06-01',
    1,
    5,
    '2024-06-11',
    1,
    [['2024-06-01', '2024-06-30'], ['2024-06-03', None], ['2024-06-04', '2024-06-12']]],
   [['2024-06-11', '2024-06-30'], ['2024-06-13', None], ['2024-06-14', '2024-06-12']]),
  ('earlier-moved target',
   ['2024-07-10', 7, 3, '2024-07-12', 7, [['2024-07-17', '2024-07-01']]],
   [['2024-07-19', '2024-07-01']]),
  ('regression: override before series start',
   ['2024-01-08', 7, 5, '2024-01-10', 7, [['2024-01-01', None], ['2024-01-15', '2024-01-20']]],
   [['2024-01-17', '2024-01-20']]),
  ('interval change',
   ['2024-01-01', 7, 6, '2024-01-01', 14, [['2024-01-15', '2024-01-16']]],
   [['2024-01-29', '2024-01-16']]),
  ('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']]),
  ('target becomes new key', ['2024-01-01', 7, 4, '2024-01-02', 7, [['2024-01-08', '2024-01-09']]], [])]]
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: override before series start[['2024-01-17', '2024-01-20']][['2024-01-17', '2024-01-20']]Passed
interval change[['2024-01-29', '2024-01-16']][['2024-01-29', '2024-01-16']]Passed
beyond count[['2024-01-03', '2024-01-10'], ['2024-01-06', None]][['2024-01-03', '2024-01-10']]Failed
target becomes new key[][]Passed
former no-op now moves[['2024-01-10', '2024-01-08']][['2024-01-10', '2024-01-08']]Passed
reverse edit order[['2024-03-06', None], ['2024-03-11', '2024-03-30']][['2024-03-06', None], ['2024-03-11', '2024-03-30']]Passed
shrinking interval[['2024-03-08', '2024-03-16'], ['2024-03-15', None]][['2024-03-08', '2024-03-16'], ['2024-03-15', None]]Passed

SHA-256 / 3fc65853d7e36825db3769f071e1f77608beea5fae47637bf0f706e16745fb5d

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(old_start, interval, count, new_start, new_interval, overrides):
    old = dt.date.fromisoformat(old_start)
    new = dt.date.fromisoformat(new_start)
    out = {}
    for orig, target in overrides:
        o = dt.date.fromisoformat(orig)
        diff = (o - old).days
        if diff < 0 or diff % interval != 0 or diff // interval >= count:
            continue
        i = diff // interval
        key = new + dt.timedelta(days=i * new_interval)
        if target == key.isoformat():
            continue
        out[key.isoformat()] = target
    return [[k, out[k]] for k in sorted(out)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: override before series start',
   ['2024-01-08', 7, 5, '2024-01-10', 7, [['2024-01-01', None], ['2024-01-15', '2024-01-20']]],
   [['2024-01-17', '2024-01-20']]),
  ('interval change',
   ['2024-01-01', 7, 6, '2024-01-01', 14, [['2024-01-15', '2024-01-16']]],
   [['2024-01-29', '2024-01-16']]),
  ('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']]),
  ('target becomes new key', ['2024-01-01', 7, 4, '2024-01-02', 7, [['2024-01-08', '2024-01-09']]], []),
  ('former no-op now moves',
   ['2024-01-01', 7, 4, '2024-01-03', 7, [['2024-01-08', '2024-01-08']]],
   [['2024-01-10', '2024-01-08']]),
  ('reverse edit order',
   ['2024-03-01', 1, 10, '2024-03-05', 1, [['2024-03-07', '2024-03-30'], ['2024-03-02', None]]],
   [['2024-03-06', None], ['2024-03-11', '2024-03-30']]),
  ('shrinking interval',
   ['2024-03-01', 14, 5, '2024-03-01', 7, [['2024-03-29', None], ['2024-03-15', '2024-03-16']]],
   [['2024-03-08', '2024-03-16'], ['2024-03-15', None]])],
 [('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']]),
  ('target becomes new key', ['2024-01-01', 7, 4, '2024-01-02', 7, [['2024-01-08', '2024-01-09']]], []),
  ('former no-op now moves',
   ['2024-01-01', 7, 4, '2024-01-03', 7, [['2024-01-08', '2024-01-08']]],
   [['2024-01-10', '2024-01-08']]),
  ('reverse edit order',
   ['2024-03-01', 1, 10, '2024-03-05', 1, [['2024-03-07', '2024-03-30'], ['2024-03-02', None]]],
   [['2024-03-06', None], ['2024-03-11', '2024-03-30']]),
  ('shrinking interval',
   ['2024-03-01', 14, 5, '2024-03-01', 7, [['2024-03-29', None], ['2024-03-15', '2024-03-16']]],
   [['2024-03-08', '2024-03-16'], ['2024-03-15', None]]),
  ('misaligned override',
   ['2024-04-01', 3, 5, '2024-04-02', 3, [['2024-04-02', None], ['2024-04-04', '2024-04-30']]],
   [['2024-04-05', '2024-04-30']]),
  ('last wins',
   ['2024-05-01', 2, 4, '2024-05-02', 2, [['2024-05-03', '2024-05-20'], ['2024-05-03', '2024-05-21']]],
   [['2024-05-04', '2024-05-21']])],
 [('former no-op now moves',
   ['2024-01-01', 7, 4, '2024-01-03', 7, [['2024-01-08', '2024-01-08']]],
   [['2024-01-10', '2024-01-08']]),
  ('reverse edit order',
   ['2024-03-01', 1, 10, '2024-03-05', 1, [['2024-03-07', '2024-03-30'], ['2024-03-02', None]]],
   [['2024-03-06', None], ['2024-03-11', '2024-03-30']]),
  ('shrinking interval',
   ['2024-03-01', 14, 5, '2024-03-01', 7, [['2024-03-29', None], ['2024-03-15', '2024-03-16']]],
   [['2024-03-08', '2024-03-16'], ['2024-03-15', None]]),
  ('misaligned override',
   ['2024-04-01', 3, 5, '2024-04-02', 3, [['2024-04-02', None], ['2024-04-04', '2024-04-30']]],
   [['2024-04-05', '2024-04-30']]),
  ('last wins',
   ['2024-05-01', 2, 4, '2024-05-02', 2, [['2024-05-03', '2024-05-20'], ['2024-05-03', '2024-05-21']]],
   [['2024-05-04', '2024-05-21']]),
  ('moved forward past neighbour',
   ['2024-06-01',
    1,
    5,
    '2024-06-11',
    1,
    [['2024-06-01', '2024-06-30'], ['2024-06-03', None], ['2024-06-04', '2024-06-12']]],
   [['2024-06-11', '2024-06-30'], ['2024-06-13', None], ['2024-06-14', '2024-06-12']]),
  ('earlier-moved target',
   ['2024-07-10', 7, 3, '2024-07-12', 7, [['2024-07-17', '2024-07-01']]],
   [['2024-07-19', '2024-07-01']]),
  ('regression: override before series start',
   ['2024-01-08', 7, 5, '2024-01-10', 7, [['2024-01-01', None], ['2024-01-15', '2024-01-20']]],
   [['2024-01-17', '2024-01-20']]),
  ('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']])],
 [('shrinking interval',
   ['2024-03-01', 14, 5, '2024-03-01', 7, [['2024-03-29', None], ['2024-03-15', '2024-03-16']]],
   [['2024-03-08', '2024-03-16'], ['2024-03-15', None]]),
  ('misaligned override',
   ['2024-04-01', 3, 5, '2024-04-02', 3, [['2024-04-02', None], ['2024-04-04', '2024-04-30']]],
   [['2024-04-05', '2024-04-30']]),
  ('last wins',
   ['2024-05-01', 2, 4, '2024-05-02', 2, [['2024-05-03', '2024-05-20'], ['2024-05-03', '2024-05-21']]],
   [['2024-05-04', '2024-05-21']]),
  ('moved forward past neighbour',
   ['2024-06-01',
    1,
    5,
    '2024-06-11',
    1,
    [['2024-06-01', '2024-06-30'], ['2024-06-03', None], ['2024-06-04', '2024-06-12']]],
   [['2024-06-11', '2024-06-30'], ['2024-06-13', None], ['2024-06-14', '2024-06-12']]),
  ('earlier-moved target',
   ['2024-07-10', 7, 3, '2024-07-12', 7, [['2024-07-17', '2024-07-01']]],
   [['2024-07-19', '2024-07-01']]),
  ('regression: override before series start',
   ['2024-01-08', 7, 5, '2024-01-10', 7, [['2024-01-01', None], ['2024-01-15', '2024-01-20']]],
   [['2024-01-17', '2024-01-20']]),
  ('interval change',
   ['2024-01-01', 7, 6, '2024-01-01', 14, [['2024-01-15', '2024-01-16']]],
   [['2024-01-29', '2024-01-16']]),
  ('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']])],
 [('last wins',
   ['2024-05-01', 2, 4, '2024-05-02', 2, [['2024-05-03', '2024-05-20'], ['2024-05-03', '2024-05-21']]],
   [['2024-05-04', '2024-05-21']]),
  ('moved forward past neighbour',
   ['2024-06-01',
    1,
    5,
    '2024-06-11',
    1,
    [['2024-06-01', '2024-06-30'], ['2024-06-03', None], ['2024-06-04', '2024-06-12']]],
   [['2024-06-11', '2024-06-30'], ['2024-06-13', None], ['2024-06-14', '2024-06-12']]),
  ('earlier-moved target',
   ['2024-07-10', 7, 3, '2024-07-12', 7, [['2024-07-17', '2024-07-01']]],
   [['2024-07-19', '2024-07-01']]),
  ('regression: override before series start',
   ['2024-01-08', 7, 5, '2024-01-10', 7, [['2024-01-01', None], ['2024-01-15', '2024-01-20']]],
   [['2024-01-17', '2024-01-20']]),
  ('interval change',
   ['2024-01-01', 7, 6, '2024-01-01', 14, [['2024-01-15', '2024-01-16']]],
   [['2024-01-29', '2024-01-16']]),
  ('beyond count',
   ['2024-01-01', 1, 3, '2024-01-02', 1, [['2024-01-05', None], ['2024-01-02', '2024-01-10']]],
   [['2024-01-03', '2024-01-10']]),
  ('target becomes new key', ['2024-01-01', 7, 4, '2024-01-02', 7, [['2024-01-08', '2024-01-09']]], [])]]
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: override before series start[['2024-01-17', '2024-01-20']][['2024-01-17', '2024-01-20']]Passed
interval change[['2024-01-29', '2024-01-16']][['2024-01-29', '2024-01-16']]Passed
beyond count[['2024-01-03', '2024-01-10']][['2024-01-03', '2024-01-10']]Passed
target becomes new key[][]Passed
former no-op now moves[['2024-01-10', '2024-01-08']][['2024-01-10', '2024-01-08']]Passed
reverse edit order[['2024-03-06', None], ['2024-03-11', '2024-03-30']][['2024-03-06', None], ['2024-03-11', '2024-03-30']]Passed
shrinking interval[['2024-03-08', '2024-03-16'], ['2024-03-15', None]][['2024-03-08', '2024-03-16'], ['2024-03-15', None]]Passed

SHA-256 / 494ff115711280285bb0d3b5b75965bebf2c7112d6b3268cc1d7c2ab0907f72e

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

Case digest / 238077fe7c67694188e9d7952f808458818fbed0170574d394a8bed0e6cc7717