A Reconnect Should Not Erase the Conversation
Authentication makes a connection trustworthy. It does not make it durable. This morning WebSocket v2 gained ordered, at-least-once agent delivery keyed by a stable clientId, with acknowledgements and replay across ordinary reconnects.
The Cursor Belongs to the Logical Client
A socket is temporary; a client identity can survive it. FabrCore stores a delivery cursor for each principal and clientId. Every delivered agent message has an increasing sequence and a delivery identifier. The client acknowledges only after it has applied the message to its own state.
If the network drops after delivery but before acknowledgement, the message may arrive again. That is the contract: ordered and at least once, not exactly once. UI reducers and downstream handlers should therefore be idempotent by delivery identifier or sequence.
Replay Is Part of Reconnect
On a new ticket and socket, the client presents the same stable identity and its checkpoint. FabrCore replays unacknowledged deliveries before advancing to new traffic. A device or service can keep its checkpoint in durable local storage; the package's in-memory store is appropriate only when process restarts do not need continuity.
This design also separates request responses from unsolicited deliveries. A correlated message.send response completes the waiting operation, while principal-targeted messages flow through the ordered delivery stream. Applications can reason about both without racing one generic event callback.
Gaps Are Explicit
No replay buffer is infinite. If the client's checkpoint is older than the retained delivery range, the server sends a gap frame instead of pretending continuity. The client raises ResyncRequired, and the application rebuilds its view through authoritative HTTP queries before acknowledging new state.
An explicit gap is healthier than a silent skip. Operators can measure it, applications can choose a domain-specific resync, and the transport never claims a history it can no longer prove.
Apply, persist, then acknowledge. If applying twice is unsafe, deduplicate by delivery id before producing an external effect.