Repository navigation
Propagate Nexus serialization context to workflow, update and activit… - #1717
Merged
Merged
Conversation
Sushisource
reviewed
Oct 27, 2026
| // Serialization context of the Nexus operation handler that started this activity, if any. | ||
| // Only set for standalone activities. Lang should use it to serialize the activity's result and | ||
| // failure, which are returned to the Nexus caller. | ||
| temporal.api.nexus.v1.PropagatedSerializationContext propagated_nexus_serialization_context = 20; |
Member
There was a problem hiding this comment.
It seems like this is added but not actually used?
Contributor
Author
There was a problem hiding this comment.
Yes nothing in this repo uses it currently. The SDKs built on Core (Python, TypeScript, .NET) will use it to encode the activity's result and failure with the Nexus serialization context of the handler that started it.
Member
There was a problem hiding this comment.
Ah, I see. And we can't add that to the Rust SDK yet because we don't have Nexus in the Rust SDK completely yet. Makes sense
Sushisource
approved these changes
Oct 27, 2026
This was referenced Oct 29, 2026
JoshuaFrenchwood
added a commit
to temporalio/sdk-typescript
that referenced
this pull request
Oct 30, 2026
Picks up temporalio/sdk-rust#1717, which passes the Nexus serialization context propagated by the server to lang on InitializeWorkflow, DoUpdate and the activity Start task. Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
What was changed
Added an optional
propagated_nexus_serialization_contextfield(
temporal.api.nexus.v1.PropagatedSerializationContext) to three messages Core sends tolanguage SDKs, and filled it in from what the server already returns:
InitializeWorkflow: fromWorkflowExecutionStartedEventAttributes. Each run aftercontinue-as-new gets it from its own started event.
DoUpdate: from the update request, so it's also set when the update is replayed from history.Start: fromPollActivityTaskQueueResponse. It's only set for standaloneactivities and is left empty for local activities.
Why?
When a Nexus operation handler starts a workflow, sends a workflow update, or starts a
standalone activity, the result and failure of that execution go back to the Nexus caller. The
caller decodes them with the operation's
NexusSerializationContext, but the worker encodes themwith the workflow or activity context. A codec that depends on the context, such as
per-endpoint encryption, then can't decode them.
Checklist
Closes
How was this tested:
start_from_poll_resp_propagates_nexus_serialization_contextstart_workflow_from_attribs_propagates_nexus_serialization_contextupdate_activation_has_propagated_nexus_serialization_context(the update arrives as a protocol message on a mocked poll)cargo test -p temporalio-sdk-core --lib(534 passed),cargo test -p temporalio-protos --liband
cargo test -p temporalio-sdk --liball pass.