FAILURE MAP
← Case archive

FA-77266 / Calendar recurrence rules / Open access

Rendering a recurrence rule as a human-readable sentence: count phrase · case 01

COUNT=1 is rendered as "1 times".

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

ROOT CAUSE

The count phrase is always the plural numeric form.

VERIFIED REPAIR

At the count phrase decision use `'once' if count == 1 else '%d times' % count`, leaving the other decision sites of the model unchanged.

Unsuccessful approach: The partial repair `'1 time' if count == 1 else '%d times' % count` fixes the grammar but not the house style, which requires "once".

Case contract

House style: "every <unit>" for interval 1, else "every <n> <unit>s"; weekday lists are in Monday-first order without duplicates and joined as "A, B and C"; the exact set MO..FR renders as "on weekdays"; an ordinal renders "on the 2nd Tuesday", -1 as "on the last Friday" and -n (n>1) as "on the 2nd to last Friday"; count renders ", once" for 1 and ", <n> times" otherwise.

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

N = 1
observations = []
def solve(freq, interval, byday, ordinal, count):
    unit = {'DAILY': 'day', 'WEEKLY': 'week', 'MONTHLY': 'month', 'YEARLY': 'year'}[freq]
    text = 'every ' + unit if interval == 1 else 'every %d %ss' % (interval, unit)
    names = {'MO': 'Monday', 'TU': 'Tuesday', 'WE': 'Wednesday', 'TH': 'Thursday', 'FR': 'Friday', 'SA': 'Saturday', 'SU': 'Sunday'}
    order = ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU']
    def nth(n):
        return str(n) + {1: 'st', 2: 'nd', 3: 'rd'}.get(n, 'th')
    if ordinal:
        word = ('last' if ordinal == -1 else nth(-ordinal) + ' to last') if ordinal < 0 else nth(ordinal)
        text += ' on the ' + word + ' ' + names[byday[0]]
    elif byday:
        if set(byday) == {'MO', 'TU', 'WE', 'TH', 'FR'}:
            text += ' on weekdays'
        else:
            words = [names[d] for d in sorted(set(byday), key=order.index)]
            text += ' on ' + (words[0] if len(words) == 1 else ', '.join(words[:-1]) + ' and ' + words[-1])
    if count:
        text += ', ' + ('%d times' % count)
    return text
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: weekly three days',
   ['WEEKLY', 1, ['MO', 'WE', 'FR'], 0, 0],
   'every week on Monday, Wednesday and Friday'),
  ('biweekly single day once', ['WEEKLY', 2, ['TU'], 0, 1], 'every 2 weeks on Tuesday, once'),
  ('last friday monthly', ['MONTHLY', 1, ['FR'], -1, 6], 'every month on the last Friday, 6 times'),
  ('second to last sunday', ['MONTHLY', 3, ['SU'], -2, 0], 'every 3 months on the 2nd to last Sunday'),
  ('second tuesday', ['MONTHLY', 1, ['TU'], 2, 10], 'every month on the 2nd Tuesday, 10 times'),
  ('weekdays exact', ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'FR'], 0, 0], 'every week on weekdays'),
  ('weekdays reordered',
   ['WEEKLY', 1, ['FR', 'MO', 'TU', 'WE', 'TH'], 0, 3],
   'every week on weekdays, 3 times')],
 [('last friday monthly', ['MONTHLY', 1, ['FR'], -1, 6], 'every month on the last Friday, 6 times'),
  ('second to last sunday', ['MONTHLY', 3, ['SU'], -2, 0], 'every 3 months on the 2nd to last Sunday'),
  ('second tuesday', ['MONTHLY', 1, ['TU'], 2, 10], 'every month on the 2nd Tuesday, 10 times'),
  ('weekdays exact', ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'FR'], 0, 0], 'every week on weekdays'),
  ('weekdays reordered',
   ['WEEKLY', 1, ['FR', 'MO', 'TU', 'WE', 'TH'], 0, 3],
   'every week on weekdays, 3 times'),
  ('five days with saturday',
   ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'SA'], 0, 0],
   'every week on Monday, Tuesday, Wednesday, Thursday and Saturday'),
  ('duplicate days', ['WEEKLY', 3, ['SU', 'MO', 'SU'], 0, 2], 'every 3 weeks on Monday and Sunday, 2 times'),
  ('two days unordered', ['WEEKLY', 1, ['TH', 'TU'], 0, 1], 'every week on Tuesday and Thursday, once')],
 [('second tuesday', ['MONTHLY', 1, ['TU'], 2, 10], 'every month on the 2nd Tuesday, 10 times'),
  ('weekdays exact', ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'FR'], 0, 0], 'every week on weekdays'),
  ('weekdays reordered',
   ['WEEKLY', 1, ['FR', 'MO', 'TU', 'WE', 'TH'], 0, 3],
   'every week on weekdays, 3 times'),
  ('five days with saturday',
   ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'SA'], 0, 0],
   'every week on Monday, Tuesday, Wednesday, Thursday and Saturday'),
  ('duplicate days', ['WEEKLY', 3, ['SU', 'MO', 'SU'], 0, 2], 'every 3 weeks on Monday and Sunday, 2 times'),
  ('daily with count one', ['DAILY', 1, [], 0, 1], 'every day, once'),
  ('yearly interval', ['YEARLY', 4, [], 0, 0], 'every 4 years')],
 [('weekdays reordered',
   ['WEEKLY', 1, ['FR', 'MO', 'TU', 'WE', 'TH'], 0, 3],
   'every week on weekdays, 3 times'),
  ('five days with saturday',
   ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'SA'], 0, 0],
   'every week on Monday, Tuesday, Wednesday, Thursday and Saturday'),
  ('duplicate days', ['WEEKLY', 3, ['SU', 'MO', 'SU'], 0, 2], 'every 3 weeks on Monday and Sunday, 2 times'),
  ('daily with count one', ['DAILY', 1, [], 0, 1], 'every day, once'),
  ('yearly interval', ['YEARLY', 4, [], 0, 0], 'every 4 years'),
  ('two days unordered', ['WEEKLY', 1, ['TH', 'TU'], 0, 1], 'every week on Tuesday and Thursday, once'),
  ('regression: weekly three days',
   ['WEEKLY', 1, ['MO', 'WE', 'FR'], 0, 0],
   'every week on Monday, Wednesday and Friday')],
 [('duplicate days', ['WEEKLY', 3, ['SU', 'MO', 'SU'], 0, 2], 'every 3 weeks on Monday and Sunday, 2 times'),
  ('daily with count one', ['DAILY', 1, [], 0, 1], 'every day, once'),
  ('yearly interval', ['YEARLY', 4, [], 0, 0], 'every 4 years'),
  ('two days unordered', ['WEEKLY', 1, ['TH', 'TU'], 0, 1], 'every week on Tuesday and Thursday, once'),
  ('regression: weekly three days',
   ['WEEKLY', 1, ['MO', 'WE', 'FR'], 0, 0],
   'every week on Monday, Wednesday and Friday'),
  ('biweekly single day once', ['WEEKLY', 2, ['TU'], 0, 1], 'every 2 weeks on Tuesday, once'),
  ('last friday monthly', ['MONTHLY', 1, ['FR'], -1, 6], 'every month on the last Friday, 6 times')]]
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: weekly three daysevery week on Monday, Wednesday and Fridayevery week on Monday, Wednesday and FridayPassed
biweekly single day onceevery 2 weeks on Tuesday, 1 timesevery 2 weeks on Tuesday, onceFailed
last friday monthlyevery month on the last Friday, 6 timesevery month on the last Friday, 6 timesPassed
second to last sundayevery 3 months on the 2nd to last Sundayevery 3 months on the 2nd to last SundayPassed
second tuesdayevery month on the 2nd Tuesday, 10 timesevery month on the 2nd Tuesday, 10 timesPassed
weekdays exactevery week on weekdaysevery week on weekdaysPassed
weekdays reorderedevery week on weekdays, 3 timesevery week on weekdays, 3 timesPassed

SHA-256 / 78db520c72c86ecfdac6fe1fd5d2b3b87e6c6162ca503d9b1d889121edee5fba

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(freq, interval, byday, ordinal, count):
    unit = {'DAILY': 'day', 'WEEKLY': 'week', 'MONTHLY': 'month', 'YEARLY': 'year'}[freq]
    text = 'every ' + unit if interval == 1 else 'every %d %ss' % (interval, unit)
    names = {'MO': 'Monday', 'TU': 'Tuesday', 'WE': 'Wednesday', 'TH': 'Thursday', 'FR': 'Friday', 'SA': 'Saturday', 'SU': 'Sunday'}
    order = ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU']
    def nth(n):
        return str(n) + {1: 'st', 2: 'nd', 3: 'rd'}.get(n, 'th')
    if ordinal:
        word = ('last' if ordinal == -1 else nth(-ordinal) + ' to last') if ordinal < 0 else nth(ordinal)
        text += ' on the ' + word + ' ' + names[byday[0]]
    elif byday:
        if set(byday) == {'MO', 'TU', 'WE', 'TH', 'FR'}:
            text += ' on weekdays'
        else:
            words = [names[d] for d in sorted(set(byday), key=order.index)]
            text += ' on ' + (words[0] if len(words) == 1 else ', '.join(words[:-1]) + ' and ' + words[-1])
    if count:
        text += ', ' + ('1 time' if count == 1 else '%d times' % count)
    return text
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: weekly three days',
   ['WEEKLY', 1, ['MO', 'WE', 'FR'], 0, 0],
   'every week on Monday, Wednesday and Friday'),
  ('biweekly single day once', ['WEEKLY', 2, ['TU'], 0, 1], 'every 2 weeks on Tuesday, once'),
  ('last friday monthly', ['MONTHLY', 1, ['FR'], -1, 6], 'every month on the last Friday, 6 times'),
  ('second to last sunday', ['MONTHLY', 3, ['SU'], -2, 0], 'every 3 months on the 2nd to last Sunday'),
  ('second tuesday', ['MONTHLY', 1, ['TU'], 2, 10], 'every month on the 2nd Tuesday, 10 times'),
  ('weekdays exact', ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'FR'], 0, 0], 'every week on weekdays'),
  ('weekdays reordered',
   ['WEEKLY', 1, ['FR', 'MO', 'TU', 'WE', 'TH'], 0, 3],
   'every week on weekdays, 3 times')],
 [('last friday monthly', ['MONTHLY', 1, ['FR'], -1, 6], 'every month on the last Friday, 6 times'),
  ('second to last sunday', ['MONTHLY', 3, ['SU'], -2, 0], 'every 3 months on the 2nd to last Sunday'),
  ('second tuesday', ['MONTHLY', 1, ['TU'], 2, 10], 'every month on the 2nd Tuesday, 10 times'),
  ('weekdays exact', ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'FR'], 0, 0], 'every week on weekdays'),
  ('weekdays reordered',
   ['WEEKLY', 1, ['FR', 'MO', 'TU', 'WE', 'TH'], 0, 3],
   'every week on weekdays, 3 times'),
  ('five days with saturday',
   ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'SA'], 0, 0],
   'every week on Monday, Tuesday, Wednesday, Thursday and Saturday'),
  ('duplicate days', ['WEEKLY', 3, ['SU', 'MO', 'SU'], 0, 2], 'every 3 weeks on Monday and Sunday, 2 times'),
  ('two days unordered', ['WEEKLY', 1, ['TH', 'TU'], 0, 1], 'every week on Tuesday and Thursday, once')],
 [('second tuesday', ['MONTHLY', 1, ['TU'], 2, 10], 'every month on the 2nd Tuesday, 10 times'),
  ('weekdays exact', ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'FR'], 0, 0], 'every week on weekdays'),
  ('weekdays reordered',
   ['WEEKLY', 1, ['FR', 'MO', 'TU', 'WE', 'TH'], 0, 3],
   'every week on weekdays, 3 times'),
  ('five days with saturday',
   ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'SA'], 0, 0],
   'every week on Monday, Tuesday, Wednesday, Thursday and Saturday'),
  ('duplicate days', ['WEEKLY', 3, ['SU', 'MO', 'SU'], 0, 2], 'every 3 weeks on Monday and Sunday, 2 times'),
  ('daily with count one', ['DAILY', 1, [], 0, 1], 'every day, once'),
  ('yearly interval', ['YEARLY', 4, [], 0, 0], 'every 4 years')],
 [('weekdays reordered',
   ['WEEKLY', 1, ['FR', 'MO', 'TU', 'WE', 'TH'], 0, 3],
   'every week on weekdays, 3 times'),
  ('five days with saturday',
   ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'SA'], 0, 0],
   'every week on Monday, Tuesday, Wednesday, Thursday and Saturday'),
  ('duplicate days', ['WEEKLY', 3, ['SU', 'MO', 'SU'], 0, 2], 'every 3 weeks on Monday and Sunday, 2 times'),
  ('daily with count one', ['DAILY', 1, [], 0, 1], 'every day, once'),
  ('yearly interval', ['YEARLY', 4, [], 0, 0], 'every 4 years'),
  ('two days unordered', ['WEEKLY', 1, ['TH', 'TU'], 0, 1], 'every week on Tuesday and Thursday, once'),
  ('regression: weekly three days',
   ['WEEKLY', 1, ['MO', 'WE', 'FR'], 0, 0],
   'every week on Monday, Wednesday and Friday')],
 [('duplicate days', ['WEEKLY', 3, ['SU', 'MO', 'SU'], 0, 2], 'every 3 weeks on Monday and Sunday, 2 times'),
  ('daily with count one', ['DAILY', 1, [], 0, 1], 'every day, once'),
  ('yearly interval', ['YEARLY', 4, [], 0, 0], 'every 4 years'),
  ('two days unordered', ['WEEKLY', 1, ['TH', 'TU'], 0, 1], 'every week on Tuesday and Thursday, once'),
  ('regression: weekly three days',
   ['WEEKLY', 1, ['MO', 'WE', 'FR'], 0, 0],
   'every week on Monday, Wednesday and Friday'),
  ('biweekly single day once', ['WEEKLY', 2, ['TU'], 0, 1], 'every 2 weeks on Tuesday, once'),
  ('last friday monthly', ['MONTHLY', 1, ['FR'], -1, 6], 'every month on the last Friday, 6 times')]]
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: weekly three daysevery week on Monday, Wednesday and Fridayevery week on Monday, Wednesday and FridayPassed
biweekly single day onceevery 2 weeks on Tuesday, 1 timeevery 2 weeks on Tuesday, onceFailed
last friday monthlyevery month on the last Friday, 6 timesevery month on the last Friday, 6 timesPassed
second to last sundayevery 3 months on the 2nd to last Sundayevery 3 months on the 2nd to last SundayPassed
second tuesdayevery month on the 2nd Tuesday, 10 timesevery month on the 2nd Tuesday, 10 timesPassed
weekdays exactevery week on weekdaysevery week on weekdaysPassed
weekdays reorderedevery week on weekdays, 3 timesevery week on weekdays, 3 timesPassed

SHA-256 / 0e6c869b4799974a3f51d44c47a860dfc30b1822e15a3aa4c7586d537f704840

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(freq, interval, byday, ordinal, count):
    unit = {'DAILY': 'day', 'WEEKLY': 'week', 'MONTHLY': 'month', 'YEARLY': 'year'}[freq]
    text = 'every ' + unit if interval == 1 else 'every %d %ss' % (interval, unit)
    names = {'MO': 'Monday', 'TU': 'Tuesday', 'WE': 'Wednesday', 'TH': 'Thursday', 'FR': 'Friday', 'SA': 'Saturday', 'SU': 'Sunday'}
    order = ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU']
    def nth(n):
        return str(n) + {1: 'st', 2: 'nd', 3: 'rd'}.get(n, 'th')
    if ordinal:
        word = ('last' if ordinal == -1 else nth(-ordinal) + ' to last') if ordinal < 0 else nth(ordinal)
        text += ' on the ' + word + ' ' + names[byday[0]]
    elif byday:
        if set(byday) == {'MO', 'TU', 'WE', 'TH', 'FR'}:
            text += ' on weekdays'
        else:
            words = [names[d] for d in sorted(set(byday), key=order.index)]
            text += ' on ' + (words[0] if len(words) == 1 else ', '.join(words[:-1]) + ' and ' + words[-1])
    if count:
        text += ', ' + ('once' if count == 1 else '%d times' % count)
    return text
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('regression: weekly three days',
   ['WEEKLY', 1, ['MO', 'WE', 'FR'], 0, 0],
   'every week on Monday, Wednesday and Friday'),
  ('biweekly single day once', ['WEEKLY', 2, ['TU'], 0, 1], 'every 2 weeks on Tuesday, once'),
  ('last friday monthly', ['MONTHLY', 1, ['FR'], -1, 6], 'every month on the last Friday, 6 times'),
  ('second to last sunday', ['MONTHLY', 3, ['SU'], -2, 0], 'every 3 months on the 2nd to last Sunday'),
  ('second tuesday', ['MONTHLY', 1, ['TU'], 2, 10], 'every month on the 2nd Tuesday, 10 times'),
  ('weekdays exact', ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'FR'], 0, 0], 'every week on weekdays'),
  ('weekdays reordered',
   ['WEEKLY', 1, ['FR', 'MO', 'TU', 'WE', 'TH'], 0, 3],
   'every week on weekdays, 3 times')],
 [('last friday monthly', ['MONTHLY', 1, ['FR'], -1, 6], 'every month on the last Friday, 6 times'),
  ('second to last sunday', ['MONTHLY', 3, ['SU'], -2, 0], 'every 3 months on the 2nd to last Sunday'),
  ('second tuesday', ['MONTHLY', 1, ['TU'], 2, 10], 'every month on the 2nd Tuesday, 10 times'),
  ('weekdays exact', ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'FR'], 0, 0], 'every week on weekdays'),
  ('weekdays reordered',
   ['WEEKLY', 1, ['FR', 'MO', 'TU', 'WE', 'TH'], 0, 3],
   'every week on weekdays, 3 times'),
  ('five days with saturday',
   ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'SA'], 0, 0],
   'every week on Monday, Tuesday, Wednesday, Thursday and Saturday'),
  ('duplicate days', ['WEEKLY', 3, ['SU', 'MO', 'SU'], 0, 2], 'every 3 weeks on Monday and Sunday, 2 times'),
  ('two days unordered', ['WEEKLY', 1, ['TH', 'TU'], 0, 1], 'every week on Tuesday and Thursday, once')],
 [('second tuesday', ['MONTHLY', 1, ['TU'], 2, 10], 'every month on the 2nd Tuesday, 10 times'),
  ('weekdays exact', ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'FR'], 0, 0], 'every week on weekdays'),
  ('weekdays reordered',
   ['WEEKLY', 1, ['FR', 'MO', 'TU', 'WE', 'TH'], 0, 3],
   'every week on weekdays, 3 times'),
  ('five days with saturday',
   ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'SA'], 0, 0],
   'every week on Monday, Tuesday, Wednesday, Thursday and Saturday'),
  ('duplicate days', ['WEEKLY', 3, ['SU', 'MO', 'SU'], 0, 2], 'every 3 weeks on Monday and Sunday, 2 times'),
  ('daily with count one', ['DAILY', 1, [], 0, 1], 'every day, once'),
  ('yearly interval', ['YEARLY', 4, [], 0, 0], 'every 4 years')],
 [('weekdays reordered',
   ['WEEKLY', 1, ['FR', 'MO', 'TU', 'WE', 'TH'], 0, 3],
   'every week on weekdays, 3 times'),
  ('five days with saturday',
   ['WEEKLY', 1, ['MO', 'TU', 'WE', 'TH', 'SA'], 0, 0],
   'every week on Monday, Tuesday, Wednesday, Thursday and Saturday'),
  ('duplicate days', ['WEEKLY', 3, ['SU', 'MO', 'SU'], 0, 2], 'every 3 weeks on Monday and Sunday, 2 times'),
  ('daily with count one', ['DAILY', 1, [], 0, 1], 'every day, once'),
  ('yearly interval', ['YEARLY', 4, [], 0, 0], 'every 4 years'),
  ('two days unordered', ['WEEKLY', 1, ['TH', 'TU'], 0, 1], 'every week on Tuesday and Thursday, once'),
  ('regression: weekly three days',
   ['WEEKLY', 1, ['MO', 'WE', 'FR'], 0, 0],
   'every week on Monday, Wednesday and Friday')],
 [('duplicate days', ['WEEKLY', 3, ['SU', 'MO', 'SU'], 0, 2], 'every 3 weeks on Monday and Sunday, 2 times'),
  ('daily with count one', ['DAILY', 1, [], 0, 1], 'every day, once'),
  ('yearly interval', ['YEARLY', 4, [], 0, 0], 'every 4 years'),
  ('two days unordered', ['WEEKLY', 1, ['TH', 'TU'], 0, 1], 'every week on Tuesday and Thursday, once'),
  ('regression: weekly three days',
   ['WEEKLY', 1, ['MO', 'WE', 'FR'], 0, 0],
   'every week on Monday, Wednesday and Friday'),
  ('biweekly single day once', ['WEEKLY', 2, ['TU'], 0, 1], 'every 2 weeks on Tuesday, once'),
  ('last friday monthly', ['MONTHLY', 1, ['FR'], -1, 6], 'every month on the last Friday, 6 times')]]
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: weekly three daysevery week on Monday, Wednesday and Fridayevery week on Monday, Wednesday and FridayPassed
biweekly single day onceevery 2 weeks on Tuesday, onceevery 2 weeks on Tuesday, oncePassed
last friday monthlyevery month on the last Friday, 6 timesevery month on the last Friday, 6 timesPassed
second to last sundayevery 3 months on the 2nd to last Sundayevery 3 months on the 2nd to last SundayPassed
second tuesdayevery month on the 2nd Tuesday, 10 timesevery month on the 2nd Tuesday, 10 timesPassed
weekdays exactevery week on weekdaysevery week on weekdaysPassed
weekdays reorderedevery week on weekdays, 3 timesevery week on weekdays, 3 timesPassed

SHA-256 / 02016cd7a68f16cbda9618ff9618b20690425159e0ba6a2e99febf0390787565

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

Case digest / 906b571bba4fe8291a1081bade1d88f4fcf4f77f9035764177a95d3da2c67614