7d28e84e72
* fix(gateway): deliver assistant prose before clarify poll The clarify poll is sent on a separate, agent-thread-blocking path while buffered assistant prose (interim commentary / streamed deltas) sits in the GatewayStreamConsumer queue, drained asynchronously. The poll won the race, so the question rendered ABOVE its own explanation, and a redundant 'clarify: ...' tool-progress bubble wedged between them. - Add GatewayStreamConsumer.flush_pending_sync(): a synchronous flush barrier (_FLUSH sentinel + threading.Event) that blocks the agent thread until everything queued before it is finalized and delivered. - Call it in the gateway clarify callback before send_clarify, so prose always lands before the poll. Best-effort with a 3s timeout. - Suppress the redundant clarify tool-progress bubble (the poll already shows the question + options). Tests: 3 new ordering/timeout cases in test_stream_consumer.py. (cherry picked from commit 9a6e27badb7646c839902db1d2f4a8affcf38b1e) * chore(contributors): map matvey.sakhnenko03@icloud.com -> sakhnenkoff Attribution mapping for the salvaged #54328 commit (Cluster C). --------- Co-authored-by: Matvii Sakhnenko <matvey.sakhnenko03@icloud.com>
3 lines
42 B
Plaintext
3 lines
42 B
Plaintext
sakhnenkoff
|
|
# PR #69775 salvage of #54328
|