2026-09-26·par Sijie Wang#standmeet#architecture#design

idempotent-booking

Idempotent booking, write-only retry

Parent: connector

Calendar events.insert is non-idempotent: if the connection drops after Google created the event but before the response, a blind retry double-books. So the idempotency key is generated once, before any retry loop, and reused across the 401-refresh + retry cycle; and the write retry policy only retries pre-send transport errors, never 5xx (which may already have succeeded server-side) — it fails gracefully instead (plugin/adapters/openapi_adapter.go — newIdempotencyKey, one per InsertEvent call; the CalDAV block mints its own random UUID as the VEVENT UID per insert, infra/plugins/caldav/caldav-plugin.js; plugin/adapters/retrypolicy.go calendarWritePolicy. The old connector/calendar.go was deleted on 2026-06-27, bca9b1c69).

Related: bookings are an append-only quota ledger (ephemeral-over-stateful); a revoked OAuth grant is a soft disconnect (clear tokens, keep client id/secret so the owner can re-authorize without re-setup).

à propos de cette entrée

L'une des entrées de wiki de sijie. L'IA sur ce site est fondée sur le même corpus et répond à la voix de sijie, avec citations revenant à des entrées comme celle-ci — répondre coûte argent à sijie, donc cela attend derrière un code : entrer un code d'accès →

idempotent-booking — Sijie Wang