Conversation
teknium1
reviewed
Jul 30, 2026
teknium1
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for separating silent activity from visible progress bubbles. The current-main premise is valid: gateway/run.py:4509 leaves tool_progress_callback unset when neither progress, log mode, nor live status is enabled.
Problems
plugins/platforms/telegram/adapter.py:9711stores each successful(chat_id, message_id)reaction state, but the PR only removes entries in_clear_reactions(:9734-9736). Existing terminal success/failure calls use_set_reaction(:9754-9757on current main), so a reaction-enabled long-running gateway retains one dictionary entry per completed inbound message.tests/gateway/test_telegram_dynamic_reactions.py:46-101covers duplicate suppression but not terminal cleanup or a storage bound.
Suggested changes
- Bound or retire reaction state after terminal success/failure while preserving serialization for in-flight activity updates, and add lifecycle cleanup/bounded-store tests.
- Update
website/docs/user-guide/messaging/telegram.md:1197-1223to describe the new tool-state reactions.
Automated hermes-sweeper review.
This was referenced Aug 1, 2026
pawozakwa
force-pushed
the
feat/silent-lifecycle-reactions
branch
from
August 4, 2026 06:23
b9c6062 to
9f06243
Compare
pawozakwa
force-pushed
the
feat/silent-lifecycle-reactions
branch
from
August 11, 2026 10:13
9f06243 to
3f7bdfa
Compare
Author
|
Rebased onto current
Focused gateway/Telegram suite on a clean detached worktree: |
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.
1|## Summary
2|
3|- add an optional platform hook for quiet processing activity
4|- dispatch lifecycle/tool events even when visible progress messages are disabled
5|- use Telegram reactions as a best-effort implementation of that hook
6|- deduplicate and serialize reaction updates so concurrent events cannot race
7|- make terminal reaction state monotonic so late activity cannot overwrite success, failure, or cancellation
8|- bound settled-reaction state and reopen it when a new run starts for the same message
9|
10|## Problem
11|
12|The gateway currently ties tool-event delivery to the visible progress-message path. When both
tool_progressandthinking_progressare disabled, a platform adapter cannot provide a quieter status surface even if it supports one.13|
14|This keeps lifecycle activity separate from progress messages. Platforms that do not implement the optional hook retain the existing behavior.
15|
16|An activity update also requires the original inbound message reference. Turns without that reference remain a no-op because there is no safe message-scoped status surface to update.
17|
18|## Failure and ordering behavior
19|
20|Reaction updates are best-effort. API failures are logged at debug level and do not affect agent execution or final-answer delivery. Repeated identical states are skipped, and reaction writes are serialized.
21|
22|Terminal outcomes are monotonic for a message run: delayed fire-and-forget activity cannot replace
completed,failed, orcancelled. The guard is bounded to 1024 message keys and a new processing start reopens lifecycle state for reused message identifiers.23|
24|## Tests
25|
26|Validated on final head
3f7bdfa8c683ee4f0ecf3dbfe6bade8f696a6d28, rebased ontoorigin/main:27|
28|
text 29|52 passed in 23.69s (clean detached worktree) 30|ruff: PASS 31|git diff --check: PASS 32|added-lines privacy/security scan: PASS 33|independent blocker-focused review: MERGE-READY 34|35|
36|The exact-head repository-wide runner completed with 68 failures across 13 files plus one collection/import-error file. A canonical sequential rerun reproduced 64 failures across 10 files plus the same collection error; four timing-sensitive failures (
fuzzy_match, transcription, and delegation cleanup) did not reproduce. The only reproduced gateway failure,test_profile_route_and_nonmultiplexed_resolution_preserve_boundaries, also fails unchanged on basec0106e50e7; most other reproductions are optional-integration/lazy-dependency or environment failures. None touches the focused lifecycle/reaction files. This PR does not claim a clean full-suite result; the focused exact-head evidence above remains green, and upstream CI remains authoritative.37|
38|Coverage includes:
39|
40|- tool lifecycle delivery with
tool_progress=false41|- tool lifecycle delivery with
thinking_progress=false42|- Telegram state mapping and fallback behavior
43|- reaction feature gating
44|- non-fatal API failures
45|- duplicate-state suppression
46|- concurrent duplicate suppression
47|- terminal success, failure, and cancellation cleanup
48|- late activity after terminal completion
49|- bounded terminal-state tracking
50|- reopening state for a new run reusing the same message ID
51|- missing message-reference safety
52|