fix(gateway): do not drop final reply after session split#14391
Open
sgaofen wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
CI note: I checked the failing Local validation for this PR remains green:
Once #13352 lands, I can rebase/rerun this branch if needed. |
Contributor
|
I rechecked this against current |
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.
Fixes #14238.
Root cause
Gateway delivery suppression treated
response_previewed=Trueas proof that the final reply had reached the user. During compression/session handoff, unrelated interim commentary could be delivered while the actual final response still needed the normal platform send path. That left the response persisted in the child session but not sent to chat.Fix
GatewayStreamConsumer.Tests
python -m pytest tests/gateway/test_run_progress_topics.py::test_run_agent_previewed_final_marks_already_sent tests/gateway/test_run_progress_topics.py::test_run_agent_previewed_split_keeps_final_delivery_pending tests/gateway/test_run_progress_topics.py::test_run_agent_queued_message_does_not_treat_commentary_as_final tests/gateway/test_run_progress_topics.py::test_run_agent_streaming_does_not_enable_completed_interim_commentary tests/gateway/test_stream_consumer.py::TestInterimCommentaryMessages -q --tb=shortpython -m pytest tests/gateway/test_run_progress_topics.py tests/gateway/test_stream_consumer.py -q --tb=shortgit diff --checkNote: the current full-suite baseline on
mainis covered by #13352, which is green and mergeable. If this PR shows the same unrelated full-suite failures before #13352 lands, the targeted regression coverage above is the relevant signal for this patch.