Files
hermes-agent/plugins/platforms
Teknium 2dda207409 fix(whatsapp): install a missing aiohttp through PM and name every failed connect
A gateway whose dependency environment lacks aiohttp (a sealed env from
`hermes update` with a partial messaging extra, #126358) spawned the bridge,
then every /health poll raised ModuleNotFoundError inside
`_poll_bridge_health`'s blanket except. connect() returned False with no
fatal code, so the reconnect watcher retried forever while the bridge
answered /health 200, and telemetry counted each attempt as error_class
"other".

- connect() now obtains aiohttp through PM (`ensure_import("sms")`, the
  extra that is exactly aiohttp) before starting the bridge, the same
  lazy-install path Slack/Teams use. When PM cannot install it (lazy
  installs disabled, foreign interpreter, install failure) or aiohttp is a
  half-removed namespace shell (#71308), it fails with the named,
  non-retryable `whatsapp_aiohttp_missing` and never spawns the bridge.
- The bridge-died / "did not start in 15s" paths set a retryable fatal code
  (`whatsapp_bridge_exited` / `whatsapp_bridge_timeout`), so reconnect
  status and connect telemetry name the cause instead of "other".
- Folds the salvaged test file into test_whatsapp_connect.py as two
  invariant tests.
2026-10-05 15:35:42 -07:00
..
…
…
…
…
…