Skip to content

Fix RRULE evaluation for recurring CPC working session events#1737

Merged
bensternthal merged 1 commit intoopenjs-foundation:mainfrom
bensternthal:fix-working-session-rrule
Feb 10, 2026
Merged

Fix RRULE evaluation for recurring CPC working session events#1737
bensternthal merged 1 commit intoopenjs-foundation:mainfrom
bensternthal:fix-working-session-rrule

Conversation

@bensternthal
Copy link
Contributor

Problem

The GitHub Action for creating CPC working session agendas was not detecting meetings. It ran on 2026-02-10 and reported "No CPC working session found" even though one was on the calendar.

Root Cause

The awk script was doing simple text matching, looking for the literal target date in the DTSTART field:

$0 ~ "DTSTART[^:]*:" today

But recurring iCal events only store the series start date in DTSTART (e.g., 20241022), not each individual occurrence. The actual occurrences are computed from DTSTART + RRULE. So the script would never match any date other than the original series start date.

Fix

Replace the naive text matching with proper RRULE evaluation:

  1. Extract all CPC working session events without date filtering
  2. For each event, evaluate the RRULE to determine if today is a valid occurrence:
    • Check BYDAY matches today's day of the week
    • Compute weeks since DTSTART and check divisibility by INTERVAL
    • Check EXDATE entries to skip cancelled occurrences
  3. Fall back to direct DTSTART matching for single (non-recurring) events

Tested against multiple dates including meeting days, off-weeks, excluded dates, and wrong days of the week.

The awk script was matching the literal target date against DTSTART,
but recurring iCal events only store the series start date in DTSTART.
Individual occurrences must be computed from the RRULE.

This change:
- Extracts all CPC working session events without date filtering
- Evaluates RRULE (INTERVAL, BYDAY) to compute if today is a valid occurrence
- Checks EXDATE entries to skip cancelled occurrences
- Falls back to direct DTSTART matching for single (non-recurring) events
@bensternthal bensternthal requested a review from a team as a code owner February 10, 2026 16:07
@bensternthal bensternthal merged commit e00dcf4 into openjs-foundation:main Feb 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant