hermes-agent/gateway/platforms
Teknium 488a30e879
fix(gateway): retry Telegram 409 polling conflicts before giving up
A single Telegram 409 Conflict from getUpdates permanently killed
Telegram polling with no recovery possible (retryable=False on
first occurrence).  This is too aggressive for production use with
process supervisors.

Transient 409s are expected during:
- --replace handoffs where the old long-poll session lingers on
  Telegram servers for a few seconds after SIGTERM
- systemd Restart=on-failure respawns that overlap with the dying
  instance cleanup

Now _handle_polling_conflict() retries up to 3 times with a
10-second delay between attempts.  The 30-second total retry window
lets stale server-side sessions expire.  If all retries fail, the
error is still marked as permanently fatal — preserving the original
protection against genuine dual-instance conflicts.

Tests updated: split the single conflict test into two — one verifying
retry on transient conflict, one verifying fatal after exhausted
retries.

Closes #2296
2026-03-21 07:11:06 -07:00
..
__init__.py Enhance CLI with multi-platform messaging integration and configuration management 2026-02-02 19:01:51 -08:00
ADDING_A_PLATFORM.md docs: finish cron terminology cleanup 2026-03-14 19:20:58 -07:00
api_server.py feat: OpenAI-compatible API server + WhatsApp configurable reply prefix (#1756) 2026-03-17 10:44:37 -07:00
base.py fix: send error details to user in gateway outer exception handler 2026-03-18 10:42:43 -07:00
dingtalk.py fix(dingtalk): requirements check passes with only one credential set 2026-03-17 03:50:45 -07:00
discord.py fix(discord): remove redundant /ask slash command 2026-03-17 16:25:09 -07:00
email.py fix: email send_typing metadata + ☤ Hermes staff symbol (#1431, #1420) 2026-03-17 02:37:40 -07:00
homeassistant.py fix: Home Assistant event filtering now closed by default (#1169) 2026-03-13 07:40:38 -07:00
matrix.py fix(matrix): use correct reply_to_message_id parameter name 2026-03-18 02:23:21 -07:00
mattermost.py fix(gateway): Matrix and Mattermost never report as connected 2026-03-17 04:01:02 -07:00
signal.py fix(signal): handle Note to Self messages with echo-back protection 2026-03-20 04:46:32 -07:00
slack.py refactor: centralize slash command registry (#1603) 2026-03-16 23:21:03 -07:00
sms.py fix(gateway): SMS persistent HTTP session + Matrix MIME media types 2026-03-17 04:35:14 -07:00
telegram.py fix(gateway): retry Telegram 409 polling conflicts before giving up 2026-03-21 07:11:06 -07:00
webhook.py feat(gateway): add webhook platform adapter for external event triggers 2026-03-20 06:33:36 -07:00
whatsapp.py fix(whatsapp): image downloading, bridge reuse, LID allowlist, Baileys 7.x compat 2026-03-20 09:37:48 -07:00