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
An Activity writes as its attempt, so a retry withdraws the Records of the earlier attempts. An Activity's `BufferedPublisher` flushes at the end of the attempt.
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
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 Activity Stream handles (
ActivityStream,SyncActivityStream,SyncSubscription) andBufferedPublisher.BufferedPublisherbatches the publishes of one Stream, in order, and flushes at the end of an Activity attempt.closeon an Activity handle raisesStreamNotOwnerErrorwith no call, since no Activity owns a Stream. A Workflow's Stream closes from Workflow code, and a client's Stream from a client. The method stays, since the API proposal gives every handle the same calls._runmakes the call's future before it schedules the call, so a cancel of the Activity thread after the schedule also cancels the call. Withasyncio.run_coroutine_threadsafe, a cancel can leave a long poll running. A call when the Worker's loop is already closed closes its coroutine, so nothing warns at shutdown.Depends on S7 (#377). No changelog fragment, since S9 has the Streams entry.
Part of the Brook review series.
Why?
Agents stream model tokens from an Activity. The Workflow keeps the Stream, and the Activity writes to it.
Checklist
poe lint,poe gen-docsandpytest tests/contrib/streamson both backends. The sync cancel tests ran in a loop on Python 3.13 and 3.14, alone and in parallel.