fix(telegram): add missing 'action' retry context for sendChatAction#100762
Merged
vincentkoc merged 3 commits intoJul 6, 2026
Conversation
Member
|
Maintainer proof for exact head
No broad local suite or Testbox run; Blacksmith was unavailable. The focused proof covers the classifier, cooldown wrapper, and direct typing retry while visible sends remain strict. |
Member
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 7, 2026
…penclaw#100762) * fix(telegram): add missing 'action' retry context for sendChatAction * fix(telegram): cover all sendChatAction retry paths --------- Co-authored-by: Vincent Koc <[email protected]>
giodl73-repo
pushed a commit
to giodl73-repo/openclaw
that referenced
this pull request
Jul 8, 2026
…penclaw#100762) * fix(telegram): add missing 'action' retry context for sendChatAction * fix(telegram): cover all sendChatAction retry paths --------- Co-authored-by: Vincent Koc <[email protected]>
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 Problem This Solves
isTransientSendChatActionErrorpassescontext: "send"toisRecoverableTelegramNetworkError, which means snippet-only transient errors (e.g. "socket hang up", "undici") that lack a specific error code are not retried. Every other idempotent caller in the send funnel uses a permissive context —"delete"for deleteMessage,"react"for setMessageReaction,"edit"for editMessageText. The sendChatAction path was the only remaining caller that used the strict"send"context despite being idempotent, making its retry policy inconsistent with siblings.Why This Change Was Made
sendChatAction(typing indicator) is semantically idempotent — retrying it cannot produce a duplicate visible message. Even if Telegram receives the request twice, the user only sees a typing indicator that expires after a few seconds. Transient network errors that lack an error code (e.g. socket hang up) should trigger a retry.Adding
"action"toTelegramNetworkErrorContextand using it inisTransientSendChatActionErrormakes the retry policy explicit and consistent:"send""delete""react""edit""action"(new)There is zero behavioral change for coded recoverable errors (ECONNREFUSED, ENOTFOUND, etc. already retried under
"send"). The change only expands retry coverage to snippet-only transient errors where the error code is absent.User Impact
sendChatActionis more reliable on flaky networks — typing indicators survive transient socket errors instead of being silently dropped. No breaking change:"send"for sendMessage stays strict to guard against duplicate messages.Evidence
Verified against commit
08749aa188on branchfix/telegram-add-action-retry-context.scenario: transient snippet-only network errors (no error code)
fix: action context must retry like delete/react/edit
Verdict: PASS —
"action"context returns recoverable for snippet-only transient errors, matching"delete"/"react"/"edit"."send"stays strict. Coded recoverable errors (ECONNREFUSED) retry across all contexts; non-network errors (invalid token) never retry.Tests and Validation
One regression assertion added:
"action"context treats snippet-only errors as recoverable (matching"delete"/"react"/"edit"), while"send"stays strict.Risk Checklist
isRecoverableTelegramNetworkErrorproduces identical results for coded errors, and the expanded snippet match is gated by context."send"(strict).Closes: N/A