Implement resume { lastEventId } on reconnect. The gateway replays lightweight events the device missed (delivery/read receipts, presence, system events) from a short-lived per-device Redis stream, then instructs the client to run a full envelope sync for messages. Distinguish ephemeral events (Redis) from durable messages (Postgres).
Acceptance criteria:
- Reconnecting client receives missed ephemeral events
- Durable messages fetched via sync, not the resume stream
- Resume is idempotent (no duplicate UI events)
Implement
resume { lastEventId }on reconnect. The gateway replays lightweight events the device missed (delivery/read receipts, presence, system events) from a short-lived per-device Redis stream, then instructs the client to run a full envelope sync for messages. Distinguish ephemeral events (Redis) from durable messages (Postgres).Acceptance criteria: