Repository navigation
id: walking skeleton steps 3–4 — the #9106 path between two processes over the transport (#12232) - #12621
Merged
Conversation
added 3 commits
November 22, 2026 15:59
…ge (failing first) The five-step path of substrate_sync_path, restated between two OS processes: node B is this test binary re-executed, holding its own Replica behind the new federation exchange protocol (/id-fed-exchange/1, iroh). The exchange module lands with its wire types and conversions and a permissive body: reconcile_remote moves nothing yet, so the scenario test fails on its assertions — the failing-first state for the session that lands next. Also: Inventory::from_object_versions in b09, so a peer's inventory can be assembled from the summary plus the diverged ids, and the new test registered under id.rust.substrate-path.
reconcile_remote now runs the B09 exchange as a session over the federation exchange protocol: hello and summary/refused exchange, diverged ids, both offers computed from the pre-exchange inventories, versions admitted through the peer's gate in send order — the wire where the direct calls were in the second step. ExchangeProtocol serves the mirror-image session instead of accepting and dropping streams; one session per stream, a failed or stalled session ends that stream, never the endpoint. The transport test loses its spawn probe (it existed to shake out the harness) and records its venue: QUIC/UDP on loopback runs where UDP sends are permitted; the Muse sandbox refuses them (EPERM).
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 22, 2026
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.
Refs #12232 — walking skeleton steps 3–4: the #9106 path between two processes over the existing transport.
The path as composed
substrate_sync_path(step 2) proved the five steps in one process. This slice restates them between two OS processes:Replicain the test process, unchanged from step 2.Replicabehind the new federation exchange protocol (/id-fed-exchange/1, iroh — the transport every other id protocol rides) plus a test-only control protocol.federation/exchange_net.rs) with its wire types and a permissive body, and the scenario test failing on its assertions. Step 4 (commit 3) replaces the permissive bodies with the real session:reconcile_remoteruns the B09 exchange with the wire where the direct calls were — hello (summary + refused), diverged ids, both offers computed from the pre-exchange inventories, versions admitted through the peer's gate in send order.ExchangeProtocol::sessionis the mirror image on the responder side.id://address on A → held in A's store → synced to B over the transport → conflicting record written on B through B's own gate → conflict reported on both nodes — plus resolution on B closing the report on A. Oracles are differential (B reads exactly what A signed; both nodes report the same conflict key/versions/base; the wireExchangenames the same sends and outcomes as in-processreconcile) and metamorphic (a repeated exchange is quiet).Inventory::from_object_versionsin b09, so a peer's inventory can be assembled from the summary plus the diverged ids; the test is registered underid.rust.substrate-path(net registry diff: 5 lines).Stubs and named limits
No stubs remain on the path: the permissive exchange bodies are gone, and the scenario test fails if the exchange moves nothing (see fail-before). Named limits, recorded in the test header: sessions are initiated by A only (the protocol is symmetric; the harness drives one initiator), and both replicas are in-memory — the on-disk store (step B2(b), PR #12497) composes with this transport separately. Node B is reachable only through the two protocols; the control protocol is test-only.
Evidence (laptop, the UDP venue)
The session rides QUIC/UDP on loopback; the Muse sandbox refuses UDP sends (EPERM), so the test's venue is the laptop (and the CI nightly), as its header records.
f2c5f2d97:cargo test -p id-sync --test substrate_transport_path— FAILED; the scenario panicked at the first exchange assertion (exchange.forward.offer.sendwas[], expected the base record's event id).cargo test -p id-sync --test substrate_sync_pathat the tip — 4 passed.cargo check -p id-sync --testsclean; rustfmt clean on both touched source files.No new dependencies (no
Cargo.tomlchanges; the module composes id-sync's existing iroh/serde/anyhow/id-core graph).What remains on #12232
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.