Repository navigation
Transport: protocol v2 codec, socket, connection and timers (DEV-1150 part B) - #49
Merged
Merged
Conversation
Adopt the envelope at its own seq when the upload covered every row; settle as a conflict (local content to recovered) when uncovered rows remain, since the upload content is not known and a rebase would duplicate or fail.
This was referenced Sep 28, 2026
adamski
changed the base branch from
adam/dev-1150-replicant-redesign-23-implement-the-single-owner-connection
to
main
September 29, 2026 21:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DEV-1150 part B: the v2 transport layer that the driver loop (part C) will use to run the sans-IO core against a real websocket. Stacked on #48 (part A, engine core). Merge #48 first.
What's in it
doc.seq == change.seq). A newer page envelope never re-applies the covered delta. With no other pending rows it is adopted as-is; with pending rows it takes the conflict path, andRecoverkeeps the local content.Input::ConnectRefused { gen, error }. HTTP 426 halts withupdate_required. Every other refusal backs off.transport::wire: v2 payloads, join HMAC signing,socket_url.JoinAuthderives nothing, so the secret cannot be printed.transport::codec: Phoenix v2 array frames to and from core requests. It matches refs to request kinds.phx_error/phx_closeend the channel, and unreadable replies become transientprotocol_error.transport::socket: one websocket task per generation. Dropping the handle aborts the task, even mid-dial.transport::connection: runs socket effects and drops events from any generation but the current one. It never invents a reply for a dead socket.driver::timers: aDelayQueuewhere rescheduling an id replaces it.wire_contract_testsnow runs the real codec against the server's recorded frames.tests/v2_smoke.rsis an#[ignore]d smoke test against a real v2 server (join, request, heartbeat, 426,auth_invalid).Testing
cargo test -p replicant-client --lib: 289 passed.--test wire_contract_tests: 14 passed.tests/v2_smoke.rsagainst replicant-server dev-1151 (viatest/run_phoenix_interop_local.sh): 3 passed. Normal runs show 3 ignored.