You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[TEST-02] network crate critically under-tested for transport-layer code #340
Severity: high Category: test coverage File: crates/network (esp. iroh.rs with only 2 tests) Obvious fix: no (requires real or harnessed iroh endpoints; some plumbing needed)
Description
The network crate is 1407 SLOC with only 18 tests, ratio 0.0128 — second-worst in the workspace. The breakdown is topics.rs:5, iroh.rs:2, mem.rs:11, meaning the real iroh-backed transport (the production path) has just 2 tests while the in-memory mock has 11. Most coverage is exercising the mock, not the wire.
Impact / Threat
Regressions in the production iroh path are unlikely to be caught at the crate level.
Suggested fix
Add tests for these named behaviors:
iroh peer dial + handshake: spin up two in-process iroh endpoints, dial, exchange one message both ways, assert both peers see the connection-established event.
Topic subscription fan-out: subscribe N peers to a topic, publish from one, assert all N receive exactly once and non-subscribers receive nothing.
Reconnect / disconnect semantics: drop one side of an established connection, assert the surviving side observes a disconnect within a bounded time and that subsequent sends fail with a typed error rather than block.
Activity