refactor: share EventKit reminder snapshot conversion - #83
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 2:22 AM ET / 06:22 UTC. ClawSweeper reviewWhat this changesShares reminder metadata conversion between EventKit reads and saved reminders, reuses list resolution, and removes unused helpers. Merge readiness✅ Ready for maintainer review This remains a useful, bounded refactor: main still duplicates the conversion, and no introduced correctness defect was found. The collaborator-authored PR is also protected from automatic closure. Priority: P3 Review scores
Verification
How this fits togetherRemindCore connects the command-line tool to Apple Reminders through EventKit. It snapshots EventKit objects into transferable values, then converts those values into reminder records for command output. flowchart LR
A[CLI read requests] --> B[EventKit fetch callback]
C[CLI reminder changes] --> D[EventKit save]
B --> E[Reminder snapshot]
D --> E
E --> F[Shared record conversion]
F --> G[CLI output]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Use one internal snapshot-to-record mapper while preserving callback isolation, metadata, calendar semantics, and existing error behavior. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a refactor rather than a reported runtime failure; the duplicated conversion is directly visible on main. Is this the best way to solve the issue? Yes: sharing the existing value conversion removes duplication without changing the EventKit callback boundary or public API. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 1b71fb003087. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
EventKit reads and writes converted the same snapshot fields in two places, making metadata changes easy to apply to only one path. Move the callback snapshot into its own file and share its conversion to
ReminderItem; remove an unused calendar lookup and reuse the existing list resolver.The synchronous callback snapshot still owns the crossing from EventKit objects to Sendable values. Missing-calendar reads are skipped and saved reminders still report the existing error. Public library overloads, CLI output and platform floors are preserved.
Validation: isolated Codex autoreview is scoped-clean through P2;
make checkpasses strict Swift/shell/workflow lint, all tests, and 94.0% RemindCore line coverage (958/1019).make build,make docs-site, andmake release-harnesspass.Live proof using the built, locally signed
bin/remindctl: created a disposable synthetic list; added a timed repeating reminder with priority, URL and notes; compared add/export/show JSON metadata; changed its title and due date to all-day while preserving its alarm; exercised standard/table/plain/quiet output; removed recurrence, completed and deleted the reminder; deleted the list. All assertions passed and synthetic data was removed. Recurrence is removed before completion because EventKit advances repeating reminders to their next occurrence.Exact-head CI: https://github.com/openclaw/remindctl/actions/runs/34742412779 (candidate
afc8ee016064a3199cf6cc090ebe56f2a7dc3ff6).