Repository navigation
Conversation
The five channel calls and linked_to name the owner as an Execution. The frontend settles the type, from the HTTP route where the path bound only the business id. A standalone activity holds linked channels as a workflow run does, but is not among their listeners: nothing like a Workflow Task would carry a notification to it.
The stream notifies stream/<name> linked to the activity in place of the independent stream/<activity id>/<name>, and the activity's completion closes its streams, which is the last change. Linked channels are detached from the owner's lifecycle so that close reaches a callback after the owner ended.
This was referenced Oct 3, 2026
…rv-14-execution-reference
The execution and linked_to fields take the numbers the public messages use, and nothing stays reserved, since the earlier shape never shipped.
Owner
Author
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 addresses a linked channel's owner as an
Execution, a workflow run or a standalone activity, and gives a standalone activity linked channels of its own.What changed?
executionin place ofworkflow_execution, andlinked_toon a notification and onDescribeChannelResponseis anExecutionwith its type, business id and run id. The frontend settles the type before routing:WORKFLOWandACTIVITYas given, unset asWORKFLOW,NEXUS_OPERATIONrefused withInvalidArgument. The HTTP routes bind the business id alone and cannot set the enum, so the gateway annotates each call with the kind of route it matched and the frontend readsactivities/asACTIVITY.channel.linkedKindEnabledoff still ignoresexecutionand reaches the independent channel.Executiontoo, on the numbers the public messages use, and the linked RPCs route onexecution.business_id. The channel service's five linked handlers are written once over achannel.LinkedOwnerand dispatched on the execution's type to the Workflow or the Activity component.channel.LinkedChannelsholds the create path and the bound for both owners, andchannel.maxLinkedChannelsPerWorkflowkeeps its name and applies per execution.LinkedChannelsas the Workflow does, with the retained ring, callbacks and pollers. The activity is not among its channels' listeners: a workflow run is woken through its next Workflow Task, and an activity has no event like it to carry a notification, so a notify reaches callbacks and pollers only, the listener count leaves it out andDescribeChannellists no owner entry. The owner's archetype decides this, throughchannel.OwnerListens.stream/<name>linked to the activity, in place of the independentstream/<activity id>/<name>. A workflow activity's stream keepsstream/<activity id>/<name>linked to the workflow, and a standalone stream keeps the independentstream/<stream id>.stream.OwnedChannelAddress(owner, name)is the one derivation of channel name and linked execution for a stream owner, so the CLI and the SDKs compute what the server does. The activity's completion closes its streams and announces the close, as a workflow does for its activities' streams.tests/activity_channel_test.gocovers notify, poll and describe on an activity with and without the run id, the probe on an untouched name, a URL callback posted withlinkedToof typeACTIVITY, the stream announcing its appends and its close, the HTTP activity route inferring the type, the switch off ignoringexecution, andNEXUS_OPERATIONrefused. The workflow cases assert the type onlinked_to. Unit tests cover the frontend resolution, the channel address derivation and the activity owner rule.Part of AI-198 (epic AI-37).
Why?
The proposal's review asked for a linked channel to be addressed by a general execution reference rather than a workflow, so a stream a standalone activity owns can have a linked channel like a workflow's stream has. The API already had
temporal.api.common.v1.Execution, so the public change is a field swap and the server change is the owner abstraction behind it. The activity owner differs from the workflow owner in one way, it cannot be woken, and that difference is stated where it is decided rather than spread over the handlers.How did you test it?
go build ./..., golangci-lint and theerrortypevet are clean on the channel, activity, workflow and stream libraries, the frontend andtests. Unit tests ran for those packages, with the new cases for the resolution ofExecution, the channel address of a stream owner and the activity owner rule. The functional tests ran with-tags disable_grpc_modules,test_dep: the new activity channel suite, and the notification channel, linked channel, inline handoff, stream channel, describe channels and unsubscribe suites, with the workflow cases unchanged apart from the type assertions onlinked_toand the owner helper's type. The api-go pin to theExecutionhead was cascaded through every lower layer first, with the owner read as anExecutionon the layers that reach it.