Skip to content

[Brook] Added stream topics and references. - #152

Closed
moetemp wants to merge 7 commits into
moe/brook/v2/p2c-errors-cursorsfrom
moe/brook/v2/p2d-topics-refs
Closed

moetemp wants to merge 7 commits into
moe/brook/v2/p2c-errors-cursorsfrom
moe/brook/v2/p2d-topics-refs

Conversation

@moetemp

@moetemp moetemp commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

What changed?

This PR adds typed stream topics and StreamRef.

  • StreamTopic[T], topic(name, result_type=None) and DEFAULT_TOPIC ("output"). A name holds at most 256 UTF-8 bytes and no control character, the same rule as Core.
  • StreamRef round-trips through the default data converter. Its optional chain_run_id picks which chain of a reused Workflow id it names, and never ends a read at that run.
  • kind is a plain str, so a ref from a later release still decodes and then meets the kind check.

Why?

Only Workflow-owned streams are in this release. With a string kind, later owner kinds need no type change (DD-2).

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

tests/contrib/streams/test_topics_refs.py.

@moetemp moetemp mentioned this pull request Oct 13, 2026
1 of 3 tasks
@moetemp moetemp added the skip-changelog Changelog entry rides another PR label Oct 13, 2026
@moetemp

moetemp commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

Combined into #240.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Changelog entry rides another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant