daemon: rx-watchdog also detects the partial (outbound-dial) wedge#387
Merged
Conversation
The v1.12.5 watchdog catches a FULL inbound wedge (PktsRecv fully stalls) and is production-proven. But 2026-07-15 the overlay went dark in a way it missed: pilot-director and list-agents both failed with dial timeouts while PktsRecv kept *trickling* forward from a couple of peer keepalives — so the rx-silence timer reset every tick and the watchdog stayed quiet. Only a manual daemon restart cleared it (its re-registration re-punched the NAT mapping). Add an outbound signal: DialConnection records a success (clears the counter) or a full-budget timeout (increments consecutiveDialTimeouts). The watchdog now treats dialTimeouts >= dialWedgeThreshold (4 back-to-back dial failures, zero successes between — implausible unless our own send path is dead) as a wedge, even while rx trickles: rx progress no longer counts as healthy in that state. It runs the same soft-recovery (beacon + registry re-register) and, if it persists, the same guarded hard-exit → supervisor respawn. The soft path resets the dial counter so the next real dial re-tests, avoiding a stale-counter false exit when no dials have happened. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The v1.12.5 watchdog catches the full inbound wedge (production-proven — 2 days of auto-recoveries). But today the overlay went dark in a way it missed: pilot-director + list-agents both dial-timed-out while
PktsRecvkept trickling from peer keepalives, so the rx-silence timer reset every tick and the watchdog never fired — only a manual restart cleared it.This adds an outbound signal:
DialConnectionrecords success (resets) or a full direct+relay timeout (incrementsconsecutiveDialTimeouts). The watchdog now treats 4 back-to-back dial timeouts with zero successes as a wedge even while rx trickles, and runs the same soft-recovery → guarded hard-exit escalation. Regression tests for both the soft-recover and hard-exit paths included; race-clean.🤖 Generated with Claude Code