Skip to content

fix: avoid false telegram polling stall restarts - #64333

Closed
EronFan wants to merge 1 commit into
openclaw:mainfrom
EronFan:fix/telegram-polling-stall-64288
Closed

EronFan wants to merge 1 commit into
openclaw:mainfrom
EronFan:fix/telegram-polling-stall-64288

Conversation

@EronFan

@EronFan EronFan commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • count completed getUpdates calls, including recoverable errors, as API liveness for the polling stall watchdog
  • avoid forcing a polling restart while Telegram is still actively retrying after a recent getUpdates failure
  • add regression coverage for the post-error watchdog window

Testing

  • pnpm test -- extensions/telegram/src/polling-session.test.ts

Fixes #64288

@openclaw-barnacle openclaw-barnacle Bot added channel: telegram Channel integration: telegram size: XS r: too-many-prs Auto-close: author has more than twenty active PRs. labels Apr 10, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing this PR because the author has more than 10 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit.

@greptile-apps

greptile-apps Bot commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes a false Telegram polling stall watchdog by updating lastApiActivityAt on getUpdates error completions, not just on successes. Previously, a recoverable getUpdates error left lastApiActivityAt stale (from the cycle start time or the last successful call), which could make the watchdog believe no API activity had occurred even while the bot was actively retrying. A new regression test verifies that the watchdog does not restart the session shortly after a getUpdates error.

Confidence Score: 5/5

Safe to merge — the change is a two-line, symmetrical fix to an already-existing success-path assignment, with matching regression test coverage.

Both changed files are narrowly scoped to the stall-watchdog liveness bookkeeping. The fix mirrors the existing lastApiActivityAt = finishedAt pattern already present in the success path, so the risk is minimal. No P0 or P1 findings.

No files require special attention.

Reviews (1): Last reviewed commit: "fix: avoid false telegram polling stall ..." | Re-trigger Greptile

@steipete

Copy link
Copy Markdown
Contributor

Maintainer triage from the Telegram stall cluster: this is still a useful small fix despite the queue-limit close.

It addresses the false-positive side of #64288/#57660 better than a blanket threshold bump: completed getUpdates errors should refresh liveness bookkeeping, so the watchdog does not restart immediately after a normal recoverable polling error.

Suggested path: reopen/resubmit this as a tiny PR after the active-PR limit clears, or cherry-pick it into the eventual transport/liveness stack. It should complement, not replace, the active socket-wedge fixes (#68128/#69243).

@steipete

Copy link
Copy Markdown
Contributor

Thanks. This fix is now landed via #69476 / 60fea81 as part of the combined Telegram polling reliability patch. I kept the getUpdates success/error liveness bookkeeping and the regression coverage for avoiding false stall restarts after recoverable getUpdates errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: telegram Channel integration: telegram r: too-many-prs Auto-close: author has more than twenty active PRs. size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: [telegram] polling runner stopped (polling stall detected)

2 participants