Conversation
A notification on the scheduled event is how the server wakes a parked run that listens on a channel, so the waits resume as for an unparked wake. The notifications come from History, so replay resumes the same waits.
Lang reports the full set of channels its open readers listen on, and Core turns the change into unsubscribe and subscribe commands on the completion that ends the task, after the progress marker. A run-ending completion issues none, since the subscription ends with the run.
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 makes the notification channel the external stream runtime's wake.
What changed?
WorkflowStreamChannels, bridge command 33. It's local to Core and never reaches the server. A report with an empty name, a repeated name or a second report in one completion fails the task.ChannelSubscriptionstracks the reported set against the subscribed one. On the completion that ends the task, Core unsubscribes the channels that left the set, then subscribes the new ones, after the progress marker. A run-ending completion issues neither.Part of AI-198 (epic AI-37).
Why?
A parked external run needs something to wake it when a provider writes. A notification rides the scheduled event of the task it produces, so the run wakes without a Signal event in its History. Subscribing from the activation that opened the reader would end a task that's meant to stay retained, so the commands wait for the completion that ends it. Unsubscribing first lets a run that rotates channels free its slot before taking a new one.
How did you test it?
Link to a test plan if any -
ChannelSubscriptionshas its own unit tests. The external stream suite covers a parked wait resumed live and after replay, subscriptions held until a park or finalization ends the task, ordering after the marker, nothing on a run-ending completion or for a channel already held, a swap that unsubscribes first, both replay paths and a malformed report. The whole Core lib suite passes, including the coverage reporter. The lints and fmt are clean, and every commit builds.