Conversation
The stream service has no SDK client, so its commands need the dialed connection with its TLS, credentials, headers and interceptors. Dialing makes a call, so an interceptor captures it.
Create, list, describe, read, append, close, truncate and delete reach a standalone Stream or one a Workflow or Activity owns. Describe also names the channel the Stream notifies.
The server ships streams off so a deployment opts in, and the dev server exists for local development. A dynamic config value still turns them off.
The page covers addressing, the refusals and the dev server switch in one place for people trying streams from a terminal.
Fake-service cases pin the channel card for each owner kind, and the shared dev server cases run the stream lifecycle, an owned Stream and the channel a Stream notifies.
2 of 3 tasks
Owner
Author
|
Paused per the 2026-10-05 design review (the decision record is on the proposal page, section 14). Resumes in phase 2 with the CHASM notification work. The branch stays as a pin. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
temporal stream, turns streams on in the dev server and documents the commands.What changed?
temporal stream create,list,describe,read,append,close,truncateanddelete.--stream-idnames a standalone Stream.--workflow-idor--activity-id, with an optional--run-idand--name, names an owned one.readstarts at the beginning,--from-offset,--from-tailor--last N, filters on--topic, and--followlong-polls until the Stream closes.createtakes--retention,--max-itemsand--max-bytes.listcovers standalone Streams only, since visibility holds no owned ones.describenames the channel the Stream notifies on each append and close, with its kind and owner line, so you can hand it straight totemporal channel poll. It's worked out from the reference with no extra call, for all four owner kinds.refusalErrorthe channel commands already use.client.gokeeps the connection the SDK dials, through an interceptor, so TLS, API keys and headers match every other command. The commands apply the payload codec by hand, since the codec interceptor only walks the public API's messages.temporal server start-devsetsstream.enabled.--dynamic-config-value 'stream.enabled=false'turns it off.docs/stream.mdcovers addressing, the refusals and the dev server switch.Part of AI-198 (epic AI-37).
Why?
It gives native Streams a terminal front, and a local server that serves them without a build from the branch. The server ships streams off so a deployment opts in, and the dev server is where you'd opt in.
createlets you make a standalone Stream to close, truncate or delete. The channel card ties the two groups together: a Stream's notifications can be watched with the channel commands from the PR below.How did you test it?
Link to a test plan if any -
A unit test against a fake stream service checks the channel card for a standalone Stream, a Workflow's default and named Streams, an Activity the Workflow scheduled and a standalone Activity. The
TestStreamsuite cases on the shared dev server cover the standalone lifecycle with each refusal,--followending on close, an owned Stream,list, flag checks and a standalone Stream notifying its channel. The activity case inTestChannelnow also appends to the Activity's Stream and polls its linked channel. I reran the rest ofSharedServerSuiteand the other packages, andgo mod tidyand the generators leave no diff. By hand ontemporal server start-dev --headlessI ran every stream command on a standalone Stream, saw its channel carry the appends and thenclosed=true, read a Workflow's Stream through its linked channel, and checked the channel commands still work. No test covers the codec path.