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-k14-readers
branch
from
October 28, 2026 18:45
45029f7 to
91b73d5
Compare
moetemp
marked this pull request as draft
October 28, 2026 21:55
moetemp
force-pushed
the
moe/brook/review/streams-k14-readers
branch
2 times, most recently
from
October 29, 2026 04:06
b4a1e0d to
1965e18
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-k14-readers
branch
from
October 29, 2026 08:37
1965e18 to
4bade9b
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k13-workflow-writes
branch
from
October 29, 2026 09:17
750716b to
f891bac
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k14-readers
branch
from
October 29, 2026 09:17
4bade9b to
b457a88
Compare
A reader keeps the page loop, the waits and the offsets that each Superseded item withdraws, so each SDK only decodes the items. `Withdraws` applies the same rule to Records of an earlier read.
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-k14-readers
branch
from
October 29, 2026 10:03
b457a88 to
534ffb5
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 readers. A reader keeps the state of one
subscribe, so lang only decodes each item.OpenReaderchecks the options and keeps them.ReadNextreads pages until one has items, the read ends ormax_waitpasses, and returns that page. Each item carries the resume point after it, asSubscription.next_offsetmoves per item.ReadNext, the end of a read with no wait, the newest-lastfirst page, and the pause after a quick empty page.lasttakes no offset and noEND.ReadNextleaves the reader as it was, so a cancel loses no item. A wait of more than a year counts as a year.Withdrawsapplies the withdrawal rule to a Producer of an earlier read.epoch::withdraws_produceris that rule for a Producer, andwithdrawscalls it.withdrawsalso has a fallback for a completed task with attempt 0, which compares started times. It isn't here, since Core sends the attempt with C1's field 6. It matters only when Core doesn't know the attempt.Depends on #223 (K13). Review lane is the Rust reviewers.
Part of the Brook review series.
Why?
sdk-python's
_reader.pyand_items.pyhold the page loop, the waits and the withdrawal rule today. They are the same in every 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 reader suite runs on the memory Store here, and on Redis in R4 (temporal-community/sdk-streams#4).