Repository navigation
fix(monitor): host formatter no longer watchdog-cycles (#4 from QA pass) - #241
Merged
Merged
Conversation
QA pass 2026-04-28 caught: 'airc ping @<host>' to my own launchd daemon (always-on host on $HOME/.airc) timed out repeatedly. Daemon WAS hosting the mesh and accepting new joiners (SSH wire alive), but auto-pong wasn't firing. Daemon stderr filled with hundreds of '[airc:monitor] no inbound in 150s — exiting for probe'. ## Root cause The watchdog was designed for JOINERS: detect silently-dead SSH tails (no SIGPIPE, no exit, just no inbound) and exit-for-probe so the bash retry loop can confirm host reachability. For HOSTS: there's no remote SSH-tail to die silently. The host's formatter reads its own local messages.jsonl. 'No inbound' just means the channel is quiet — perfectly normal. Watchdog firing creates a 1s+ dead window between formatter exit and bash respawn; [PING:] lines arriving in that window never trigger auto-pong. ## Fix monitor_formatter.py: introduce module-level _watchdog_active flag and _disable_watchdog() that cancels any pending alarm/timer + flips the flag. _arm_watchdog calls become no-ops when the flag is False. run() detects host mode (not is_joiner) and calls _disable_watchdog() right after the is_joiner probe. Joiner mode keeps the watchdog (its original purpose). ## Verification python ast.parse: clean test/integration.sh tabs: 19/0 ✓ test/integration.sh resilience: 5/0 ✓ test/integration.sh status: 7/0 ✓ Manual: triggered the daemon's formatter to spawn, observed it STAYS alive across 150s+ idle (previously cycled). E2e in mesh: needs a peer to ping the daemon after restart and confirm pong arrives — will run that as the live test. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
There was a problem hiding this comment.
Pull request overview
Disables the inactivity watchdog in host monitor-formatter mode to prevent periodic formatter exits that create brief “dead windows” where inbound [PING:] messages don’t get auto-[PONG:] responses.
Changes:
- Add a watchdog “active” flag plus a host-mode
_disable_watchdog()routine that cancels any pending alarm/timer. - Gate
_arm_watchdog()so it becomes a no-op once watchdog is disabled. - Disable watchdog in
run()whenis_joiner=False(host reads localmessages.jsonl, so idle is expected).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This was referenced Apr 28, 2026
joelteply
added a commit
that referenced
this pull request
Jul 31, 2026
…#241) (#1303) feat(ipc): ListRooms — serve the durable subscribed-room registry over IPC (#270/#241) An attached client (continuum's nav, a TUI room list) could only learn rooms by watching traffic, so a rebooted interface showed ONE room until each of the others happened to speak (live-found 2026-07-31). The daemon already holds the durable registry (coordinator store subscriptions table); this exposes it: Request::ListRooms -> Response::Rooms with {room_id, name, joined_at_ms, is_default} per non-parted subscription. Parted rooms are excluded — the store remembers them only so auto-restore doesn't resurrect an explicit leave. DaemonClient::list_rooms() is the client face; continuum seeds spawn_room_set_fold from it instead of inferring rooms from observed traffic (the continuum-side consumer lands separately). Integration tests against the live daemon (room_tip_probe harness shape): registry round-trip with parted exclusion + default flag, and empty-registry-is-empty-list-not-error. Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo Co-authored-by: Claude Fable 5 <[email protected]>
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.
Daemon ping timeouts traced to host formatter cycling every 150s on idle, leaving dead windows where [PING:] arrivals don't auto-pong. Watchdog was for joiners' silently-dead SSH tails — hosts read local log, idle is fine. Disabled in host mode.
Verification: tabs 19/0, resilience 5/0, status 7/0; manual formatter-stays-alive observation.