Skip to content

Added the Workflow Streams stream provider. - #32

Open
moedash wants to merge 4 commits into
moe/AI-198-if-py-6-demofrom
moe/AI-198-if-py-7-workflow-streams-provider
Open

moedash wants to merge 4 commits into
moe/AI-198-if-py-6-demofrom
moe/AI-198-if-py-7-workflow-streams-provider

Conversation

@moedash

@moedash moedash commented Oct 3, 2026

Copy link
Copy Markdown
Owner

This PR adds WorkflowStreamsProvider, which serves the stream interface over the Workflow Streams transport we already ship.

What changed?

  • temporalio.streams.providers.workflow_streams keeps a workflow's records in its own History, as the item payload of the shipped log, with the serialized StreamRecord as data.
  • An outside publish is an Update that answers with where the batch landed. It refuses a repeat that doesn't match, deduped by producer, sequence and a content hash. It falls back to the shipped Signal when the workflow's worker predates the Update.
  • Reads page the tail with the shipped poll Update. A handle without a run id follows continue-as-new and a reset into the new run. An activity's streams live in the workflow's log under activity/<id>/<name>.
  • contrib.workflow_streams gets small hooks so the provider adopts its log and handlers rather than copying them. The missing-query failure text gets a constant, so the provider can match on it.

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

Why?

It's the provider that needs nothing but a Temporal server. The records ride the workflow's own History, so there's no other store to run or secure. It also proves the interface sits on top of what we ship today.

How did you test it?

Link to a test plan if any -

  • Unit Tests
  • Staging
  • End to End Tests

poe lint is clean. The conformance suite now runs on this provider as well as memory, along with the provider's own cases for dedupe, continue-as-new, reset and activity streams. They all pass on the stock dev server the fixtures start, and the shipped contrib.workflow_streams tests still pass.

The provider adopts the shipped log and its handlers rather than copying them, and names the missing-query failure by a constant.
It serves the stream interface over the shipped Workflow Streams transport, so a workflow's History holds the records and no other store is needed.
Plus the provider's own cases for publish dedupe, continue-as-new, reset and activity streams, on the stock dev server.
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