Repository navigation
Wire v2: ordered revisions, stream reset and complete delta delivery #174
Copy link
Copy link
Closed
Labels
P1Required next for reliable reactive delivery and operationsRequired next for reliable reactive delivery and operationsbackendBackend/server relatedBackend/server relatedbugSomething isn't workingSomething isn't workingsdkPython, JavaScript and Rust clients and CLIPython, JavaScript and Rust clients and CLI
Milestone
Description
Problem
The subscription registry advances its sequence and adopts a refreshed view before delivery can reject an oversized delta. Concurrent notification publishers also allocate sequence numbers separately from buffering and sending. An error without invalidation can leave an idle subscriber permanently stale.
Evidence
Source: 5c1f313379a5cb2995a43a66ddba0b5cc9798b7f (inspected 2026-10-03). These are source findings; the acceptance scenarios below still need implementation and execution.
- src/protocol/subscription/registry.rs:246: Sequence allocation happens when accepting refresh, before transport.
- src/protocol/rest/handlers/ws.rs:925: Oversized deltas are replaced by subscription_error.
- src/protocol/handler.rs:394: Sequence allocation, buffering and broadcast are separate operations.
- src/protocol/handler.rs:848: The second notification publication path has the same ordering.
Acceptance criteria
- W04: define stream epoch, subscription generation and committed-revision cursor; global notification and subscription-delta sequences remain separate domains.
- Make initial snapshot/live handoff and concurrent publication ordered. Retained-ring loss, overflow or restart with overlapping numeric sequences requires an explicit reset and a fresh authoritative snapshot.
- W05: send oversized snapshots/deltas as one bounded logical revision with begin/end, or invalidate/reset before continuing from undeliverable state. Receivers apply only complete revisions.
- Bound queue bytes and isolate slow readers; partial send, duplicate/missing chunk and a disconnect cannot leave a client silently divergent, even if no later write arrives.
- Test concurrent publication, commits during subscribe, restart, >MAX_MESSAGE_SIZE payloads and revocation during replay through real WS/SDK paths. Preserve the final credential fence and pass Performance: baseline and mandatory pre-PR regression pipeline #163.
Delivery
Plan item: G2 (W04–W05). R2 - Atomic programs + wire protocol.
Dependencies / related work: #171, #170, #137, #165, #172; SDK recovery adoption in inputlayer/inputlayer-clients#2.
Metadata
Metadata
Assignees
Labels
P1Required next for reliable reactive delivery and operationsRequired next for reliable reactive delivery and operationsbackendBackend/server relatedBackend/server relatedbugSomething isn't workingSomething isn't workingsdkPython, JavaScript and Rust clients and CLIPython, JavaScript and Rust clients and CLI
Activity
test(e2e): require ordered notifications, restart replay gap and raci…
docs(ws): document stream epochs, replay_gap and subscription revisions
fix(ws): stop pushes for a knowledge graph whose access was revoked
feat(ws): ordered notification stream with epoch cursor and revision-…
feat(ws): ordered notification stream, epoch cursor and revision-tagg…
feat(ws): request IDs, per-connection pipelining, deadlines and real …
jsam commentedon Oct 4, 2026
Engine side delivered by #215 and #222 (ordered revisions, subscription_reset, bounded complete delivery). SDK adoption tracked in inputlayer/inputlayer-clients#2.