Repository navigation
fix(py): stop orphaned stream runs on reader disconnect - #51
Merged
Merged
Conversation
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
from
November 9, 2026 19:08
900cd4a to
c69c814
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
from
November 9, 2026 19:56
c69c814 to
a3f7b4d
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr4-google-genai
branch
from
November 9, 2026 20:02
cadb036 to
3f2f21f
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
from
November 9, 2026 20:02
a3f7b4d to
686f429
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr4-google-genai
branch
from
November 9, 2026 20:21
3f2f21f to
9b18e5e
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
from
November 9, 2026 20:21
686f429 to
107f29d
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr4-google-genai
branch
from
November 9, 2026 21:22
9b18e5e to
1a69ccf
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
from
November 9, 2026 21:22
107f29d to
b253ce2
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr4-google-genai
branch
from
November 9, 2026 21:27
1a69ccf to
1e3648e
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
from
November 9, 2026 21:28
b253ce2 to
dccc917
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr4-google-genai
branch
from
November 9, 2026 21:52
1e3648e to
3a2f2c1
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
2 times, most recently
from
November 9, 2026 22:03
64da694 to
5498539
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr4-google-genai
branch
2 times, most recently
from
November 9, 2026 23:18
2da210f to
d675ef3
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
from
November 9, 2026 23:18
5498539 to
7d62b4f
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr4-google-genai
branch
from
November 10, 2026 07:44
d675ef3 to
0693e72
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
from
November 10, 2026 07:44
7d62b4f to
c1c3ea5
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr4-google-genai
branch
from
November 10, 2026 18:37
0693e72 to
9beb25b
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
from
November 10, 2026 18:37
c1c3ea5 to
df1b003
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr4-google-genai
branch
from
November 11, 2026 06:22
2ba52f0 to
8bea28f
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
from
November 11, 2026 06:22
629dbb8 to
04c05b2
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr4-google-genai
branch
from
November 11, 2026 16:21
8bea28f to
5dce93a
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
from
November 11, 2026 16:21
04c05b2 to
d1b9115
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr4-google-genai
branch
from
November 11, 2026 17:31
5dce93a to
c29693d
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
from
November 11, 2026 17:31
d1b9115 to
383ccc5
Compare
huangjeff5
changed the base branch from
fix/py-1.0-pr4-google-genai
to
fix/py-1.0-pr3d-prompt-loader-sse
November 11, 2026 18:37
huangjeff5
force-pushed
the
fix/py-1.0-pr3d-prompt-loader-sse
branch
from
November 11, 2026 18:38
1ac7d23 to
b2313a4
Compare
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
2 times, most recently
from
November 12, 2026 06:38
f903918 to
39c7c49
Compare
huangjeff5
changed the base branch from
fix/py-1.0-pr3d-prompt-loader-sse
to
main
November 12, 2026 06:38
huangjeff5
force-pushed
the
fix/py-1.0-pr5-web-serving
branch
from
November 12, 2026 07:07
39c7c49 to
3490b0e
Compare
apascal07
approved these changes
Nov 12, 2026
apascal07
left a comment
Contributor
There was a problem hiding this comment.
The non-streaming branch of the web handlers (genkit_fastapi/_handler.py:186, await action_obj.run(...), and the same shape in Flask and Django) still runs to completion after the client disconnects. JS express aborts that branch on response.on('close').
Collaborator
Author
|
@apascal07 Good catch on the non-streaming web handler branch—kept PR #51 scoped to streaming disconnect cleanup and filed #125 to track cancelling non-streaming |
Collaborator
Author
|
@apascal07 Addressed the non-streaming web handler branch directly in 7c3ffb0 (closed #125):
|
This was referenced Nov 15, 2026
Merged
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.
A stream consumer (like an HTTP client) that disconnects mid-stream left the flow running indefinitely, continuing to execute tools and call models.
Changes
StoppableStreamtriggers cancellation on the underlying generation task.anext()(an SSE heartbeat) does not cancel, and never iterating leaves the run going soawait result.responsealone continues to work as expected.Cross-SDK
Matches JS and Go streaming cancellation semantics. Returned objects over HTTP are unmodified.