fix(gateway): update chunked progress messages - #26503
Closed
davetist wants to merge 1 commit into
Closed
Conversation
Contributor
Author
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 a Telegram gateway progress-update bug where tool-progress text that has already split into multiple messages keeps spawning fresh continuation replies instead of updating the existing progress messages.
The progress loop now tracks every visible progress chunk message id in order. On each update it edits existing chunks in place, sends a new chunk only when the rendered progress grows past another platform limit, and best-effort deletes stale trailing chunks if the rendered chunk count shrinks.
I searched existing bug reports and PRs before opening this. This overlaps with #26207 and the open rollover PRs #26208 / #26242, but takes a different approach: instead of rolling over to a new one-line/current bubble before overflow, it makes already-chunked progress messages stable and editable.
Related Issue
Refs #26207
Related: #26208, #26242, #25198
Type of Change
Changes Made
gateway/run.pytests/gateway/test_progress_chunking.pyHow to Test
python -m compileall -q gateway/run.py tests/gateway/test_progress_chunking.pyruff check gateway/run.py tests/gateway/test_progress_chunking.pygit diff --checkpython scripts/check-windows-footguns.py --allpython -m pytest tests/gateway/test_progress_chunking.py tests/gateway/test_telegram_format.py tests/gateway/test_telegram_thread_fallback.py tests/gateway/test_telegram_topic_mode.py -q -o 'addopts='Local result:
163 passedfor the targeted Telegram/gateway subset.I also tried a full local
python -m pytest tests/gateway -q -o 'addopts='before committing, but this checkout hit an existing local pytest resource issue:OSError: [Errno 24] Too many open files. I am not marking the full-suite checklist complete based on that run.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs