ulysses/core
L1 f8cf791491
fix(caldav): don't prune locally-created events on sync (#2706)
The CalDAV pull prunes events in the synced calendar+window whose UID the
server didn't just return, to propagate upstream deletions. But CalendarEvent
had no field distinguishing a server-pulled row from a locally-created one, so
the prune also deleted events that were never on the server: events created by
the agent / email triage (which never write back to the server) and UI events
whose best-effort write-back failed. Result: silent, unrecoverable loss of the
user's appointments (hard db.delete, no soft-delete).

Add an 'origin' column to calendar_events (lightweight idempotent migration,
mirroring _migrate_add_calendar_is_utc), set origin='caldav' on rows the sync
inserts/updates, and gate the prune on origin == 'caldav'. Locally-created
events carry origin NULL and are never pruned. On the first sync after the
migration nothing is pruned (all rows NULL until re-marked), erring toward
keeping data.

Fixes #2704
2026-06-05 02:48:03 +02:00
..
__init__.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
atomic_io.py Add native Windows compatibility layer 2026-06-01 15:09:47 +09:00
auth.py fix(auth): revoke API tokens when deleting users 2026-06-04 04:44:34 +01:00
constants.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
database.py fix(caldav): don't prune locally-created events on sync (#2706) 2026-06-05 02:48:03 +02:00
exceptions.py Odysseus v1.0 2026-05-31 23:58:26 +09:00
middleware.py Fix email-thread HTML injection, attachment path traversal, and missing authz (#475) 2026-06-01 22:20:17 +09:00
models.py fix: exclude slash-command/setup messages from LLM context (#2634) (#2640) 2026-06-04 21:42:23 +02:00
platform_compat.py [Bash] Fix Windows cookbook background tasks (#676) 2026-06-04 04:30:01 +01:00
session_manager.py Fix truncate_messages persisting an inflated message_count (#2052) 2026-06-04 21:19:16 +02:00