From af3d3642421da174049a5d4cccc9cceda5eb9848 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 8 Sep 2026 12:04:01 +0000 Subject: [PATCH] no-mistakes(review): Bracket pgrep patterns to stop ssh wrapper self-match --- scripts/agent-health-check.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/agent-health-check.py b/scripts/agent-health-check.py index 00c7051..ae94aa1 100755 --- a/scripts/agent-health-check.py +++ b/scripts/agent-health-check.py @@ -311,9 +311,9 @@ def check_agents(): # the report-only path — leaving it unbound on the abiba/koonimo path # raised UnboundLocalError and crashed the whole check. Agents without # a gateway get pid=?. - pid = ssh(host, "pgrep -f 'hermes_cli.main gateway run' | grep -v infisical | head -1", user=user) + pid = ssh(host, "pgrep -f '[h]ermes_cli.main gateway run' | grep -v infisical | head -1", user=user) if not pid: - pid = ssh(host, "pgrep -f 'hermes.*gateway' | grep -v infisical | grep -v bash | head -1", user=user) + pid = ssh(host, "pgrep -f '[h]ermes.*gateway' | grep -v infisical | grep -v bash | head -1", user=user) if not pid: pid = "?"