Per-server coordinator scaffolding with NO network activity. Owns lifecycle
state, a lifecycle epoch to reject stale async continuations, a bounded inbound
WebSocket event buffer, and a single durable retry timer per server that
reconstructs itself from the DraftOutbox — its fire callback sends nothing
(self-rescheduling heartbeat; Phase 4 adds draining at the marked call sites).
- Add draft sync timing constants (retry base/max/jitter, absence-confirmation
delay, reconciliation deadline, snapshot-stale TTL, max event buffer).
- New app/managers/draft_sync_manager: narrow API (initialize, wake,
requestReconcile, enqueueWebSocketEvent, handleCapabilityChange, invalidate).
invalidate is synchronous (epoch++, cancel timer, clear buffer, disable).
Retry-eligible = Pending/ConfirmingDelete. Missing/destroyed DB never throws.
handleCapabilityChange suspends/resumes without deleting durable rows.
Checks: npm run tsc clean; eslint --quiet clean; 10 manager tests pass. Verified
no network/client imports.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>