fix(telegram): classify and dedup post-reconnect probe failures (#63243) - #63247
Closed
SilentKnight87 wants to merge 1 commit into
Closed
Conversation
9 tasks
7 tasks
This was referenced Jul 14, 2026
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes #63243 — closes the gap #62098 left in the third Telegram probe.
_verify_polling_after_reconnect()(the one-shot probe scheduled 60s after a successful reconnect) still routed everyget_me()failure into_handle_polling_network_error()with no classification,awaited it directly (bypassing the_polling_error_taskin-flight guard every other recovery entry point honors), and logged the raw error.Related Issue
Closes #63243
Type of Change
Changes Made
plugins/platforms/telegram/adapter.py—_verify_polling_after_reconnect()only:_looks_like_network_error()(the fix(telegram): classify PTB heartbeat transport errors #62098 classifier): connectivity errors enter the recovery ladder; auth/validation errors (InvalidToken,BadRequest, …) log once (redacted) and do not trigger reconnect churn._schedule_polling_recovery()instead ofawaiting the handler inline — picking up the in-flight_polling_error_taskguard (no more concurrent stop/drain/start_polling sequences → no self-inflicted 409 loop), thehas_fatal_errorguard, and_background_tasksbookkeeping._redact_telegram_error_text(), matching sibling sites (PTB transport error text can embed the bot-token request URL).Tests (
tests/gateway/test_telegram_network_reconnect.py):main(revert + rerun)._background_tasksregistration).How to Test
51 passed.
Checklist