WhatsApp → Telnyx SMS Fallback (2026-07-28)
What: services/whatsapp_service.py now falls back to Telnyx SMS (business number, TELNYX_FROM_NUMBER) whenever the OpenClaw WhatsApp hook POST fails. Since Rob’s shutdown on 2026-07-27 the hook is always down, so in practice all send_whatsapp() traffic — daily schedule, shepherd alerts, escalations, /ops/notify consumers like codex-runner — goes out as SMS. If Rob is resurrected, WhatsApp resumes automatically (fallback only fires on hook failure).
Why: Kilroy reported (and code + live probe confirmed) that every send_whatsapp() call died at the dead gateway while /ops/notify returned sent: true — silent message loss across ~30 call sites since the 7/26 WhatsApp mis-pair.
Details:
- Results carry
"transport": "whatsapp" | "telnyx_sms";/ops/notifysentnow reflects the real result. - SMS opt-out list honored (
sms_optout_service). - Long texts chunked ≤600 chars (Telnyx 10-segment UCS-2 limit) and sent sequentially.
- Flood guard: 15 logical messages/recipient/hour (Redis rolling counter, fails open). First overflow sends one cap-hit notice; the rest are suppressed with
ok: false, suppressed: true. Motivated by the anomalous 06:15 pipeline-shepherd run on 2026-07-28 that attempted 994 per-project sends (vs 0 the prior day) — that anomaly is unexplained and needs its own investigation.
Commits: entirely-api 80cfdc3 (fallback + honest /ops/notify), 9c0e887 (flood guard). Both pushed; API rebuilt, worker/scheduler restarted (source is bind-mounted, restart suffices). Verified live: test via /ops/notify → Telnyx status delivered to Dustin.