Skip to content

Added the temporalio.streams interface to the external-streams branch. - #44

Open
moedash wants to merge 3 commits into
moe/AI-198-if-pyext-7-parked-run-queryfrom
moe/AI-198-if-pyext-8-external-interface
Open

moedash wants to merge 3 commits into
moe/AI-198-if-pyext-7-parked-run-queryfrom
moe/AI-198-if-pyext-8-external-interface

Conversation

@moedash

@moedash moedash commented Oct 3, 2026

Copy link
Copy Markdown
Owner

This PR brings the temporalio.streams interface to the external-streams branch, so a workflow, an activity and a client open streams the same way on both SDK chains.

What changed?

  • temporalio/streams: records, typed topics, cursors, the error family, the provider protocols, ProviderPlugin, StreamRef, the body helpers and MemoryStreams.
  • workflow.stream_reader() and workflow.stream_writer(), activity.stream_handle(), Client.get_stream_handle() and create_stream(), and the stream_provider option on client, worker and replayer.
  • The conformance suite in tests/streams, including the wake and leaving cases a provider opts into with capability flags.
  • A refuses_appends_past_byte_cap capability on the byte-cap case, for a store that refuses an append past its cap rather than dropping old records. No provider on this branch sets it yet.
  • The streams_demo agent loop and its changelog entry.

Part of AI-198 (epic AI-37).

Why?

The external runtime is one way to back the stream interface. Without the interface on this branch, the Redis provider in the next PRs would have nothing to implement. This mirrors the main chain's interface, so the eventual union has one copy. The byte-cap flag keeps the suite valid for a store that refuses rather than trims, which the native provider on the main chain is.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

poe lint is clean at each commit. The streams suite and the external stream suite pass on the dev server. Against a channel server the streams suite passes too. The wake and leaving cases skip on the memory provider, which doesn't declare them. They run once the Redis provider lands.

The external chain gets the same stream interface the main chain defines: the
record and topic types, the provider protocols, the memory provider, the
workflow reader and writer, the activity and client accessors, and the
stream_provider option on client, worker and replayer.
The suite runs every provider case against the same contract. The byte-cap
case now also covers a store that refuses an append past its cap, which a
provider declares with refuses_appends_past_byte_cap.
One agent loop runs against whichever provider the setup names, so the demo
shows the interface rather than one store.
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