Skip to content

fix(telegram): preserve retry-after on sends - #77403

Open
zombopanda wants to merge 1 commit into
NousResearch:mainfrom
zombopanda:agent/fix-telegram-retry-after
Open

fix(telegram): preserve retry-after on sends#77403
zombopanda wants to merge 1 commit into
NousResearch:mainfrom
zombopanda:agent/fix-telegram-retry-after

Conversation

@zombopanda

Copy link
Copy Markdown
Contributor

What changed

  • normalize Telegram retry_after values, including timedelta-compatible values, before inline send retries
  • preserve the authoritative delay on the final failed SendResult
  • add adapter-level regression coverage for exhausted inline retries

Why

Telegram sends retry flood-control responses inline. When all inline attempts fail, the adapter previously discarded retry_after; the outer delivery layer could then use its short generic network backoff instead of Telegram's server-requested delay and immediately hit flood control again.

This PR is intentionally limited to ordinary text sends. It does not change media, edit, or streaming fallback policy.

Validation

  • uv run --extra messaging --extra dev pytest -q tests/gateway/test_telegram_final_delivery.py
  • uv run ruff check plugins/platforms/telegram/adapter.py tests/gateway/test_telegram_final_delivery.py
  • git diff --check

@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists platform/telegram Telegram bot adapter comp/plugins Plugin system and bundled plugins sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages labels Aug 3, 2026
@zombopanda
zombopanda marked this pull request as ready for review August 3, 2026 07:07
@zombopanda
zombopanda requested a review from a team August 29, 2026 08:56
@github-actions
github-actions Bot force-pushed the agent/fix-telegram-retry-after branch from d1f00e7 to 5cf6ccd Compare August 29, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins P2 Medium — degraded but workaround exists platform/telegram Telegram bot adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants