openclaw/extensions/telegram
wangchunyue dd61171f5b
fix: prevent Telegram polling watchdog from dropping replies (#56343) (thanks @openperf)
* fix(telegram): prevent polling watchdog from aborting in-flight message delivery

The polling-stall watchdog only tracked getUpdates timestamps to detect
network stalls. When the agent takes >90s to process a message (common
with local/large models), getUpdates naturally pauses, and the watchdog
misidentifies this as a stall. It then calls fetchAbortController.abort(),
which cancels all in-flight Telegram API requests — including the
sendMessage call delivering the agent's reply. The message is silently
lost with no retry.

Track a separate lastApiActivityAt timestamp that is updated whenever
any Telegram API call (sendMessage, sendChatAction, etc.) completes
successfully. The watchdog now only triggers when both getUpdates AND
all other API activity have been silent beyond the threshold, proving
the network is genuinely stalled rather than just busy processing.

Update existing stall test to account for the new timestamp, and add a
regression test verifying that recent sendMessage activity suppresses
the watchdog.

Fixes #56065
Related: #53374, #54708

* fix(telegram): guard watchdog against in-flight API calls

* fix(telegram): bound watchdog API liveness

* fix: track newest watchdog API activity (#56343) (thanks @openperf)

* fix: note Telegram watchdog delivery fix (#56343) (thanks @openperf)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-29 11:11:28 +05:30
..
src fix: prevent Telegram polling watchdog from dropping replies (#56343) (thanks @openperf) 2026-03-29 11:11:28 +05:30
allow-from.ts perf: split telegram audit runtime seams 2026-03-22 00:53:12 +00:00
api.ts refactor: route more test seams through public plugin APIs 2026-03-27 13:46:17 +00:00
channel-config-api.ts refactor: move channel config metadata into plugin-owned manifests 2026-03-27 01:59:30 +00:00
index.ts
openclaw.plugin.json
package-manifest.contract.test.ts refactor: move extension-owned tests to extensions 2026-03-27 21:37:09 +00:00
package.json build: cut 2026.3.28 stable 2026-03-29 02:33:41 +01:00
runtime-api.ts refactor: move provider seams behind plugin sdk surfaces 2026-03-27 23:26:26 +00:00
setup-entry.ts
test-api.ts refactor: route plugin runtime through bundled seams 2026-03-27 16:40:27 +00:00
update-offset-runtime-api.ts refactor: remove remaining core extension reach-ins 2026-03-27 13:46:16 +00:00