Repository navigation
fix(ai): restore Web chat streaming on one SSE connection - #353
Merged
Merged
Conversation
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.
What changed
thinking/textframes carry the execution ID once and an optional stable part coordinate. Empty part starts retain their boundary; no-op appends are skipped. Signed resume IDs remain opaque and occur only in the SSEidfield, not the JSON. No per-connection part registry.Verification
59 focused Web, client, and process/co-ordination tests passed, including all 20 DOM modes. The CI Ruff rule set and architecture gate passed locally. Real SQLite ASGI covers UTF-8/whitespace, before-completion delivery, and cursor resume; deterministic boundary tests cover empty start, truncation, and skipping empty no-ops. In the reported empty thinking-start example, the JSON body serializes from 405 to 86 bytes. The signed cursor line is unchanged.
Disconnect cleanup regression
Full CI on
a96c160hit the test timeout during session SSE disconnect. Reproduced the blocked producer locally: cancellation could arrive during storage cleanup and still leave it waiting to enqueue a completion marker after the consumer stopped. The stream now observes the producer task itself, prevents post-cancel writes, and joins retiring observers without cancelling them twice. The added deterministic ASGI test fails before this fix and passes after it; the real disconnect/reconnect test also passed 20 consecutive repetitions.