Skip to content

v0.9.0-rc.21

Choose a tag to compare

@github-actions github-actions released this 25 May 18:25
· 79 commits to main since this release
23a598d

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 warnings clean.
  • Bidirectional surface-tier proof: test_two_iroh_mesh_transports_real_connect exercises the round-trip nature of connect ↔ subscribe_peer_events against two real IrohTransport::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. Wraps peat_mesh::network::iroh_transport::IrohTransport and provides the trait interface that TopologyManager, TransportManager, and PACE routing consume. Replaces peat_protocol::transport::iroh::IrohMeshTransport, which the peat consumer-side PR (peat#926) deletes in peat 0.9.0-rc.15.
  • peat_mesh::transport::iroh_mesh::IrohMeshConnection — companion [MeshConnection] impl wrapping iroh::endpoint::Connection. Liveness detection via QUIC close_reason() carries over byte-for-byte from peat-protocol.
  • peat_mesh::network::EndpointId — re-export of iroh::EndpointId. Lets peat-protocol's post-Phase-2 code reference EndpointId via a peat-mesh path, satisfying peat/SKILL.md's transport-agnosticism gate (no use 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 same TransportManager with 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() and set_static_peers() warn! on PeerInfo entries whose node_id hex is malformed, instead of silently dropping them. Operators get a diagnostic line on the most common static-config typo.
  • Lock acquisitions in iroh_mesh.rs use unwrap_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 real IrohMeshTransport instances establish a QUIC connection with verifiable evidence on both sides (PeerEvent::Connected on the dialer's mesh-tier subscription, peer_count() > 0 on the receiver's underlying IrohTransport).

Deferred (tracked separately)

  • peat-mesh#164parse_close_reason should pattern-match on structured iroh::endpoint::ConnectionError variants instead of substring-matching the Display text. Carryover behavior from peat-protocol; reviewer explicitly framed as out-of-scope for the Phase 2 move.