Conversation
A workflow subscribes by command or listens on its linked channel, and Core hands the notifications over as a job. The handle routes them by kind and ends with unsubscribe().
Describe is how an operator sees what a run listens on and what is pending for it.
The unit cases drive the instance with hand-built activations. The live cases skip unless -E names a channel server.
This was referenced Oct 3, 2026
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 lets a workflow subscribe to a notification channel, listen on its own linked channel, and see its subscriptions on describe.
What changed?
workflow.subscribe_channel(name)records the subscribe command once per channel per run.workflow.linked_channel(name)needs no command, since the owner listens by construction.ChannelSubscriptionhands notifications over in order, routes them by kind, and ends withunsubscribe(). After that,closedis true and a late notification is dropped.notifications_receivedjob to the right handle.WorkflowExecutionDescription.channel_subscriptionswithChannelSubscriptionInfo.-Enames a server that serves channels. There are no Core gates. The pinned Core already handles the commands and delivers the job.Part of AI-198 (epic AI-37).
Why?
A workflow that waits on something outside it shouldn't poll. With a subscription it sleeps until the server hands it a notification on a Workflow Task. Notifications travel in History, so a replay sees the same ones at the same points. Describe is how an operator checks what a run listens on and what's pending for it.
How did you test it?
Link to a test plan if any -
poe lintis clean. The unit cases drive a workflow instance with hand-built activations, covering the shared subscription, ordering, drops, kinds and unsubscribe. Then I ran the whole channel file with-Eagainst a local server built from the channel server PRs. That covered a workflow receiving a client notification, the linked channel's life and its owner as an execution, polling by workflow id, both describe cases, and an unsubscribe followed by a notify that wakes nothing. Every case passed and none skipped.