Skip to main content

Module sync

Module sync 

Source
Expand description

Handler error: normal envelopes + Effect HttpApi tagged decode errors (freeze parity: ?before= → body exactly {“_tag”:“BadRequest”} §1090). Legacy→ocserve delta sync (development bridge; user: “development machinery until the final migration”). Additive-only: pulls messages/ parts for sessions that exist in BOTH databases, emits live SSE so an open oc-remote view updates, refreshes session title/time (legacy wins for imported sessions — documented divergence, TESTING §1.6).

Safety: legacy is opened READ-ONLY (store::open_legacy_ro), fail-soft (missing/locked legacy → Err for the caller to log, never panics), kill switch OCSERVE_LEGACY_SYNC=0, path override OCSERVE_LEGACY_DB.

Structs§

SyncStats

Constants§

GLOBAL_CAP
SESSION_CAP

Functions§

legacy_db_path
sync_enabled
sync_tick
One sync pass (env-configured source). Err = source unavailable (caller logs + error metric).
sync_tick_at
One sync pass against an explicit source path (tests use this — no env).