fix: Telegram final flush silently drops rate-limited response chunks - #976
Open
sam-saffron-jarvis wants to merge 1 commit into
Open
fix: Telegram final flush silently drops rate-limited response chunks#976sam-saffron-jarvis wants to merge 1 commit into
sam-saffron-jarvis wants to merge 1 commit into
Conversation
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 changed
retry_afterwhen supplied.streamReplypersists the completed turn but returns an error instead of silently reporting success.Why this is high-value
Telegram streaming is a daily Jarvis path. Fast completions and long answers previously forced final edits back-to-back, bypassing the normal three-second edit pacing. A single flood-control or transient failure could leave Telegram showing truncated text or stale progress even though the complete answer was persisted and the turn returned success. The bounded paced retry closes that user-visible reliability gap without changing provider streaming or transcript behavior.
Validation
gofmt -w internal/serve/telegram.go internal/serve/telegram_test.gogo build ./...HOME=<clean temp dir> XDG_CONFIG_HOME=<clean temp config> CODEX_HOME=<clean temp codex> GOPATH=/home/agent/go GOCACHE=/home/agent/.cache/go-build go test ./...git diff --check