From cd0fdf5f983d48ffd1e2263d3b1e380071420f73 Mon Sep 17 00:00:00 2001 From: sstent Date: Fri, 20 Feb 2026 13:33:27 -0800 Subject: [PATCH] chore(conductor): Add new track 'Fix RRULE UNTIL conversion' --- conductor/tracks.md | 5 +++++ .../index.md | 5 +++++ .../metadata.json | 8 ++++++++ .../plan.md | 19 ++++++++++++++++++ .../spec.md | 20 +++++++++++++++++++ 5 files changed, 57 insertions(+) create mode 100644 conductor/tracks/fix_rrule_until_conversion_20260219/index.md create mode 100644 conductor/tracks/fix_rrule_until_conversion_20260219/metadata.json create mode 100644 conductor/tracks/fix_rrule_until_conversion_20260219/plan.md create mode 100644 conductor/tracks/fix_rrule_until_conversion_20260219/spec.md diff --git a/conductor/tracks.md b/conductor/tracks.md index 16685ab..e45a459 100644 --- a/conductor/tracks.md +++ b/conductor/tracks.md @@ -16,3 +16,8 @@ This file tracks all major tracks for the project. Each track has its own detail - [x] **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/)* + +--- + +- [ ] **Track: Fix RRULE UNTIL object conversion error: Invalid UNTIL value: [object Object]** + *Link: [./tracks/fix_rrule_until_conversion_20260219/](./tracks/fix_rrule_until_conversion_20260219/)* diff --git a/conductor/tracks/fix_rrule_until_conversion_20260219/index.md b/conductor/tracks/fix_rrule_until_conversion_20260219/index.md new file mode 100644 index 0000000..5b03edc --- /dev/null +++ b/conductor/tracks/fix_rrule_until_conversion_20260219/index.md @@ -0,0 +1,5 @@ +# Track fix_rrule_until_conversion_20260219 Context + +- [Specification](./spec.md) +- [Implementation Plan](./plan.md) +- [Metadata](./metadata.json) diff --git a/conductor/tracks/fix_rrule_until_conversion_20260219/metadata.json b/conductor/tracks/fix_rrule_until_conversion_20260219/metadata.json new file mode 100644 index 0000000..eb895cd --- /dev/null +++ b/conductor/tracks/fix_rrule_until_conversion_20260219/metadata.json @@ -0,0 +1,8 @@ +{ + "track_id": "fix_rrule_until_conversion_20260219", + "type": "bug", + "status": "new", + "created_at": "2026-02-19T00:00:00Z", + "updated_at": "2026-02-19T00:00:00Z", + "description": "Fix RRULE UNTIL object conversion error: Invalid UNTIL value: [object Object]" +} diff --git a/conductor/tracks/fix_rrule_until_conversion_20260219/plan.md b/conductor/tracks/fix_rrule_until_conversion_20260219/plan.md new file mode 100644 index 0000000..33136b2 --- /dev/null +++ b/conductor/tracks/fix_rrule_until_conversion_20260219/plan.md @@ -0,0 +1,19 @@ +# Implementation Plan - Fix RRULE UNTIL Conversion + +## Phase 1: Reproduction +- [ ] Task: Reproduce `Invalid UNTIL value` error + - [ ] Add a test case in `icalendar_test.ts` where `rrule` object has an `until` property as a `Date`. + - [ ] Run the test and confirm it fails with `Error: Invalid UNTIL value: [object Object]`. +- [ ] Task: Conductor - User Manual Verification 'Reproduction' (Protocol in workflow.md) + +## Phase 2: Fix Implementation +- [ ] Task: Implement value formatting logic in `icalendar.ts` + - [ ] Update `expandRecurrences` to use a helper for property value conversion. + - [ ] Ensure `Date` objects are formatted as `YYYYMMDDTHHMMSSZ`. + - [ ] 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_until_conversion_20260219/spec.md b/conductor/tracks/fix_rrule_until_conversion_20260219/spec.md new file mode 100644 index 0000000..917c03e --- /dev/null +++ b/conductor/tracks/fix_rrule_until_conversion_20260219/spec.md @@ -0,0 +1,20 @@ +# Specification: Fix RRULE UNTIL Object Conversion + +## Overview +The conversion of RRULE objects to strings fails for nested objects like `UNTIL` dates, resulting in `UNTIL=[object Object]`. This causes the `rrule` library to fail during expansion. + +## Functional Requirements +- **Robust Value Formatting:** Implement `formatRRuleValue` to handle various types of RRULE values: + - **Date Objects:** Convert to `YYYYMMDDTHHMMSSZ`. + - **Nested Date Objects:** (e.g., `{ date: Date }` from `ts-ics`) Extract and convert. + - **Other Types:** Default to string conversion. +- **Mapping Preservation:** Maintain the existing `RRULE_KEY_MAP` for key translation. + +## Implementation Steps +1. **Reproduce:** Add test `expandRecurrences - object rrule with until` in `icalendar_test.ts` using a Date object for `until`. Verify it fails with `Invalid UNTIL value`. +2. **Fix:** Update `expandRecurrences` in `icalendar.ts` to use a formatting helper for values. +3. **Verify:** Confirm the test case passes. + +## Acceptance Criteria +- [ ] Test `expandRecurrences - object rrule with until` passes. +- [ ] The generated string correctly represents the date (e.g., `UNTIL=20260219T000000Z`).