Skip to content

Propagate Nexus serialization context to workflow updates - #3172

Open
JoshuaFrenchwood wants to merge 1 commit into
nexus-serialization-context-updatesfrom
nexus-serialization-context-workflow-update
Open

JoshuaFrenchwood wants to merge 1 commit into
nexus-serialization-context-updatesfrom
nexus-serialization-context-workflow-update

Conversation

@JoshuaFrenchwood

Copy link
Copy Markdown
Contributor

What was changed

Nexus operation handlers now propagate their NexusSerializationContext to the workflow updates
they send.

  • Workflow updates: the update request carries the context. The worker encodes the update's
    result, failure and rejection with it, and update handles decode with the context returned on the
    update and poll responses.
  • Update arguments keep the workflow context.

Why?

A Nexus handler returns the result and failure of the update it sends to the Nexus caller. The
caller decodes them with the operation's NexusSerializationContext, so a codec keyed on the
context couldn't decode them when they were encoded with the workflow context.

Checklist

  1. Closes

  2. How was this tested:

  • Unit tests for the client invoker's update request, completed update and poll.
  • WorkflowUpdateNexusSerializationContextTest: the in-memory server sends real updates with the
    context set, covering update result, failure, rejection and replay.
  • End-to-end NexusSerializationContextPropagationTest on the dev server: a caller workflow goes
    through a Nexus endpoint to a handler that sends a workflow update.
  1. Any docs updates needed?

@JoshuaFrenchwood
JoshuaFrenchwood requested a review from a team as a code owner October 27, 2026 20:52
@JoshuaFrenchwood
JoshuaFrenchwood force-pushed the nexus-serialization-context-workflow-update branch from 9cb96e2 to cee99cc Compare October 27, 2026 21:02

@Evanthx Evanthx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@JoshuaFrenchwood
JoshuaFrenchwood force-pushed the nexus-serialization-context-workflow-update branch from cee99cc to f31c42b Compare October 28, 2026 15:46
@JoshuaFrenchwood
JoshuaFrenchwood force-pushed the nexus-serialization-context-workflow-update branch from f31c42b to 67e8832 Compare October 28, 2026 19:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants