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
..
ADDING_A_PLATFORM.md
…
__init__.py
…
api_server.py
…
base.py fix: send error details to user in gateway outer exception handler 2026-03-18 10:42:43 -07:00
dingtalk.py
…
discord.py fix(discord): remove redundant /ask slash command 2026-03-17 16:25:09 -07:00
email.py
…
homeassistant.py
…
matrix.py fix(matrix): use correct reply_to_message_id parameter name 2026-03-18 02:23:21 -07:00
mattermost.py
…
signal.py fix(signal): handle Note to Self messages with echo-back protection 2026-03-20 04:46:32 -07:00
slack.py
…
sms.py
…
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