From 947e8b24e0ea76094ca582c1ed5008538f7e49a5 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 9 Sep 2026 02:47:44 +0000 Subject: [PATCH 1/3] fix(zulip-monitor): stream alert body now carries real content, plain & params, WARN on delivery failure The #agent-hub / zulip-health stream post in notify() encoded content with python quote(str()) (always empty), so every stream alert posted empty content and Zulip rejected it silently behind '|| true'. The merged body also used backslash-escaped ampersands inside double quotes, which curl transmits literally (type=stream\ -> Zulip 400 'Invalid type'). Stream post now percent-encodes the real message text by piping it through the encoder (locale-proof: quote_from_bytes on stdin.buffer), uses plain & separators, and on failure appends one WARN line to the monitor log with the curl exit status instead of silently swallowing it. Delivery failure stays non-fatal and unretried. DM path, probes, alive rule, exit codes and log format unchanged. --- scripts/zulip-monitor.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/zulip-monitor.sh b/scripts/zulip-monitor.sh index e0c815c..d24f960 100755 --- a/scripts/zulip-monitor.sh +++ b/scripts/zulip-monitor.sh @@ -29,8 +29,9 @@ notify() { local stream_content="${severity} Zulip Monitor: ${msg}" curl -sf -X POST "${ZULIP_SITE}/api/v1/messages" \ -u "${ZULIP_EMAIL}:${ZULIP_KEY}" \ - -d "type=stream\&to=%5B7%5D\&topic=zulip-health\&content=$(python3 -c "import urllib.parse; print(urllib.parse.quote(str()))")" \ - > /dev/null 2>&1 || true + -d "type=stream&to=%5B7%5D&topic=zulip-health&content=$(printf '%s' "${stream_content}" | python3 -c "import sys,urllib.parse; print(urllib.parse.quote_from_bytes(sys.stdin.buffer.read()))")" \ + > /dev/null 2>&1 \ + || echo " WARN: stream alert to #agent-hub (zulip-health) delivery failed (curl exit $?)" >> "$LOG" } # ── Global: Zulip Server ── -- 2.54.0 From 36f218e2557b4ee646e866ad7b1c19b0b8b5806a Mon Sep 17 00:00:00 2001 From: root Date: Wed, 9 Sep 2026 02:48:17 +0000 Subject: [PATCH 2/3] chore(agents): replace CLAUDE.md symlink with canonical @AGENTS.md pointer file fm-ensure-agents-md.sh converted the tracked AGENTS.md symlink into the real-file pointer form, removing the dangling-symlink hazard. --- CLAUDE.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) mode change 120000 => 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 120000 index 47dc3e3..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1 +0,0 @@ -AGENTS.md \ No newline at end of file diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..a9d4d26 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,2 @@ + +@AGENTS.md -- 2.54.0 From 7ff7ce5b336964100c23c91a385aada7e49863dc Mon Sep 17 00:00:00 2001 From: root Date: Wed, 9 Sep 2026 03:27:09 +0000 Subject: [PATCH 3/3] no-mistakes(document): docs: fix stale replaced-claim and Telegram header comment --- README.md | 2 +- scripts/zulip-monitor.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b97b0d1..46b8968 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ Companion shell scripts that contracts delegate to. |---|---| | `daily-infra-report.py` | Generates the daily infrastructure dashboard (HTML email to jerome@sysloggh.com). | | `pm2-self-heal.sh` | Shell companion to the pm2-self-heal contract — restarts crashed PM2 processes (runs every 5 min). | -| `agent-health-check.py` | Consolidated agent health: LiteLLM key validation + GPU port conflict + streaming checks (every 10 min). Replaced zulip-monitor.sh. | +| `agent-health-check.py` | Consolidated agent health: LiteLLM key validation + GPU port conflict + streaming checks (every 10 min). | ## Contract Structure diff --git a/scripts/zulip-monitor.sh b/scripts/zulip-monitor.sh index d24f960..114dfa7 100755 --- a/scripts/zulip-monitor.sh +++ b/scripts/zulip-monitor.sh @@ -1,7 +1,7 @@ #!/bin/bash # /root/scripts/zulip-monitor.sh — Zulip Mesh Health Monitor # Implements zulip-health.prose.md v2 -# Runs every 15 min via cron. Alerts via Telegram. +# Runs every 15 min via cron. Alerts: Zulip private DM to the owner plus a stream post to #agent-hub on topic 'zulip-health'. set -euo pipefail ZULIP_SITE="https://chat.sysloggh.net" -- 2.54.0