Skip to content

test: fixture-test the recurrence engine; typecheck now blocking (audit bucket 4b — H2 part 2, M3) - #5

Merged
CR0CKER merged 1 commit into
mainfrom
test/extract-recurrence
Jul 20, 2026
Merged

CR0CKER merged 1 commit into
mainfrom
test/extract-recurrence

Conversation

@CR0CKER

@CR0CKER CR0CKER commented Jul 20, 2026

Copy link
Copy Markdown
Owner

What changed

Audit bucket 4, part 2 (finding H2), and closes out M3.

  • New recurrence.ts — extracted rawParser's recurring-event expansion into a pure parseEvents: RRULE window, EXDATE exclusion, RECURRENCE-ID rescheduled overrides, tzid-aware time reconstruction. now is injectable; settings are passed in. rawParser is now a thin parse+delegate wrapper. Algorithm unchanged.
  • New recurrence.test.ts — parses real .ics fixtures with node-ical and asserts on the expanded output (weekly expansion, EXDATE, rescheduled override, window bounds, cancelled filtering). Suite is now 37 tests.
  • typecheck is now a blocking CI gate — with the engine extracted and the remaining index.ts adapter functions lightly annotated, tsc --noEmit is clean: 65 → 0 errors (audit M3). continue-on-error removed from the typecheck job.

Why

H2: the recurrence/timezone logic was the highest-risk, wholly-untested code. It's now isolated, deterministic (injectable now), and covered by fixture tests. M3: the whole codebase type-checks strict-clean, so the gate can enforce it.

Testing

  • npm test: 37 passed (31 parsing + 6 recurrence).
  • npm run typecheck: 0 errors.
  • Build verified via CI (arm64 host can't build the native deps).

Note

Only-type annotations were added to the index.ts adapter functions — no runtime logic changed. The recurrence algorithm was ported verbatim; the fixture tests are the proof of behavior-preservation.

Reviewer note

No automated PR reviewer configured; self-reviewed — extraction is behavior-preserving, tests assert on real node-ical output, no secrets, blast radius is the parse path.

🤖 Generated with Claude Code

https://claude.ai/code/session_019cVCdCtNzUJmy1yen3JyBk

…cking (audit H2 part 2, M3)

Extract rawParser's recurring-event expansion into a pure recurrence.ts
(parseEvents): RRULE window, EXDATE exclusion, RECURRENCE-ID rescheduled
overrides, tzid-aware time reconstruction. 'now' is injectable and settings
are passed in; rawParser is now a thin parse+delegate wrapper. Algorithm
unchanged — recurrence.test.ts proves it against real .ics fixtures parsed by
node-ical (weekly expansion, EXDATE, rescheduled override, window, cancelled).

With the engine extracted and the remaining index.ts adapter functions given
light type annotations, tsc --noEmit is clean (65 -> 0 errors), so the CI
typecheck job flips from informational to a blocking gate (audit M3).

Full suite: 37 tests green; typecheck: 0 errors. Build verified via CI
(arm64 host can't build the native deps).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019cVCdCtNzUJmy1yen3JyBk
@CR0CKER
CR0CKER merged commit 1cecdbc into main Jul 20, 2026
3 of 4 checks 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