Repository navigation
fix(chat): catch up resumed sessions by persisted cursor - #95
Conversation
|
Review fixes are in 059fe34: run-scoped response evidence covers terminal-before-persistence, file-only catch-up refreshes metadata without overwriting newer RPC choices, replacement observer streams restore registrations/roster, and bounded byte-offset indexes avoid rescanning unchanged history per page. Verified: 763 local tests passed (one existing platform skip), typecheck/lint/production build passed, and Linux + Windows CI are green. Re-ran the real-browser offline/reconnect scenario through actual HTTP/SSE with a controlled native NDJSON fixture: all missed IDs recovered, no confirmed-prefix resend, quiet partial restored without a new token, final answer once, zero page errors. A physical 270 MiB history benchmark read only page bodies on later requests and zero message bytes for a completed cursor. Matching fork review-only PR: andrebrait/ompweb#24. Updated Copilot and CodeRabbit reviews requested there. No deployment performed. |
|
Final head 3e5c24d passes Linux and Windows CI. Updated review findings are resolved: atomic complete-history publication, safe full-load precedence after truncation, retryable failed state reads, and ID-only pre-prompt boundaries. Mutable-file index rebuilds remain deliberately correctness-first because growth cannot certify an unchanged prefix; that tradeoff is documented. The reviewed feature was integrated with the existing local queue/dialog patch stack and deployed locally from clean deploy/integration commit 371892f. Integration verification: 818 passed, one existing platform skip; typecheck/lint/production build passed; real browser retained a 410-entry complete history while replacement page two was held. Public frontend consumed the cursor API while the existing native run remained active. Matching frontend/API deployed, native executable unchanged, old RPC owners preserved until they drain. Fork review mirror remains unmerged. |
Summary
Follow-up to merged #94 and #61: a reconnected stream could deliver new tokens while silently omitting messages saved during the gap.
context?sync=1catch-up using persisted entry IDs, with branch/compaction reset fallback and page-only blob resolution.No WebSocket switch, native OMP upgrade, SDK import, new dependency, or replay journal.
Verification
npm test: 744 passed, 1 existing platform-specific skip.Deployment
Frontend and API support must be deployed together. This change is not deployed yet.