Repository navigation
Conversation
1 of 3 tasks
moetemp
force-pushed
the
moe/brook/review/h1-streams
branch
2 times, most recently
from
October 25, 2026 23:46
5858443 to
e241a68
Compare
moetemp
changed the base branch from
moe/brook/review/base
to
moe/brook/review/h0-nexus-wait-for-stage
October 25, 2026 23:47
moetemp
force-pushed
the
moe/brook/review/h1-streams
branch
8 times, most recently
from
October 28, 2026 08:22
0aea335 to
b1ca4c3
Compare
temporalio.common.temporalio.streams.
temporalio.streams.Each agent picks its event stream with the required `stream=`. `ContribStream()` writes the agent tree to one Stream through the generated Streams API, and `WorkflowStream()` keeps Workflow Streams.
moetemp
force-pushed
the
moe/brook/review/h1-streams
branch
from
November 13, 2026 20:36
54f520a to
b3e56ae
Compare
moetemp
changed the base branch from
moe/brook/review/h0-nexus-wait-for-stage
to
main
November 13, 2026 20:36
The pinned SDK build has `append` for Workflow code again, so the two Local Activities of the harness are gone. The Store helper gives a `StreamConfig` whose Workflow calls retry until the Store is back.
The recorded session had markers of the removed Local Activities, so its replay failed. The tests pass `stream_config=` and check the SDK's error for a Worker with no Store.
A user registers nothing for Streams except the Stream config on the client.
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?
This PR adds Brook, the generated sdk-python Streams API, as a second event stream beside Workflow Streams.
stream=.ContribStream()is Brook, andWorkflowStream()is Workflow Streams. The examples passWorkflowStream().STREAMS_STORE=redisormemorypicks the Store.agent_id. Its id comes from the Workflow id and the first run id, so a retry or a continue-as-new keeps the same Stream.workflow.create_streamandappend, which the SDK runs in a Local Activity that retries with no limit. A Store outage pauses the run and loses no event.resumepoint. Upgrade the workers first.The
justfilepinstemporalio/sdk-pythonfc6b8d3b, the head of temporalio/sdk-python#2129, until an sdk-python release has Streams. Part of the Brook review series.Why?
The harness is the first user of the Streams API. Agent events go to a Store such as Redis instead of the Workflow's history, and a client reads the whole agent tree in one read.
How did you test it?
The Workflow Streams lane, the Brook memory and Redis lanes, the Nexus adapter, and the Go and TypeScript tests. The failures also happen on
main, excepttest_attach_to_an_agent_terminated_mid_turn_ends, which fails on the Workflow Streams lane with temporalio 1.35.0 and also failed before this rebase.The main missing element is the idle-timeout close on Brook. Its
agent_closedevent doesn't reach the reader yet. That fix and Brook tests for the newermainfeatures come in the next commits.Link to a test plan if any -