GeezerVison is showing github.com — id: protocol v1 phase 3 — relay envelope + hop records over iroh-gossip for chained messages (#2036) · Issue #3796 · developing-today/code
id: protocol v1 phase 3 — relay envelope + hop records over iroh-gossip for chained messages (#2036) #3796DescriptionPhase 3 of the #2036 protocol v1 synthesis, from the #2035 investigation (PR #2246, doc/2026-10-29T11-05-00Z_investigation_multi_hop_relay_and_p2p_media). Implement the relayed-message envelope for the chained/permanent class over iroh-gossip: validity = origin signature only (over content, prev-references, group, sequence); each relay appends a signed hop record OUTSIDE the signed envelope (relay ID, previous hop, receipt time) as audit/loop control; receivers dedupe by message ID. Topic = derived from group ID; bootstrap from known member addresses + the existing gossip discovery topic. Safe default until #2033 lands: relay only for groups the relay belongs to, only traffic passing its own ingest. Media paths are out of scope (direct mesh / selective forwarder are constraints, not this build). Acceptance: two members with no direct connection exchange chained messages via a bridging member in tests; forged/altered relayed messages are rejected; duplicates are suppressed. Activitydeveloping-today commented on Nov 1, 2026 dezren39 commented on Nov 2, 2026 dezren39 commented on Nov 2, 2026 🤖 Agent note · blocked (packet defect)
dezren39 commented on Nov 23, 2026 🤖 Agent note · picked up — next slice: live call-site wiring of the relay gate
- Agent: archer, Lane FA (sandbox fix lane), via shortlist (
fleet agent next)
- Issue: id: protocol v1 phase 3 — relay envelope + hop records over iroh-gossip for chained messages (#2036) #3796 (stays OPEN unless full acceptance is met)
- Fresh revalidation (2026-11-23): id: protocol v1 phase 3 — relay envelope + hop records over iroh-gossip for chained messages (#2036) #3796 OPEN, no held/user-owned labels. Part A types landed (PR id-sync: chained-message relay envelope + signed hop record types (#3796 part A) #10785), part B relay gate landed (PR feat(id-sync): validate-before-forward relay gate for chained messages (#3796 part B) #10804) incl. gate-level multi-node bridge test. No open PR, no live claim since 2026-11-16.
- Remaining per PR feat(id-sync): validate-before-forward relay gate for chained messages (#3796 part B) #10804's own record: (1) live call-site wiring — gossip/ingest arrivals routed through
RelayGate::decide; (2) signed-graph-backed MembershipFrontier (open design point, not this slice).
- This slice: wire chained-message arrivals at the ingest call site through the gate, with tests (forged dropped at ingest, valid forwarded with hop appended, duplicate suppressed). If no live ingest path exists yet in-tree, land the ingest adapter the gate's module doc describes and name what remains.
dezren39 commented on Nov 23, 2026 🤖 Agent note · progress — live call-site wiring landed as PR #12939
- Agent: archer, Lane FA (sandbox fix lane)
- PR: feat(id-sync): wire the chained-message relay gate into live ingest (#3796) #12939 —
relay_ingest module in id-sync: ChainedRelayProtocol (Iroh handler on the new /id-chained-relay/1 ALPN) strictly decodes every arrival and runs it through RelayGate::decide before delivery or forwarding; ChainedSink is the host seam; forward_message is the sender half.
- Acceptance exercised at the live call site (real Iroh connections, laptop worktree off origin/main): origin → bridge → leaf exchange with identical message ID and both hops in order; forged message refused at ingest, never delivered; non-member origin refused at ingest; duplicate arrival suppressed (delivered exactly once). Full id-sync lib suite 225 passed / 0 failed; fmt clean; clippy clean for the new module.
- Remaining on id: protocol v1 phase 3 — relay envelope + hop records over iroh-gossip for chained messages (#2036) #3796: the signed-graph-backed
MembershipFrontier (the authoritative membership point is still open design, per the gate module's record). The gate and this wiring are built so that frontier swaps in behind the existing trait without changes.
dezren39 commented on Nov 23, 2026 🤖 Agent note · slice complete — PR #12939 MERGED (8a629fc71de)
- Agent: archer, Lane FA (sandbox fix lane)
- Landed: live call-site wiring for the relay gate —
pkgs/id/crates/id-sync/src/relay_ingest.rs (+419/−3 across 3 files incl. the lib.rs registration and the relay_gate doc correction). relay_ingest.rs verified present on main post-merge.
- Verification: full id-sync lib suite 225 passed / 0 failed on the laptop (nix develop, worktree off origin/main); the four new live-connection tests pass by name;
cargo fmt clean; clippy exit 0 with no warnings in the new module.
- id: protocol v1 phase 3 — relay envelope + hop records over iroh-gossip for chained messages (#2036) #3796 stays OPEN. Remaining slice, named: back
MembershipFrontier with the signed-graph membership state — the authoritative membership point is still open design (recorded in the relay_gate module doc). The trait seam means that work changes neither the gate nor this wiring. Whoever takes it should also re-check the issue's end-to-end acceptance wording against the gate-level + ingest-level bridge tests now in tree.
dezren39 commented on Nov 23, 2026 🤖 Agent note · picked up — next slice: graph-backed MembershipFrontier
- Agent: archer, Lane HL (sandbox fix lane), via
fleet agent next on parent epic epic: ID platform expansion — apps, comms, currency, hosting, boards (2026-10-28 directive, LIST 6–15) #2056
- Issue: id: protocol v1 phase 3 — relay envelope + hop records over iroh-gossip for chained messages (#2036) #3796 (stays OPEN unless full acceptance is met)
- Fresh revalidation (2026-11-23): id: protocol v1 phase 3 — relay envelope + hop records over iroh-gossip for chained messages (#2036) #3796 OPEN, no live claim on this slice (Lane FA's wiring slice completed 05:27Z, PR feat(id-sync): wire the chained-message relay gate into live ingest (#3796) #12939 merged). FA's named remainder is this slice: back
MembershipFrontier with the signed-graph membership state.
- Scope (one PR): a
GraphFrontier in id-sync implementing MembershipFrontier over the shared event store, answering from EventStore::roster — the resolved membership state (the same read local_events gates document writes on; removed members are absent from it). Identifier mapping per the graph's own types: envelope origin is the hex of the author's verifying key (AuthorKey); envelope group is the hex of the group ID (the BLAKE3 hash of its group.create event, AuthId::Group). Fail-closed throughout: unparseable IDs, unknown groups, and store errors authorize nobody. The membership point is the store's resolved state — the snapshot the store can offer today (frontier-historical resolution stays with the membership layer's pinned expander, per the writer-set module doc). Gate and ingest wiring unchanged (the trait seam FA landed).
- Tests: unit tests for the mapping/fail-closed behaviour plus an integration test against a real store whose group roster is built from signed membership events (founder + added member authorized; stranger and removed member refused), and a gate-level test driving
RelayGate with the graph frontier.
dezren39 commented on Nov 23, 2026 🤖 Agent note · slice complete — PR #13011 MERGED (369e7ccc0039); issue REOPENED after an auto-close accident
- Agent: archer, Lane HL (sandbox fix lane)
- Auto-close correction: merging PR id-sync: graph-backed MembershipFrontier over the resolved roster (#3796) #13011 closed this issue because the PR body's negated sentence ("does not close id: protocol v1 phase 3 — relay envelope + hop records over iroh-gossip for chained messages (#2036) #3796") still matches GitHub's close-keyword parser. The frontier slice is landed, but the acceptance remainder below is real, so I have reopened the issue. The closure was not a verdict.
- Landed:
pkgs/id/crates/id-sync/src/graph_frontier.rs — GraphFrontier, a MembershipFrontier backed by the signed-graph membership state: it wraps the node's shared event store and answers from EventStore::roster (the resolved fold of the group's signed membership operations; removed members absent). Verified present on main post-merge. Identifier mapping is the graph's own (origin = hex of the author's verifying key; group = hex of the group ID, the BLAKE3 hash of its group.create event). Fail-closed on unparseable IDs, unknown groups, and store errors. Membership point = the store's resolved state, recorded in the module doc; gate + ingest wiring unchanged. relay_gate/relay_ingest docs updated to record the backing as landed.
- Verification:
cargo test -p id-sync --lib graph_frontier 4 passed / 0 failed (roster membership incl. add; removed member refused; malformed IDs authorize nobody; gate-level test over a real store built from signed membership events). Full id-sync lib suite 229 passed / 0 failed. cargo fmt clean; clippy exit 0 with no diagnostics in the changed files.
- id: protocol v1 phase 3 — relay envelope + hop records over iroh-gossip for chained messages (#2036) #3796 stays OPEN. Remaining, named: the end-to-end acceptance re-check FA flagged — the issue's acceptance wording (two members with no direct connection exchanging chained messages via a bridging member; forged/altered relayed messages rejected; duplicates suppressed) re-verified against the gate-level + ingest-level bridge tests now in tree, ideally with the graph frontier in the loop in place of the allowlist. Phase 4 (id: protocol v1 phase 4 — retention and compaction for the event store (#2036) #3797, retention/compaction) is the sibling remainder on the id: design: ID messaging/relay protocol v1 #2036 line.
dezren39 commented on Nov 23, 2026
🤖 Agent note · claimed — Lane JW (archer, sandbox fix lane)
dezren39 commented on Nov 23, 2026
🤖 Agent note · acceptance re-check complete — Lane JW (archer, sandbox fix lane)
Landed: PR #13076 MERGED (d3bec26356c4), head-SHA guarded at 4c32bf48680. The ingest-level acceptance scenarios now run a second time with the graph-backed frontier in the loop — the remainder HL's record named. New tests in relay_ingest.rs (verified present on main): bridge_then_leaf_exchange_with_graph_frontier, removed_member_origin_is_refused_at_ingest_with_graph_frontier, duplicate_arrival_is_suppressed_at_ingest_with_graph_frontier. Each relay's gate reads authorization from a real event store holding the group's signed membership operations, replicated to both relays; the removed-member refusal state is the fold of the signed create + remove operations themselves.
Acceptance criteria from the body, mapped to evidence (full id-sync lib suite on the merged head state: 246 passed / 0 failed; clippy finished with zero diagnostics in the changed file; cargo fmt applied):
- Two members with no direct connection exchange chained messages via a bridging member — gate level:
bridge_forwards_across_two_relays_with_identical_envelope (relay_gate); ingest level over live Iroh connections: bridge_then_leaf_exchange_over_live_connections (allowlist backing) and bridge_then_leaf_exchange_with_graph_frontier (graph backing) — envelope byte-identical end to end, both hops appended in order, verify_envelope + check_hops pass.
- Forged/altered relayed messages are rejected —
forged_envelope_is_refused_before_any_forward (gate) and forged_message_is_refused_at_ingest_and_never_delivered (ingest). Forgery refusal happens on signature verification before the frontier is consulted, so it is backing-independent; the graph backing changes only the authorization read.
- Duplicates are suppressed —
second_path_dedupes_while_forks_forward (gate), duplicate_arrival_is_suppressed_at_ingest and duplicate_arrival_is_suppressed_at_ingest_with_graph_frontier (ingest): second arrival delivers nothing new.
- Safe default (relay only for groups it belongs to / can authorize) —
non_member_origin_is_refused_and_never_deduped_in + bridge_stops_when_the_bridge_relay_does_not_authorize_the_origin (gate), non_member_origin_is_refused_at_ingest (ingest), and with the graph backing: removed_member_origin_is_refused_at_ingest_with_graph_frontier plus the graph_frontier suite (resolved roster only; removed member refused; malformed IDs authorize nobody; production gate driven over a real store).
Every criterion is demonstrably met on current main, so I am closing this issue as completed with this record. The sibling remainder on the #2036 line is #3797 (phase 4, retention/compaction), separately tracked and claimed.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|