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 |
||
|---|---|---|
| .. | ||
| assets | ||
| builtin_hooks | ||
| platforms | ||
| relay | ||
| __init__.py | ||
| authz_mixin.py | ||
| 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 | ||
| lifecycle_ledger.py | ||
| memory_monitor.py | ||
| message_timestamps.py | ||
| mirror.py | ||
| pairing.py | ||
| platform_registry.py | ||
| profile_routing.py | ||
| readiness.py | ||
| response_filters.py | ||
| restart.py | ||
| restart_loop_guard.py | ||
| rich_sent_store.py | ||
| run.py | ||
| runtime_footer.py | ||
| scale_to_zero.py | ||
| session.py | ||
| session_context.py | ||
| session_state.py | ||
| shutdown_flush.py | ||
| shutdown_forensics.py | ||
| shutdown_watchdog.py | ||
| slash_access.py | ||
| slash_commands.py | ||
| status.py | ||
| status_phrases.py | ||
| sticker_cache.py | ||
| stream_consumer.py | ||
| stream_dispatch.py | ||
| stream_events.py | ||
| streaming_tts_consumer.py | ||
| systemd_notify.py | ||
| turn_context.py | ||
| turn_lease.py | ||
| wake.py | ||
| whatsapp_identity.py | ||