#4523·iroh

Initial QAD report is not cached, allowing redundant periodic probes

Author: tabhishekpaulCreated Sep 10, 2026Updated Sep 11, 2026

run_probe_v4 and run_probe_v6 consume the first observed_external_addr() value to construct a QadProbeReport, then initialize the retained connection's observer with None. Without a subsequent address update, QadConns::current_v4/v6 cannot reuse the first report, so subsequent reports can start redundant QAD probes.

Reproduction against main 887f180ab1736e5f23c1d599b6f043b3dcba8e61:

Add the following after assert_eq!(report.addr, client_addr) in test_qad_probe_v4:

rust
assert!(conn.observer.get().is_some());

cargo test -p iroh --locked --lib test_qad_probe_v4 --features test-utils fails at that assertion against the original source. Initializing both observers with Some(report.clone()) makes the assertion pass. With this change, cargo test -p iroh --locked --lib net_report:: --features test-utils passes all seven tests; cargo fmt --all -- --check passes as well.

Expected: the retained QAD connection exposes its first report immediately, without requiring an address change.

I intend to submit the two-line fix and regression assertion. The streaming netreport work in #4400 is complementary; this fix does not change polling or keepalive intervals.

Prepared with AI assistance at the account owner's request. The human-authorship attestation is not asserted.