Repository navigation
Conversation
moetemp
force-pushed
the
moe/brook/review/streams-k1-protos
branch
from
October 27, 2026 07:35
adac538 to
4078d83
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k2-ids-vectors
branch
2 times, most recently
from
October 27, 2026 08:17
3c800ad to
f5d807e
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k1-protos
branch
from
October 27, 2026 08:17
4078d83 to
5cad429
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k1-protos
branch
from
October 27, 2026 16:55
5cad429 to
345aa03
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k2-ids-vectors
branch
2 times, most recently
from
October 27, 2026 23:46
16de1da to
bd35e0c
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k1-protos
branch
from
October 27, 2026 23:46
345aa03 to
6b5105d
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k1-protos
branch
from
October 28, 2026 08:55
6b5105d to
b906e6f
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k2-ids-vectors
branch
from
October 28, 2026 08:55
bd35e0c to
fe3f05a
Compare
These are the rules that every SDK, every Store and the server must compute the same way. `testdata/gen_vectors.py` writes the shared vectors from a second implementation, and `tests/vectors.rs` checks the crate on them.
moetemp
force-pushed
the
moe/brook/review/streams-k2-ids-vectors
branch
from
October 29, 2026 04:06
fe3f05a to
98ba416
Compare
Nothing outside the tests built a default Stream id or parsed a Workflow Producer's run. Only the shared Store suite reads the meta field names, so they sit behind test-support. The README says which side reads each vectors file, and the digest docs no longer claim that the server computes the digest.
The server keeps its own copies of some vectors, and two of them differ from these files.
A task key is 24 big-endian bytes, an epoch key 40 and a digest the first 16 bytes of the SHA-256, which saves Store bytes. Both Stores compare the keys as bytes, and the vectors give them in hex.
Each kind keeps its number, so the stored names and the epoch keys keep their bytes. The vector loaders build the case from the flat fields of the JSON.
A retry reads the same entry id, so the error isn't retryable.
A close writes no log entry, so a Store that waits on its log needs another key that a close wakes.
The facts and the withdrawing Producer moved into StreamWriter. The vector loader builds the writer from the same JSON fields.
The review asked to stop representing invalid states. The Producer kind is now a oneof with run_id only in the run-based variants, so a client can't carry a run. A write's task facts and withdraw_run move into RunWithdrawal, which only a run writer sets.
Matches the proto change, so the ids and epoch vectors stay the same.
Owner
Author
|
Closed in favor of #228, the combined branch, which has this change. |
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 Stream ids, offsets, epoch keys and batch digest, with shared vectors.
<ms>-<seq>asms << 20 | seq.epoch::ProducerKindgives it, with a fixed number for the stored field names, and refuses a Producer whose epoch has no case.testdata/gen_vectors.pyis a second implementation. The crate's tests read every vector file, and sdk-python also readsids.jsonandwithdrawals.json.testing::fields, behind thetest-supportfeature, has the stored field names that the store suite checks.:producers, the sorted set of each Producer's last append.check_producertakes only ids in the form ofencode_part.Depends on #212 (K1). Review lane is the Rust reviewers.
Part of the Brook review series.
Why?
Every SDK must compute these the same way. They have no I/O, so reviewers can check them against the vectors before any Store exists.
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.