Repository navigation
Conversation
moetemp
force-pushed
the
moe/brook/review/streams-k13-workflow-writes
branch
from
October 28, 2026 18:45
1bd0d50 to
e6a73aa
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k12-scopes
branch
from
October 28, 2026 18:45
eb14f46 to
061873d
Compare
moetemp
marked this pull request as draft
October 28, 2026 21:55
moetemp
force-pushed
the
moe/brook/review/streams-k12-scopes
branch
from
October 28, 2026 22:42
061873d to
55b88d8
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k13-workflow-writes
branch
from
October 28, 2026 22:42
e6a73aa to
109eda2
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k12-scopes
branch
from
October 29, 2026 04:06
55b88d8 to
b98e0f1
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k13-workflow-writes
branch
2 times, most recently
from
October 29, 2026 08:37
112c437 to
750716b
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k12-scopes
branch
from
October 29, 2026 08:37
b98e0f1 to
3ccfc8c
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k13-workflow-writes
branch
from
October 29, 2026 09:17
750716b to
f891bac
Compare
The append Local Activity keeps its batches until the Store has them, so a retry resends the same bytes after a random codec. Each SDK then keeps only the codec call around `WorkflowAppend` and `WorkflowClose`.
moetemp
force-pushed
the
moe/brook/review/streams-k13-workflow-writes
branch
from
October 29, 2026 10:03
f891bac to
88ce46f
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k12-scopes
branch
from
October 29, 2026 10:03
8d224d8 to
70943ca
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 Workflow write calls, the bodies of the append Local Activity and the close Activity of Workflow code. Workflow code still builds each request, and never calls the crate.
WorkflowAppendwrites as the Producer of a Workflow write, at attempt 1, so the attempts in one Workflow Task send the same batches. The runtime keeps the batches until the Store has them, so a retry in this process resends the same bytes after a random codec. Lang can then send no records.TOO_LARGEgets aStreamFailure, and the others get their last offsets. Any other refusal fails the call. A lasting one drops the kept batches.withdraw_run, so a first publish refused asTOO_LARGEdoesn't skip the withdrawal.WorkflowAppendPendingtells lang whether the runtime keeps the batches, so lang can skip the codec. The kept batches go past 64 MiB, oldest first.WorkflowClosecloses aswf:<run id>, the run that scheduled the close, and only a Stream that the Activity's Workflow owns.Depends on #222 (K12). Review lane is the Rust reviewers.
Part of the Brook review series.
Why?
sdk-python's
_writes.pyholds the resend cache, the split and the close Producer today. Each SDK needs the same rules, and only the codec call is tied to the language.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. The Workflow write suite runs on the memory Store here, and on Redis in R4 (temporal-community/sdk-streams#4).