Skip to content

ADR 0016: Incremental sync cursors, webhook hints, and instance state

Status

Accepted

Context

Sprint 03 can authorize a mailbox and run checkpointed initial backfill. Sprint 04 Stream A needs ongoing sync that stays correct when Graph (or another adapter) delivers duplicate or out-of-order notifications. Provider callbacks must not become the system of record, and mailbox flags must not clone canonical content.

Decision

Alternatives

Consequences

Workers process INCREMENTAL_SYNC the same way they process SYNC_PAGE. Preview and production stay 503 on /api/webhooks/mail until WEBHOOK_SIGNING_SECRET and DATABASE_URL are set. Reconciliation (MAIL-28) and identity matching (Stream C) remain separate.