hermes-agent/gateway
Teknium 30878411b8 fix(gateway): stop stale streamed finalize from suppressing the complete Telegram response
A successful finalize edit can carry only the last streamed preview
snapshot: deltas generated between the last preview edit and stream
completion never reach any Bot API call, yet final_response_sent /
final_content_delivered were set from the call's success and suppressed
the gateway's normal final send — losing the tail permanently.

The stream consumer now records the exact cleaned payload of every
turn-final delivery (delivered_final_matches tri-state), and gateway/run.py
reconciles that record against the completed final_response before
trusting either suppression flag. On a demonstrable mismatch it edits the
streamed message up to the complete response, falling back to the normal
final send if the edit fails. Multi-message split deliveries and legacy
paths without a record keep the existing flag-trusting behavior, so
overflow splits and the failed-finalize handling (#51828/#33793) are
untouched.

Fixes #71643
2026-08-01 10:51:55 -07:00
..
assets
…
builtin_hooks
…
platforms fix(yuanbao): await the forwarded-records loading heartbeat 2026-07-31 22:35:20 -07:00
relay fix(gateway): use connector-owned no-clobber guard for relay thread rename + trace logs (#75912) 2026-08-01 09:28:31 -07:00
__init__.py
…
authz_mixin.py fix(gateway): per-profile Discord/Telegram allow-deny gates under multiplex_profiles 2026-08-01 10:51:42 -07:00
cgroup_cleanup.py
…
channel_directory.py
…
code_skew.py
…
config.py
…
cwd_placeholder.py
…
dead_targets.py
…
delivery.py
…
delivery_ledger.py
…
display_config.py
…
drain_control.py
…
hooks.py
…
kanban_watchers.py fix(kanban): deliver notifications from non-dispatch gateways 2026-07-31 21:52:11 -07:00
lifecycle_ledger.py
…
memory_monitor.py
…
message_timestamps.py
…
mirror.py
…
pairing.py fix(gateway): align multiplex pairing stores 2026-07-29 18:43:50 -05:00
platform_registry.py
…
profile_routing.py
…
readiness.py
…
response_filters.py
…
restart.py fix(test): hermetic env-detection tests — pin container/supervisor/HOME probes (#422) 2026-07-29 18:55:10 -07:00
restart_loop_guard.py
…
rich_sent_store.py
…
run.py fix(gateway): stop stale streamed finalize from suppressing the complete Telegram response 2026-08-01 10:51:55 -07:00
runtime_footer.py
…
scale_to_zero.py
…
session.py fix(gateway): scope session lists before limiting 2026-07-31 22:36:55 -07:00
session_context.py fix(delegation): prevent child HERMES_SESSION_ID leak into parent process env 2026-07-31 22:32:55 -07:00
session_state.py
…
shutdown_flush.py
…
shutdown_forensics.py
…
shutdown_watchdog.py
…
slash_access.py
…
slash_commands.py fix(gateway): offload preflight-compression warning enrichment; behavioral offload tests 2026-07-31 22:39:34 -07:00
status.py fix(windows): native Windows correctness for CLI, gateway status, banner, and WSL browser paths 2026-07-29 23:16:18 -07:00
status_phrases.py
…
sticker_cache.py
…
stream_consumer.py fix(gateway): stop stale streamed finalize from suppressing the complete Telegram response 2026-08-01 10:51:55 -07:00
stream_dispatch.py
…
stream_events.py
…
streaming_tts_consumer.py
…
systemd_notify.py
…
turn_context.py refactor(gateway): extract run_sync onto TurnRunner (completes the TurnContext seam; AST-identical body) 2026-07-29 16:21:46 -07:00
turn_lease.py
…
wake.py
…
whatsapp_identity.py
…