The app opens the companion WebSocket in the foreground (ticket from
POST /api/ws-ticket, then wss://.../ws derived from SYNC_API_BASE). A sync
notice asks the scheduler at once; later notices within 20 s fold into one
sync at the end of the window. The fixed 30 s tick skips while the socket is
open and the last sync is under 2 min old.
Reconnection: 1 s doubled, capped at 60 s, +-20 % jitter, reset after 30 s
open; auth_expired takes a new ticket at once; ticket 401 stops until the
next start; ticket 429 waits for the bounded Retry-After. The socket closes
in the background, on sign-out, sync off and canSync false.
syncSocket.ts is pure and import-free (tests/syncSocket.test.mjs under node);
syncSocketClient.ts wires fetch, WebSocket and timers and only calls
scheduleSync. REVIEW.md Haut Sync line and review-levels.py include both.
Refs #175
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>