Repository navigation
Conversation
moetemp
marked this pull request as draft
October 28, 2026 21:55
moetemp
force-pushed
the
moe/brook/review/streams-k10-wit
branch
from
October 29, 2026 04:06
53631bb to
b5e1532
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k11-static-calls
branch
3 times, most recently
from
October 29, 2026 09:17
df49f36 to
cc13519
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k10-wit
branch
from
October 29, 2026 09:17
23f4638 to
d27b78f
Compare
Every SDK must derive the Producer of an Activity by one rule, so the rule moves into the crate as a static call.
moetemp
force-pushed
the
moe/brook/review/streams-k11-static-calls
branch
from
October 29, 2026 10:03
cc13519 to
ce11ed4
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k10-wit
branch
from
October 29, 2026 10:03
d27b78f to
88adfdf
Compare
Owner
Author
|
Parked. Nothing calls these runtime methods yet, since sdk-python does this work in Python. The branch stays, and this layer comes back with its first caller, for example a TypeScript or .NET port or Rust read handles. |
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 the static calls and the sync call of the Stream runtime. It is the first layer of the thin SDK runtime, which moves Brook's language-neutral runtime out of sdk-python into this crate.
call_staticruns a pure method with no runtime object.DeriveProducergives the Producer of an Activity attempt from anActivityContext, which lang copies from its Activity info.ScopedStreamIdgives the id of a named Workflow Stream, for code outside a Workflow.StreamRuntime::call_syncruns a method that never waits, with no async runtime entered, so a finalizer can call it.callruns those methods too.WorkflowTaskAttempthas the field numbers and types of Core'scoresdk.activity_task.WorkflowTaskAttempt(C1, fields 1 to 7), so lang passes Core's bytes through. A test encodes Core's message and decodes it as the crate's.testdata/producers.jsonhas the Producer of each Activity kind.gen_vectors.pywrites it from its second implementation.Depends on #220 (K10). Review lane is the Rust reviewers.
Part of the Brook review series.
Why?
Brook ships in Python, TypeScript and .NET, so each rule that isn't tied to a language or to Workflow code moves into this crate once. The Producer rule is the first. It reads C1's
previous_attemptandprevious_started_timetoo, so the attempt and time tie-break of the withdrawal rule works for every SDK. sdk-python forwards only the started event id today.How did you test it?
cargo fmt,cargo clippy -- -D warnings(with and without features),cargo test -p temporalio-streams --all-featuresandcargo docpass at this commit.