From 6b621083b9958ceca40349f59936858974305c3a Mon Sep 17 00:00:00 2001 From: sstent Date: Fri, 20 Feb 2026 13:18:16 -0800 Subject: [PATCH] chore(conductor): Add new track 'Fix RRULE object mapping' --- conductor/tracks.md | 5 +++ .../index.md | 5 +++ .../metadata.json | 8 +++++ .../fix_rrule_object_mapping_20260219/plan.md | 19 +++++++++++ .../fix_rrule_object_mapping_20260219/spec.md | 32 +++++++++++++++++++ 5 files changed, 69 insertions(+) create mode 100644 conductor/tracks/fix_rrule_object_mapping_20260219/index.md create mode 100644 conductor/tracks/fix_rrule_object_mapping_20260219/metadata.json create mode 100644 conductor/tracks/fix_rrule_object_mapping_20260219/plan.md create mode 100644 conductor/tracks/fix_rrule_object_mapping_20260219/spec.md diff --git a/conductor/tracks.md b/conductor/tracks.md index e32dff5..6e312a1 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -11,3 +11,8 @@ This file tracks all major tracks for the project. Each track has its own detail - [x] **Track: Fix TypeError: r.replace is not a function in icalendar.ts** *Link: [./tracks/fix_rrule_type_error_20260219/](./tracks/fix_rrule_type_error_20260219/)* + +--- + +- [ ] **Track: Fix RRULE object expansion error by correctly mapping object keys to standard iCalendar RRULE properties.** + *Link: [./tracks/fix_rrule_object_mapping_20260219/](./tracks/fix_rrule_object_mapping_20260219/)* diff --git a/conductor/tracks/fix_rrule_object_mapping_20260219/index.md b/conductor/tracks/fix_rrule_object_mapping_20260219/index.md new file mode 100644 index 0000000..30f33b9 --- /dev/null +++ b/conductor/tracks/fix_rrule_object_mapping_20260219/index.md @@ -0,0 +1,5 @@ +# Track fix_rrule_object_mapping_20260219 Context + +- [Specification](./spec.md) +- [Implementation Plan](./plan.md) +- [Metadata](./metadata.json) \ No newline at end of file diff --git a/conductor/tracks/fix_rrule_object_mapping_20260219/metadata.json b/conductor/tracks/fix_rrule_object_mapping_20260219/metadata.json new file mode 100644 index 0000000..b4faa22 --- /dev/null +++ b/conductor/tracks/fix_rrule_object_mapping_20260219/metadata.json @@ -0,0 +1,8 @@ +{ + "track_id": "fix_rrule_object_mapping_20260219", + "type": "bug", + "status": "new", + "created_at": "2026-02-19T00:00:00Z", + "updated_at": "2026-02-19T00:00:00Z", + "description": "Fix RRULE object expansion error by correctly mapping object keys to standard iCalendar RRULE properties." +} \ No newline at end of file diff --git a/conductor/tracks/fix_rrule_object_mapping_20260219/plan.md b/conductor/tracks/fix_rrule_object_mapping_20260219/plan.md new file mode 100644 index 0000000..65a7e27 --- /dev/null +++ b/conductor/tracks/fix_rrule_object_mapping_20260219/plan.md @@ -0,0 +1,19 @@ +# Implementation Plan - Fix RRULE Object Mapping + +## Phase 1: Reproduction +- [ ] Task: Reproduce `Unknown RRULE property` error + - [ ] Modify the test case in `icalendar_test.ts` to use `frequency` instead of `freq` in the mock object. + - [ ] Run the test and confirm it fails with the expected error. +- [ ] Task: Conductor - User Manual Verification 'Reproduction' (Protocol in workflow.md) + +## Phase 2: Fix Implementation +- [ ] Task: Implement mapping logic in `icalendar.ts` + - [ ] Create a mapping object for verbose keys to iCal keys. + - [ ] Update `expandRecurrences` to use this mapping. + - [ ] Run the test to confirm it passes. +- [ ] Task: Conductor - User Manual Verification 'Fix Implementation' (Protocol in workflow.md) + +## Phase 3: Verification & Cleanup +- [ ] Task: Full Regression Check + - [ ] Run all tests in `icalendar_test.ts`. +- [ ] Task: Conductor - User Manual Verification 'Verification & Cleanup' (Protocol in workflow.md) diff --git a/conductor/tracks/fix_rrule_object_mapping_20260219/spec.md b/conductor/tracks/fix_rrule_object_mapping_20260219/spec.md new file mode 100644 index 0000000..69cfefd --- /dev/null +++ b/conductor/tracks/fix_rrule_object_mapping_20260219/spec.md @@ -0,0 +1,32 @@ +# Specification: Fix RRULE Object Expansion Error + +## Overview +The previous fix for handling object-type `rrule` properties (returned by `ts-ics`) introduced a regression. The conversion logic used uppercase full names (e.g., `FREQUENCY`), but the `rrule` library's `parseString` method expects standard iCalendar shortened keys (e.g., `FREQ`). This results in an `Error: Unknown RRULE property 'FREQUENCY'`. + +## Functional Requirements +- **Correct Key Mapping:** The logic that converts an `rrule` object back to a string must use standard iCalendar RRULE property keys. +- **Mapping Table:** + - `frequency` -> `FREQ` + - `until` -> `UNTIL` + - `count` -> `COUNT` + - `interval` -> `INTERVAL` + - `bysecond` -> `BYSECOND` + - `byminute` -> `BYMINUTE` + - `byhour` -> `BYHOUR` + - `byday` -> `BYDAY` + - `bymonthday` -> `BYMONTHDAY` + - `byyearday` -> `BYYEARDAY` + - `byweekno` -> `BYWEEKNO` + - `bymonth` -> `BYMONTH` + - `bysetpos` -> `BYSETPOS` + - `wkst` -> `WKST` +- **Case Insensitivity:** The mapping should be case-insensitive for the input object keys. + +## Implementation Steps +1. **Reproduce:** Update the existing `expandRecurrences - object rrule` test case to use the key `frequency` and verify it fails with the reported error. +2. **Fix:** Implement a mapping function in `icalendar.ts` to translate object keys to standard RRULE keys before stringifying. +3. **Verify:** Run the test case to confirm it now passes. + +## Acceptance Criteria +- [ ] Test `expandRecurrences - object rrule` passes with an object using `frequency` key. +- [ ] No "Unknown RRULE property" errors are logged for valid RRULE objects.