Skip to content

[Brook K2] Added the Stream ids, offsets, epochs and batch digest, with shared vectors. - #44

Closed
moetemp wants to merge 1 commit into
moe/brook/review/k1-skeletonfrom
moe/brook/review/k2-ids-vectors
Closed

moetemp wants to merge 1 commit into
moe/brook/review/k1-skeletonfrom
moe/brook/review/k2-ids-vectors

Conversation

@moetemp

@moetemp moetemp commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

What changed?

This PR adds the Stream ids, offsets, epoch keys and batch digest, with shared vectors.

  • An offset packs the Redis entry id <ms>-<seq> as ms << 20 | seq.
  • Epoch keys are fixed-width hex, so the Lua scripts compare epochs as strings.
  • testdata/gen_vectors.py is a second implementation. Each SDK and the server run its vectors.

Depends on #43 (K1). Review lane is the Rust reviewers.
Part of the Brook review series.

Why?

Every SDK and the server 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, clippy (both feature sets), cargo test and the FIPS tree check. Fork CI passes.

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

These are the rules that every SDK 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
moetemp force-pushed the moe/brook/review/k1-skeleton branch from 6c8ca5c to d81d3c6 Compare October 26, 2026 08:00
@moetemp
moetemp force-pushed the moe/brook/review/k2-ids-vectors branch from ea47ddd to 5fe2b28 Compare October 26, 2026 08:00
@moetemp

moetemp commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

Moved to moetemp/sdk-rust#213 (K2). The crate split in two. The shared runtime is now the crate temporalio-streams in sdk-rust (moetemp/sdk-rust#212 to #220), and the Redis Store is temporalio-streams-redis in temporal-community/sdk-streams (#1 to #3).

@moetemp moetemp closed this Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant