Skip to content

fix(monitor): host formatter no longer watchdog-cycles (#4 from QA pass) - #241

Merged
joelteply merged 1 commit into
canaryfrom
fix/host-monitor-no-watchdog
Apr 28, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/host-monitor-no-watchdog

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

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.

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]>
Copilot AI review requested due to automatic review settings April 28, 2026 20:15
@joelteply
joelteply merged commit 8bc9efb into canary Apr 28, 2026
1 check passed
@joelteply
joelteply deleted the fix/host-monitor-no-watchdog branch April 28, 2026 20:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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() when is_joiner=False (host reads local messages.jsonl, so idle is expected).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants