v0.9.0-rc.21
ADR-062 Phase 2 — moves IrohMeshTransport from peat-protocol into peat_mesh::transport::iroh_mesh and re-exports iroh::EndpointId from peat_mesh::network. peat-mesh is now the canonical home for both the iroh Endpoint wrapper (IrohTransport, moved in rc.18) and the iroh-backed MeshTransport trait impl (this release). The peat consumer-side PR (defenseunicorns/peat#926) deletes peat-protocol/src/transport/iroh.rs and drops iroh, iroh-blobs, iroh-mdns-address-lookup from peat-protocol's direct dep section in peat 0.9.0-rc.15. No transport semantics or wire-shape changes — this release is the structural relocation that closes the SKILL.md transport-agnosticism gate (no use iroh:: lines in peat-protocol/src outside the re-export shim).
Validation
- 1658 lib tests pass (1648 pre-existing + 10 new in
transport::iroh_mesh::tests). - Migrated
tests/dual_active_simultaneous.rs(3 tests) passes against the new canonical surface. cargo clippy --features automerge-backend --all-targets -- -D warningsclean.- Bidirectional surface-tier proof:
test_two_iroh_mesh_transports_real_connectexercises the round-trip nature of connect ↔subscribe_peer_eventsagainst two realIrohTransport::bind("127.0.0.1:0")endpoints — covers the most likely class of transport-tier regression (mapping inversion, accept-loop ordering, ALPN mismatch). - End-to-end validated on rpi-ci + rpi-ci2 + laptop (192.168.228.0/24): all four QUICKSTART scenarios converge cleanly against this release's surface, transitive gossip working across heterogeneous hardware (x86_64 laptop + aarch64 Pi 5s).
Added — ADR-062 Phase 2 (defenseunicorns/peat#926)
peat_mesh::transport::iroh_mesh::IrohMeshTransport— iroh-backed [MeshTransport] implementation. Wrapspeat_mesh::network::iroh_transport::IrohTransportand provides the trait interface thatTopologyManager,TransportManager, and PACE routing consume. Replacespeat_protocol::transport::iroh::IrohMeshTransport, which the peat consumer-side PR (peat#926) deletes inpeat 0.9.0-rc.15.peat_mesh::transport::iroh_mesh::IrohMeshConnection— companion [MeshConnection] impl wrappingiroh::endpoint::Connection. Liveness detection via QUICclose_reason()carries over byte-for-byte from peat-protocol.peat_mesh::network::EndpointId— re-export ofiroh::EndpointId. Lets peat-protocol's post-Phase-2 code referenceEndpointIdvia a peat-mesh path, satisfyingpeat/SKILL.md's transport-agnosticism gate (nouse iroh::lines in peat-protocol/src outside the re-export shim).tests/dual_active_simultaneous.rs— migrated from peat-protocol. Preserves the dual-simul-connect invariant: real Iroh QUIC + mock BLE coexist in the sameTransportManagerwith correct routing and PACE fallback when Iroh stops.
Notable API delta vs. peat-protocol's IrohMeshTransport
peat-protocol's constructor took Arc<RwLock<PeerConfig>>. peat-mesh's takes Vec<PeerInfo> directly. The formation and local fields of PeerConfig were never used inside the transport — only config.peers: Vec<PeerInfo> was consulted, for address resolution and reconnection. Decoupling from PeerConfig keeps the formation-key model in peat-protocol's security layer where it belongs (per ADR-062 §"What peat-protocol still owns"). A new set_static_peers(&self, peers: Vec<PeerInfo>) method covers the runtime-update path that Arc<RwLock<PeerConfig>> previously enabled.
set_static_peers registers every well-formed entry inline into the NodeId ↔ EndpointId map and the static-peer set, so post-call connect() for any new peer succeeds without a separate register_peer call. Malformed entries (invalid hex node_id) are skipped with a warn! — same surfacing as start(). Operationally additive with respect to the registration maps: entries that fall out of the new list are not removed, matching the peat-protocol Arc<RwLock<PeerConfig>> semantic.
Other QA-driven refinements
start()andset_static_peers()warn!onPeerInfoentries whosenode_idhex is malformed, instead of silently dropping them. Operators get a diagnostic line on the most common static-config typo.- Lock acquisitions in
iroh_mesh.rsuseunwrap_or_else(|e| e.into_inner())for poison recovery, matching the rest of peat-mesh (e.g.,transport::health). The long-running cleanup/reconnection task no longer turns a poisoned read into a task-killing panic. - Bidirectional surface-tier integration test in
transport::iroh_mesh::tests::test_two_iroh_mesh_transports_real_connect— two realIrohMeshTransportinstances establish a QUIC connection with verifiable evidence on both sides (PeerEvent::Connectedon the dialer's mesh-tier subscription,peer_count() > 0on the receiver's underlyingIrohTransport).
Deferred (tracked separately)
- peat-mesh#164 —
parse_close_reasonshould pattern-match on structurediroh::endpoint::ConnectionErrorvariants instead of substring-matching theDisplaytext. Carryover behavior from peat-protocol; reviewer explicitly framed as out-of-scope for the Phase 2 move.