Repository navigation
Conversation
Draft
2 of 3 tasks
moetemp
force-pushed
the
moe/streams-crate
branch
from
November 16, 2026 08:03
c7f318b to
7741f17
Compare
moetemp
force-pushed
the
moe/streams-direct
branch
from
November 16, 2026 08:03
f284727 to
16e3566
Compare
moetemp
force-pushed
the
moe/streams-crate
branch
from
November 16, 2026 15:21
7741f17 to
5594652
Compare
moetemp
force-pushed
the
moe/streams-direct
branch
2 times, most recently
from
November 16, 2026 19:36
00ab95b to
e8637fe
Compare
moetemp
force-pushed
the
moe/streams-crate
branch
from
November 17, 2026 05:59
5594652 to
5b752b8
Compare
moetemp
force-pushed
the
moe/streams-direct
branch
2 times, most recently
from
November 17, 2026 06:06
5170611 to
16fb9e1
Compare
moetemp
force-pushed
the
moe/streams-crate
branch
from
November 17, 2026 08:35
895f14b to
87ba6cb
Compare
moetemp
force-pushed
the
moe/streams-direct
branch
from
November 17, 2026 08:35
16fb9e1 to
345c983
Compare
moetemp
force-pushed
the
moe/streams-crate
branch
from
November 17, 2026 22:04
87ba6cb to
9a459a2
Compare
moetemp
force-pushed
the
moe/streams-direct
branch
from
November 17, 2026 22:04
cef8d73 to
467bde8
Compare
moetemp
force-pushed
the
moe/streams-direct
branch
from
November 17, 2026 23:31
b37a54e to
31edc36
Compare
moetemp
force-pushed
the
moe/streams-crate
branch
from
November 18, 2026 07:50
8ddbce5 to
0e09c6b
Compare
moetemp
force-pushed
the
moe/streams-direct
branch
2 times, most recently
from
November 18, 2026 15:08
b4676e7 to
0bfdf6d
Compare
This was referenced Nov 18, 2026
moetemp
force-pushed
the
moe/streams-crate
branch
from
November 18, 2026 17:21
f730d73 to
6fa6b91
Compare
moetemp
force-pushed
the
moe/streams-direct
branch
from
November 18, 2026 17:21
0bfdf6d to
c706df9
Compare
moetemp
force-pushed
the
moe/streams-crate
branch
from
November 18, 2026 18:12
6fa6b91 to
cc3f703
Compare
moetemp
force-pushed
the
moe/streams-direct
branch
2 times, most recently
from
November 18, 2026 20:17
13d0f1c to
c393914
Compare
moetemp
force-pushed
the
moe/streams-crate
branch
from
November 18, 2026 20:18
cc3f703 to
7bc41d9
Compare
Workflow code can append to and close a Stream through Core. The marker of a Workflow Task records each result, so a replay calls no Store. The protos, the call code and Core's side are one commit, since none compiles alone.
The tests drive a Worker on a mock history and a test Store. They cover the order of calls, replay, a Store outage, the shutdown wait and the metrics.
moetemp
force-pushed
the
moe/streams-direct
branch
from
November 19, 2026 05:36
85b673c to
25ee4ea
Compare
moetemp
changed the base branch from
moe/streams-crate
to
moe/streams-crate-types
November 19, 2026 05:44
This branch has not been deployed
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 lets Core append to and close a Stream itself, for Workflow code.
It's a prototype, created for the purpose of getting your feedback on the design. Its base is #1817, and the Python SDK's side is temporalio/sdk-python#2132. The read of a Stream from Workflow code is a separate PR on top of this one, #1819.
temporalio-streams, in itsworkflowmodule behind a cargo feature. Core has the commands, the marker machine and the handling of the Workflow Task.AppendToStreamandCloseStreamare commands for Core, not for the server.ResolveStreamAppendandResolveStreamClosegive the results. The Worker gets its Stream runtimes inWorkerConfig::stream_runtimes, by Store name. The field numbers have gaps, which the commands and the job of the read take in feat: let Core read a Stream for Workflow code #1819.core_streammarker for a Workflow Task. An append has its offsets or its failure. A close has its intent and its result. The marker is bounded at 256 KiB, and Core then rolls the task over.Why?
Workflow code that appends token by token would need a Local Activity for each append, and each one writes a marker. With this PR, the appends of a Workflow Task share one marker. A close also needs an order that a Local Activity can't give. It takes effect only after the server has the task that asked for it, so a failed task closes nothing.
These points are open.
temporalio-sdk-coretakestemporalio-streamsas a plain dependency. Should it be a feature?Checklist
crates/sdk-core/src/core_tests/streams.rsdrive Core with a mock history and a test Store,TestStreamStoreincore_tests/stream_store.rs. It has a rule of the Stream service only where a test of Core needs it. A cached run that gets another Worker's Stream events is evicted, and the tests of that are in feat: let Core read a Stream for Workflow code #1819, since they use a read. The integration tests that need a Temporal server have no Stream case yet.