Skip to content

[Brook] Refused stream owners this release does not support. - #120

Closed
moetemp wants to merge 20 commits into
moe/brook/p3b-outside-handlesfrom
moe/brook/p3c-unsupported-owners
Closed

moetemp wants to merge 20 commits into
moe/brook/p3b-outside-handlesfrom
moe/brook/p3c-unsupported-owners

Conversation

@moetemp

@moetemp moetemp commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

What changed?

This PR raises StreamUnsupportedError for stream owners and readers outside this release.

  • workflow_reader() always raises StreamUnsupportedError.
  • A StreamRef of any kind decodes. Opening a handle on a kind other than "workflow" raises, and so does activity_handle() in an Activity with no Workflow.

Why?

Only Workflow-owned streams ship, and Workflow consumption is out of scope (DD-2). A ref that fails to decode would fail a Workflow Task on every retry when it comes in as input. So the check runs where a handle opens.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

tests/contrib/streams/test_unsupported_owners.py and test_topics_refs.py, on the dev server.

moetemp added 16 commits October 9, 2026 15:01
Only Workflows own streams and only Activities and clients read them in this
release, so the rest raises StreamUnsupportedError with a clear message.
Here a later kind is refused with StreamUnsupportedError, so the decode
test from p2d now expects that error instead of the interim ValueError.
# Conflicts:
#	temporalio/contrib/streams/__init__.py
#	tests/contrib/streams/test_outside_handles.py
#	tests/contrib/streams/test_topics_refs.py
A ref of a later release that arrives as Workflow input failed while it decoded, which fails the Workflow Task on every retry.
The handles and the writer were rewritten over Core, so the refusals of other owner kinds and of a Workflow read move onto the new code.
# Conflicts:
#	temporalio/contrib/streams/_handles.py
#	temporalio/contrib/streams/_workflow.py
Both branches touched the import block, and the merge kept P3c's, which lost the imports the Local Activity case uses.
@moetemp
moetemp marked this pull request as draft October 12, 2026 06:58
@moetemp moetemp closed this Oct 13, 2026
@moetemp moetemp reopened this Oct 13, 2026
@moetemp moetemp added the skip-changelog Changelog entry rides another PR label Oct 13, 2026
@moetemp

moetemp commented Oct 13, 2026

Copy link
Copy Markdown
Owner Author

Replaced by Brook #155 and Ford #164. Brook was split in two: Brook now has streams with Activity and client publish and outside readers, and Ford has the Workflow Task publish path. The code is the same, re-cut into new branches.

@moetemp moetemp closed this Oct 13, 2026
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