Files
tsunagi/crates
Aleksandr Bogomiakov fb7a959d23 Restore WireGuard tunnels after rapid reconnects and log QUIC closes
A peer can leave and return with the same WireGuard public key between
reconciliation passes. The old reader then stays attached to a closed
logical channel even though the carrier is up. Retain a tunnel only while
its endpoint, announced key and open channel still match. Stop retired
readers and start a handshake on the replacement channel. Carrier changes
under the same channel keep the session and traffic counters.

Record the newest channel before waking the worker, including while a
network key is loading. A burst that fills the bounded command queue can
now delay a sync without losing the channel the core handed over.

Capture the QUIC close cause before local session cleanup. Include the
network name and last known peer hostname alongside their IDs in the
disconnect log. Report transport and application codes without copying
arbitrary peer-supplied close text. The in-process disconnect event gains
name fields. Mesh protocols, local IPC and storage formats stay compatible.

On macOS arm64 both the loopback reconnect and close-code tests failed
before the fix. The locked workspace suite now passes 606 tests with five
opt-in tests ignored. It covers bidirectional IP after reconnect and a
saturated notification queue. Formatting and strict workspace Clippy passed.
2026-11-25 18:22:50 +02:00
..