mirror of
https://github.com/jmcorgan/fips.git
synced 2026-08-12 09:33:23 +00:00
Route each link-dead peer that the tick sweep's plan_heartbeats decides to reap through the per-peer machine and executor, replacing the inline reap body in check_link_heartbeats. The batch decision, the liveness snapshots (read from the hot-path-written receive clock), and the heartbeat-send arm stay shell-side and byte-unchanged; the machine only consumes the decided LinkDeadSuspected, tearing the peer down via remove_active_peer and reporting the loss to the reconciler exactly as before, on the same tick with the same wall-clock timestamp. The reap log stays shell-side. The machine's link-dead handler no longer emits a decrypt-session unregister keyed by its shadow index (the full peer teardown already unregisters the real index; the shadow could have drifted to a reused index), and its guard now covers the Established state a freshly promoted peer sits in. Handshake-timeout, retransmit, and stale-connection cleanup stay inline: they act on pre-promotion legs that have no machine, and the loss reflex they use differs from the link-dead one.