refactor: canonicalize calendar external identity #388

Closed
opened 2026-05-12 13:17:40 +00:00 by barrettruth · 0 comments
Owner

Problem

Imported calendar identity is currently derived inside iCal import code from UID and recurrence ids, while external task links provide the shared persistence surface. Google Calendar sync will need the same identity rules, and keeping the derivation route-local makes it easy for iCal and Google to diverge.

Solution

  • Extract a small calendar external-identity helper for provider id, upstream event id, and recurrence instance identity.
  • Keep iCal import behavior unchanged while moving identity construction out of the import orchestration.
  • Add focused tests for master events, recurring instances, and provider-specific external link ids.
  • Leave the helper narrow enough that Google sync can reuse it without adding sync behavior in this PR.

Non-goals

  • Do not implement Google Calendar sync.
  • Do not change the existing imported task shape.
  • Do not add legacy compatibility branches except for a one-way migration if a schema change proves necessary.

Part of #355 and prepares #123.

## Problem Imported calendar identity is currently derived inside iCal import code from UID and recurrence ids, while external task links provide the shared persistence surface. Google Calendar sync will need the same identity rules, and keeping the derivation route-local makes it easy for iCal and Google to diverge. ## Solution - Extract a small calendar external-identity helper for provider id, upstream event id, and recurrence instance identity. - Keep iCal import behavior unchanged while moving identity construction out of the import orchestration. - Add focused tests for master events, recurring instances, and provider-specific external link ids. - Leave the helper narrow enough that Google sync can reuse it without adding sync behavior in this PR. ## Non-goals - Do not implement Google Calendar sync. - Do not change the existing imported task shape. - Do not add legacy compatibility branches except for a one-way migration if a schema change proves necessary. Part of #355 and prepares #123.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/delta#388
No description provided.