You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rescheduling or cancelling after a destination change acts on the wrong calendar provider #58
I've searched existing issues and this isn't a duplicate.
This is a reproducible bug in Calnode, not a configuration/setup question or a feature request.
What's the bug?
Rescheduling or cancelling a booking acts on the host's current destination provider, not the provider that holds the event. Service.UpdateEvent and Service.CancelEvent (internal/calendar/calendar.go) both call providerForDestination. Once a host with Google and Microsoft connected moves their destination from one to the other, every older booking's event id is handed to a provider that never issued it:
Google → Microsoft, cancel:DELETE /me/events/<Google event id> on Graph. A 404 is treated as "already gone" (microsoft/events.go), so the booking cancels and the event silently stays on the Google calendar. Any other status is an error the reconciler retries every sweep.
Microsoft → Google:gcal deletes or patches calendars/<stored Microsoft calendar id>/events/<Graph id>. Only 410 counts as already gone, so this errors and the reconciler retries it for as long as the booking row exists.
Reschedule has the same shape: the event stays at its old time and needs_sync never clears.
booking_hosts stores external_event_id and external_calendar_id but not which provider wrote them, so the router has nothing better to go on. CalDAV is the one provider whose id identifies itself (it is the event URL); #56 routes those by id. Google and Microsoft ids are opaque, so they need the provider recorded when the event is created.
Steps to reproduce
Connect Google and Microsoft calendars for one host; make Google the destination.
Book a meeting (the event is created on Google).
Make Microsoft the destination.
Cancel the booking. Following the code path, the cancel goes to the Microsoft client with the Google event id, and the Google event is left in place.
Found by reading the code on main; I have not run this sequence against live Google and Microsoft accounts.
Logs, screenshots, or anything else
Fix direction: record the provider on booking_hosts next to external_calendar_id at create time and route update/cancel by it, falling back to the destination only for rows written before the column existed.
Confirmed on the code path - you're right, and the Google-to-Microsoft silent orphan is the nasty one. Stamping the provider at create time with destination fallback for old rows sounds right. Taking #59 first, then this one.
Activity
pullfrog commentedon Sep 17, 2026
shockalotti commentedon Sep 17, 2026
Confirmed on the code path - you're right, and the Google-to-Microsoft silent orphan is the nasty one. Stamping the provider at create time with destination fallback for old rows sounds right. Taking #59 first, then this one.
fix(calendar): route reschedule/cancel to the provider holding the ev…