openvibers/openvibe.shared Commits
Shared 3.0.1: the bell and the release watcher resume from Events' cursor and dedupe by event_id (#57)
OP OpenVibers committed 10 Oct 2026 · tag v3.0.1 · 0 files, +0 −0
Plan T7, ADR-042 decision 7: nothing in Shared reads Events' numeric `seq` as a position any more, so Events can stop accepting one. - **`notification-live.js` (the bell's realtime feed):** - It resumes from the opaque cursor: `last_event_id` is the last SSE id Events sent, handed back as it came. Before, it was a number read from the message data, which a cursor-only Events no longer accepts. - A replay after a reconnect is dropped by `event_id` (the last 256 heard), not by position. - `state()` reports `lastId` in place of `lastSeq`; `restart()` forgets both the cursor and the ids. - **`release-watch.js`:** it already resumed from the cursor (2.21.2); now it drops a replay by `event_id` alone. Its 5 KB brotli budget still holds. - **Older pins:** a bell on an older pin keeps working after Events changes. Its reconnect starts at the head, and the count poll (every 2 min while open, 15 s otherwise) fills in. 3.0.1. Tests: the fake streams send cursor ids (the format Events emits; the clients never parse them). - `notification-live.test.js`: - a replay of the same event is ignored; - `lastId` is the cursor; - every reconnect (failure, `online`, shown again) resumes from it. - `notification-live-chrome.test.js` (real Chrome against a fake Network and Events): the fake Events emits and resumes from cursors, and replays only for a cursor. - `release-offline-resume.test.js`: the resume URL carries the cursor. `ov test`: 17 reached, all green.
This commit has no diff to show.