Google return path: events.watch, renewal, nightly reconcile, echo-loop prevention
- Lenguaje dominante
- HTML
- Estrellas
- 0
- Forks
- 0
- Merge medio
- 2 h 48 min
- PR fusionados (30 d)
- 4
Descripción
The only loopable edge. Orrey is a reconciler: changes made directly on the Orrey calendar (a GM dragging a session) flow back to D1, and D1 remains the source of truth.
- [ ] `events.watch` on the Orrey calendar with a webhook route on the Worker. The push carries **no body**; it is a signal to list changes with `syncToken`. Because `syncToken` is incompatible with `timeMin`/`q`/`privateExtendedProperty`, list the whole calendar — that is why Orrey has its own.
- [ ] Daily cron (`0 4 * * *`): renew watch channels (7-day TTL, no auto-renew). Track channel id / expiry in `settings`.
- [ ] Nightly cron (`30 5 * * *`): full reconcile — list all events, compare fingerprints against `calendar_links`, because `events.watch` is not 100% reliable.
- [ ] **Echo-loop prevention:** an inbound change whose content fingerprint matches what Orrey last wrote is ignored. A real change updates the session, posts a reschedule notice in the thread, re-projects Discord (new event if lapsed) — and re-fingerprints so the resulting Google update is recognised as our own.
- [ ] Deleted-in-Google → mark the session's calendar link as missing and re-insert (D1 wins); never cancel a session from Google.
- [ ] Google attendee `responseStatus` doesn't RSVP for anyone — never read it as intent.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.