Repository navigation
Conversation
moetemp
force-pushed
the
moe/brook/review/s7-workflow-streams
branch
from
October 26, 2026 00:14
b298e44 to
90966d6
Compare
moetemp
force-pushed
the
moe/brook/review/s8-activity-handles
branch
4 times, most recently
from
October 26, 2026 04:52
24f6a90 to
79cf55a
Compare
moetemp
force-pushed
the
moe/brook/review/s7-workflow-streams
branch
from
October 26, 2026 08:44
1c5e48f to
84f1587
Compare
moetemp
force-pushed
the
moe/brook/review/s8-activity-handles
branch
from
October 26, 2026 08:44
79cf55a to
15eebd7
Compare
moetemp
force-pushed
the
moe/brook/review/s7-workflow-streams
branch
from
October 27, 2026 09:07
84f1587 to
c3f30a4
Compare
moetemp
force-pushed
the
moe/brook/review/s8-activity-handles
branch
from
October 27, 2026 09:07
15eebd7 to
b3da39a
Compare
moetemp
force-pushed
the
moe/brook/review/s7-workflow-streams
branch
from
October 27, 2026 09:17
c3f30a4 to
b9572b1
Compare
moetemp
force-pushed
the
moe/brook/review/s8-activity-handles
branch
from
October 27, 2026 09:17
b3da39a to
212ef71
Compare
moetemp
force-pushed
the
moe/brook/review/s7-workflow-streams
branch
from
October 28, 2026 01:33
b9572b1 to
925cf34
Compare
moetemp
force-pushed
the
moe/brook/review/s8-activity-handles
branch
from
October 28, 2026 01:33
212ef71 to
4a67b4e
Compare
moetemp
force-pushed
the
moe/brook/review/s7-workflow-streams
branch
from
October 28, 2026 07:54
925cf34 to
cc8e51c
Compare
moetemp
force-pushed
the
moe/brook/review/s8-activity-handles
branch
from
October 28, 2026 07:54
4a67b4e to
0c7ec5b
Compare
moetemp
force-pushed
the
moe/brook/review/s7-workflow-streams
branch
from
October 28, 2026 08:05
cc8e51c to
e7710c0
Compare
moetemp
force-pushed
the
moe/brook/review/s8-activity-handles
branch
from
October 28, 2026 08:05
0c7ec5b to
86d50a1
Compare
BufferedPublisher.SyncStream and BufferedPublisher.
moetemp
force-pushed
the
moe/brook/review/s8-activity-handles
branch
from
November 5, 2026 17:19
7fd6dcb to
ee23c91
Compare
moetemp
force-pushed
the
moe/brook/review/s7-workflow-streams
branch
2 times, most recently
from
November 5, 2026 23:10
a912bfb to
1c9ed91
Compare
moetemp
force-pushed
the
moe/brook/review/s8-activity-handles
branch
from
November 5, 2026 23:10
ee23c91 to
0d2120b
Compare
moetemp
force-pushed
the
moe/brook/review/s7-workflow-streams
branch
from
November 6, 2026 09:06
1c9ed91 to
d57a2ae
Compare
moetemp
force-pushed
the
moe/brook/review/s8-activity-handles
branch
from
November 6, 2026 09:06
0d2120b to
b346382
Compare
moetemp
force-pushed
the
moe/brook/review/s7-workflow-streams
branch
from
November 6, 2026 09:22
d57a2ae to
aef29b9
Compare
moetemp
force-pushed
the
moe/brook/review/s8-activity-handles
branch
from
November 6, 2026 09:22
b346382 to
058106a
Compare
moetemp
force-pushed
the
moe/brook/review/s7-workflow-streams
branch
from
November 6, 2026 10:11
aef29b9 to
ee2e261
Compare
moetemp
force-pushed
the
moe/brook/review/s8-activity-handles
branch
from
November 6, 2026 10:11
058106a to
1b71cf6
Compare
Owner
Author
|
Closed in favor of #381, the combined branch, which has this change. |
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 was changed
This PR adds the Stream calls in Activities, and
BufferedPublisher,SyncStreamandSyncSubscriptionintemporalio.client.Streamof the Worker's client, such as fromactivity.client().to_stream(ref), writes as the attempt, with theactivityorstandalone_activityepoch case. So a retry withdraws the Records of the earlier attempts, even if it writes nothing. AStreamof another client writes as that client.activity.client(), so it keeps the Worker's client, such as in an Activity class, and wraps aStreaminSyncStream(stream), whose calls block.publishandsubscribeof aStreamin a sync Activity raiseStreamUnsupportedError, and the message points toSyncStream.publishstarts the write at the call. The end of the attempt waits for the attempt's writes, and a write error that no caller got fails the attempt.BufferedPublisher(stream, *, max_delay=...)takes aStreamand batches its publishes, in order, and flushes at the end of an Activity attempt. Workflow code has noStream, and aWorkflowStreampassed with no type checks raisesStreamUnsupportedError.close,async withandSyncStream.closeraiseStreamNotOwnerErrorwith no call, andasync withraises at__aenter__.producerraisesStreamUnsupportedError, since the attempt is the Producer.run_blockingmakes the call's future before it schedules the call, so a cancel of the Activity thread after the schedule also cancels the call. A call when the Worker's loop is already closed closes its coroutine, so nothing warns at shutdown.Why?
Agents stream model tokens from an Activity. The Workflow keeps the Stream, and the Activity writes to it.
Part of the Streams review series.
Checklist
poe lintandpytest tests/contrib/streamson both backends.