GeezerVison is showing github.com — test(id-sync): five-node bridge-relay PoC for #2249 by dezren39 · Pull Request #13454 · developing-today/code
Conversation
dezren39
commented
Nov 23, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Five-node bridge-relay proof of concept for #2249, on the #2036 protocol v1 design (merged in #3833) and the #3796 relay-envelope machinery (merged in #13076). Experimental only — explicitly NOT the permanent feature; no production code changes.
Carries forward lane xaltha's harness commits (be5ce74..58584b6) onto current main, with two carry fixes: the test-suite-registry merge (both bridge_live.rs and relay_poc.rs rows kept) and the missing ed25519-dalek dev-dependency for the harness's signing keys.
Harness
pkgs/id/crates/id-sync/tests/relay_poc.rs — five in-process Iroh endpoints: {A, B, C, D} mutually visible plus E reachable only through D (application-layer firewall enforced by sender neighbour sets: only D ever dials E). Chained-class messages over the /id-chained-relay/1 ALPN; each relay's gate validates before forwarding; the PoC's forwarding sink (deliver locally, then fan out to visible neighbours excluding the arrival neighbour) lives in the test and is disposable by design.
Acceptance (#2249)
- 5 in-process endpoints, E firewalled from all but D at the app layer
- A's chained message reaches E via D with a verifiable hop chain; tampered copy refused at ingest (
tampered_copy_is_refused_in_five_node_topology)
- Duplicate copies (two bridges) collapse to one delivery (
two_bridges_collapse_to_one_delivery)
- Latency numbers recorded (direct A→B median 17.9 ms vs bridged A→D→E median 242 ms over 20 messages, loopback; per-send connection setup dominates the bridged path)
- Report at
doc/2026-11-23T12-42-00Z_poc_bridge_relay_2249/…md, linked from id: design: ID messaging/relay protocol v1 #2036; PoC stated as NOT the permanent feature
Test evidence
cargo test --manifest-path pkgs/id/Cargo.toml -p id-sync --test relay_poc → 3 passed, 0 failed on this branch at current main (merge + dev-dep fix).
Closes #2249
Refs #2036, #2035, #2056, #3796
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-23T16:34:25Z",
"session_id": "ses_e5df6c5728fffeEIBayctbTazT",
"lane": null,
"host": "amd",
"worktree": "/home/user/git/fleet/21336-oc-code-07-bridge-relay-poc",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/user/git/fleet/21336-oc-code-07-bridge-relay-poc",
"repo": "developing-today/code",
"branch": "lane/oc-code-07-21336-bridge-relay-poc",
"sha": "a90c712eae37ac5275e52d9e75d4649adc2d12cf"
},
"auth_subject": "agent-next-23-local",
"stamped_by": "fleet 0.1.0 (native)"
}
}

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
In-process {A,B,C,D}+E topology over the #3796 chained-relay ALPN
with an auto-forwarding sink: A reaches E via D, hop chain [D, E],
tampered copy refused at ingest, two bridges collapse to one
delivery at E, direct vs bridged latencies measured (20 messages).
PoC only — no production code changes.
Refs #2249, #2036
five_nodes created one endpoint per node to compute neighbour
addresses, then PocNode::new created a second endpoint per node
and ran the router on it — so every dialled address named a dead
endpoint and E never received anything. Pass the created endpoint
and address into the node instead.
The chain records the path actually taken: D is always the last
relay before E, but the message may reach D directly from A
([D, E]) or via B/C fan-out racing A's direct send ([B|C, D, E]).
Assert the chain ends [..., D, E] with length 2..=3 instead of
demanding exactly [D, E].
Measured on the verification run: direct A->B median 15.098ms,
bridged A->D->E median 192.494ms over 20 messages (loopback,
per-send connection setup dominates the bridged path). Records
the acceptance evidence, the hop-chain finding, and the limits
(sender-set firewall, allowlist frontier, loopback only).
Also wraps one over-long eprintln line in the PoC test.
…to lane/oc-code-07-21336-bridge-relay-poc
# Conflicts:
# .github/test-suite-registry.json
…oC harness
The relay_poc test signs chained envelopes with SigningKey; the
dependency was missing after the merge onto current main.
Warning
Review limit reached
You'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 44 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available.
Learn how review limits work.
Review configuration:
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
c607990b-ddda-44c4-8f57-19fae76ea9e4
Commits
-
Reviewing files that changed from the base of the PR and between b508d40 and a90c712.
Files selected for processing: 4
-
.github/test-suite-registry.json
doc/2026-11-23T12-42-00Z_poc_bridge_relay_2249/2026-11-23T12-42-00Z_poc_bridge_relay_2249.md
pkgs/id/crates/id-sync/Cargo.toml
pkgs/id/crates/id-sync/tests/relay_poc.rs
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-23T16:37:58.030060Z |
a90c712 |
PR opened |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 23, 2026
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a90c712eae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Comment on lines
+376
to
+378
|
|
assert!(
|
|
|
hops.len() == 2 || hops.len() == 3,
|
|
|
"hop chain at E must be [D, E] or [B|C, D, E], got {hops:?}"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accept valid four-hop paths in the delivery assertion
When B's fan-out reaches C before A's direct send, and C's fan-out reaches D before the competing sends, E can legitimately receive the chain [B, C, D, E]. The configured topology permits that route and DEFAULT_MAX_HOPS is 4, but this assertion rejects it, making the integration test fail on valid relay behavior depending on connection scheduling. Allow both B and C in the prefix while retaining the D/E suffix and hop-chain verification.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Comment on lines
+421
to
+425
|
|
wait_for_delivery(e, &id).await;
|
|
|
assert_eq!(
|
|
|
e.delivered_count(&id),
|
|
|
1,
|
|
|
"E must deliver message {sequence} exactly once despite two bridges"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Await both bridge transmissions before checking duplicate collapse
If the second bridge's transmission to E is delayed or fails, this test still passes: wait_for_delivery returns after the first arrival, while ForwardingSink launches bridge-to-E sends as detached tasks and ignores their outcomes. The subsequent protocol.forwarded() checks only count inbound gate acceptance at D and D2, not successful transmissions to E. Consequently, the test does not establish that E received two copies and can also miss a duplicate delivered after the assertion. Track and await both bridge-to-E transmissions before asserting exactly one local delivery.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Comment on lines
+335
to
+337
|
|
let started = Instant::now();
|
|
|
for target in [b, c, d] {
|
|
|
let outcome = forward_message(&a.endpoint, target.addr.clone(), &msg).await;
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Control injection timing before comparing relay latency
When D receives A's direct copy, E's measured latency includes the completed A→B and A→C exchanges because these sends are awaited sequentially after the common start timestamp; B's baseline includes neither preceding exchange. When automatic fan-out wins instead, E's measurement can follow a different, longer route. These samples therefore do not isolate direct versus bridged latency, yet the report labels them A→B versus A→D→E and treats the ~12.7× ratio as a durable connection-setup result. Measure controlled routes with equivalent injection timing, or report these numbers as dissemination times under this particular send schedule without attributing the ratio to bridge overhead.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
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.
|