From ae8f4a843a07ac01692b03c81d00d8045f7304aa Mon Sep 17 00:00:00 2001 From: AIOSAI Date: Fri, 10 Jul 2026 00:46:01 -0700 Subject: [PATCH] #661 watchdog: 'invoke via Monitor tool' reminder no longer trips the exit-code fail-flag. _handle_agent printed this unconditional info banner through cli error() -> post-#661 every SUCCESSFUL watchdog agent run exited non-zero with a red X. Rerouted to a dim console note (exit 0); genuine arg-errors still error()->exit 2. Caught + verified by dogfooding (S289). --- src/aipass/devpulse/apps/modules/watchdog.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/aipass/devpulse/apps/modules/watchdog.py b/src/aipass/devpulse/apps/modules/watchdog.py index 5e44e856..cb169eb8 100644 --- a/src/aipass/devpulse/apps/modules/watchdog.py +++ b/src/aipass/devpulse/apps/modules/watchdog.py @@ -325,7 +325,11 @@ def _handle_agent(sub_args: List[str]) -> bool: error("Usage: watchdog agent [--timeout SECONDS]") return True - error("WATCHDOG: Must be invoked via Monitor tool, never run_in_background") + # Reminder, not an error: this call blocks until the agent exits, so it must + # run via the Monitor tool (not run_in_background) for the wake to fire on + # completion. Route through console — error() would print ❌ and trip the + # exit-code fail-flag on an otherwise-successful watch (#661 output_routing). + console.print("[dim]watchdog agent: invoke via Monitor tool, not run_in_background[/dim]") timeout = _DEFAULT_AGENT_TIMEOUT positional: List[str] = []