Skip to content

Livestore sync engine migration - #84

Closed
juliusmarminge wants to merge 42 commits into
codething/48364d50from
cursor/livestore-sync-engine-migration-7f06
Closed

juliusmarminge wants to merge 42 commits into
codething/48364d50from
cursor/livestore-sync-engine-migration-7f06

Warn when mirror reports unsuccessful state-event writes

c3975c1
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - Correctness Check completed Feb 20, 2026 in 6m 26s

5 issues identified (112 code objects reviewed).

• Merge Base: e81c2ac
• Head: c3975c1

Details

✅ File Path Comments Posted
✅ README.md 0
✅ SYNC_ENGINE_MIGRATION.md 0
✅ apps/server/src/index.ts 0
❌ apps/server/src/livestore/liveStoreEngine.ts 3
✅ apps/server/src/livestore/materializers.ts 0
✅ apps/server/src/livestore/mirrorBootstrap.ts 0
✅ apps/server/src/livestore/parity.ts 0
✅ apps/server/src/livestore/schema.ts 0
✅ apps/server/src/stateSyncEngine.ts 0
✅ apps/server/src/stateSyncEngineLegacy.ts 0
❌ apps/server/src/stateSyncEngineLiveStoreReadPilot.ts 1
❌ apps/server/src/stateSyncEngineShadow.ts 1
✅ apps/server/src/syncEngineMode.ts 0
✅ apps/server/src/wsServer.ts 0
✅ apps/web/src/routes/__root.tsx 0
✅ apps/web/src/stateSource.ts 0
✅ packages/contracts/src/server.ts 0

Filtered Issues Details

apps/server/src/stateSyncEngineLiveStoreReadPilot.ts
  • line 95: The onStateEvent listener creates an unbounded number of floating Promises by calling this.mirror.mirrorStateEvent(event) without awaiting the result or implementing any concurrency control/backpressure. If the delegate emits events faster than the mirror can process them (e.g., during a catch-up or bulk operation), pending Promises and their associated closures will accumulate indefinitely in memory, leading to a heap Out-Of-Memory (OOM) crash. [ Skipped comment generation ]