docs: SYNC.md — full email action lifecycle (D3) #54

Merged
guettlibot merged 1 commits from task/d3-sync-doc into main 2026-05-14 10:01:27 +00:00
guettlibot commented 2026-05-14 09:31:50 +00:00 (Migrated from codeberg.org)

Summary

  • New SYNC.md file covering what DB-SYNC.md skips: the runtime sync lifecycle
  • Documents the IMAP IDLE loop, JMAP SSE push/poll, pending-change queue, exponential backoff (5→900 s), and undo/cancel mechanism
  • Includes ASCII flow diagrams for the mutation lifecycle, IMAP loop, and JMAP loop
  • Links back to DB-SYNC.md for schema details

Contents

  1. Component overview (table)
  2. Email mutation lifecycle (tap → optimistic update → pending_changes → flush → server ack)
  3. IMAP sync loop (IDLE, incremental, checkpoint)
  4. JMAP sync loop (state tokens, SSE push, poll fallback, send)
  5. Exponential backoff table
  6. pending_changes queue structure
  7. Undo/cancel sequence (cancel-in-queue vs compensating-move)
  8. Key invariants

🤖 Generated with Claude Code

## Summary - New `SYNC.md` file covering what `DB-SYNC.md` skips: the runtime sync lifecycle - Documents the IMAP IDLE loop, JMAP SSE push/poll, pending-change queue, exponential backoff (5→900 s), and undo/cancel mechanism - Includes ASCII flow diagrams for the mutation lifecycle, IMAP loop, and JMAP loop - Links back to `DB-SYNC.md` for schema details ## Contents 1. Component overview (table) 2. Email mutation lifecycle (tap → optimistic update → pending_changes → flush → server ack) 3. IMAP sync loop (IDLE, incremental, checkpoint) 4. JMAP sync loop (state tokens, SSE push, poll fallback, send) 5. Exponential backoff table 6. pending_changes queue structure 7. Undo/cancel sequence (cancel-in-queue vs compensating-move) 8. Key invariants 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.