Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request improves event deduplication in both InMemoryCalendarStore and EventKitAdapter by introducing a more comprehensive EventListIdentity struct that accounts for calendar IDs and occurrence start/end times. It also updates event serialization to include the occurrenceStart field. A compilation error was identified in EventKitAdapter.swift where .map is incorrectly called on a non-optional Date object; this should be replaced with a direct function call.
|
Still reproducible in acal 0.4.0 through MCP on macOS 27.2 (26B5091g). Observed in a read-only test:
A couple of source-based details that may help callers until this lands:
This confirms the failure still affects the released 0.4.0 after the permission fix in #11. I have not built or runtime-tested this PR's patch. |
Summary
Fixes a crash in
acal events listcaused by duplicatecalendarItemIdentifiervalues returned from EventKit.Root cause
The EventKit-backed list path used
Dictionary(uniqueKeysWithValues:)keyed only bycalendarItemIdentifier. When EventKit returned multipleEKEventvalues sharing that identifier, the command crashed with a fatal duplicate-key error.What changed
occurrenceStartfor EventKit list resultsRepro
Previously this could fail with:
Verification
swift buildswift build -c releaseswift test --parallelcould not be completed in this environment becauseXCTestwas unavailable to SwiftPMNotes
I did not attach this work to a shared
tdissue because this public repo does not appear to include a sharedtdproject database;.todos/and.td-rootare gitignored and local-only.