Skip to content

Preserve Nexus operation payloads with RawValue - #483

Open
stephanos wants to merge 17 commits into
kitchen-sink-update-idfrom
nexus-raw-value-results
Open

Preserve Nexus operation payloads with RawValue#483
stephanos wants to merge 17 commits into
kitchen-sink-update-idfrom
nexus-raw-value-results

Conversation

@stephanos

@stephanos stephanos commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

The fix establishes one consistent rule: kitchen-sink Nexus results are opaque payloads and cross every result boundary as RawValue.

Why

The kitchen-sink APIs use common.Payload as an already-encoded, opaque value. Passing that value through the SDK as an ordinary *common.Payload causes the data converter to serialize it again, ie adding another payload wrapper/envelope.

Nexus exposed this because synchronous and asynchronous completions take different routes:

  • A synchronous result is returned directly by the Nexus handler.
  • An asynchronous workflow/update result is first persisted as the workflow or update result and later forwarded through a completion callback.

Using RawValue only in the Nexus caller was insufficient. It stopped decoding the outer envelope, but producers such as KitchenSinkWorkflow etc were still creating that envelope.

RawValue is the SDK abstraction specifically intended for forwarding an already-encoded payload, so this avoids custom converter special cases and makes results independent of whether the operation completed synchronously or asynchronously.

@stephanos
stephanos requested review from a team as code owners September 10, 2026 15:25
@stephanos
stephanos marked this pull request as draft September 10, 2026 15:31
@stephanos
stephanos force-pushed the nexus-raw-value-results branch from 2018c33 to 28b5e16 Compare September 10, 2026 18:47
@stephanos
stephanos changed the base branch from main to kitchen-sink-update-id September 10, 2026 18:47
@stephanos
stephanos added this pull request to stack #485 September 10, 2026 18:47
@stephanos
stephanos force-pushed the nexus-raw-value-results branch from 3bc4e4d to 7c79583 Compare September 10, 2026 19:47
NexusOperationCompleted
NexusOperationCompleted {"links":[{"workflowEvent":{"workflowId":"nexus-sync-update-target","requestIdRef":{"eventType":"EVENT_TYPE_WORKFLOW_EXECUTION_UPDATE_ACCEPTED"}}}]}`),
expectedUnsupportedErrs: nexusWorkflowActionUnsupportedSDKs,
},

@stephanos stephanos Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is the main regression we're fixing.

The other ones I added here are also valuable, ofc. They increase confidence in the overall change here.

@stephanos
stephanos marked this pull request as ready for review September 10, 2026 19:56
@stephanos
stephanos requested a review from THardy98 September 10, 2026 19:56

@THardy98 THardy98 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.

thanks for doing this across all workers!

Not blocking, but I believe there's an identity converter in the code somewhere (i.e payloadA -> identity converter just returns ... -> payloadA) that should no longer be necessary.

If so, would you mind filing an issue to remove it?

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