openvibers/openvibe.sdk Commits
openvibe-sdk 0.43.0: no sequence number from Events (#40)
OP OpenVibers committed 11 Oct 2026 · tag v0.43. · 0 files, +0 −0
Plan T7, ADR-042 decision 7, the last step: OpenVibe.Events hands out no sequence number (Contracts 0.136.x). The client follows. **Breaking** only for code that read `seq`, and nothing in the estate does (checked across every repository).
- **`publish()`:** answers `{ event_id, cursor, duplicate }`. A repeat whose stored copy retention removed is `{ event_id, duplicate: true, pruned: true }`.
- **Reads:** `pull()`/`iterate()` items and `get()` are `{ cursor, event }`.
- **Realtime:** callbacks get `{ cursor }`; dedupe stays on `event_id`, inside the client.
- **`parseDelivery()`:** `{ event, subscriptionId, attempt }`.
- **Outbox kits (SQLite and PostgreSQL):** no longer record a sequence number from the publish answer. A table's old `seq` column stays empty, and the PostgreSQL update is one `WHERE id = ANY(...)`.
- **Mock Events:**
- publish answers carry the event's cursor (they had no cursor before);
- pages, single reads and SSE data carry no `seq`;
- deliveries are `{ event }` without `X-OpenVibe-Seq`.
- `platform.publishEvent()` (the mock's own API) still returns the stored `seq`, so tests can build a cursor.
- Types, README, CHANGELOG, STATUS, `SDK_VERSION`, browser bundle.
**Tests:** positions are read from the mock's cursor with a test-only helper.
- `events.test.js`:
- a publish answer has a cursor and no `seq`;
- items and single reads are `{ cursor, event }`;
- a delivery carries no sequence number (body or header);
- delivery order is checked by subject.
- `realtime.test.js`: callbacks carry no `seq`; replays are deduped by event id.
- `pg-outbox.test.js`: nothing is recorded in `seq`.
`ov test`: green.
This commit has no diff to show.