Skip to content

fix: mark system Nexus envelope payloads - #799

Draft
tconley1428 wants to merge 2 commits into
transfer-type-converter-contextfrom
fix/system-nexus-payload-marker
Draft

fix: mark system Nexus envelope payloads#799
tconley1428 wants to merge 2 commits into
transfer-type-converter-contextfrom
fix/system-nexus-payload-marker

Conversation

@tconley1428

@tconley1428 tconley1428 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What changed

  • Mark System Nexus envelopes when they are created.
  • Detect marked envelopes anywhere workflow codecs visit a payload, so nested user payloads are encoded and decoded after an envelope is stored in a generic payload field.
  • Keep unmarked payloads on the regular codec path and preserve batch codec behavior for ordinary payload collections.

Blocked on server behavior

This stacked draft depends on #846. It must not be completed until the server marks System Nexus
operation result payloads as System envelopes too. The server currently returns an unmarked
binary-protobuf completion payload, which a workflow codec correctly treats as an ordinary payload
and may transform, making the outer response no longer parseable.

Comment thread src/Temporalio/Worker/SystemNexusPayloadVisitor.cs Outdated
Comment thread src/Temporalio/Worker/WorkflowCodecHelper.cs Outdated
Comment thread src/Temporalio/Worker/WorkflowCodecHelper.cs Outdated
Comment thread src/Temporalio/Worker/WorkflowCodecHelper.cs
Comment thread CHANGELOG.md Outdated
ConfigureAwait(false);
}
await DecodeAsync(
nexusCodec, job.ResolveNexusOperation.Result.Completed).

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.

This payload possibly does not have the system payload marker on it even if it is a system payload. Which means that it'll go through the normal user codec decode path and then fail deserialization causing the workflow to continuously fail the task and timeout the ExecuteWorkflowAsync_SignalWithStartFromWorkflow_Succeeds test. Might need to check for the marker or see if it's from the system nexus endpoint; or maybe somehow stamp the payload with the marker if it comes from the system nexus endpoint before we attempt the decode here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In what scenario would it be a system payload without the system payload marker? That should be tautologically equivalent as far as I know. (At least once server is updated sufficiently) Are you talking backwards compat or something else?

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.

Back compat. Today, system payloads are identified by the endpoint, but this change completely drops that (I think). So in-flight workflows that do not have the new marker now going through the path of decoding the envelop. But if you don't care about those, then I think this is fine.

But I see that ExecuteWorkflowAsync_SignalWithStartFromWorkflow_Succeeds hung in every job. It's likely retrying a workflow task indefinitely for some reason. Probably due to the missing marker.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah, this was in draft for a reason. All you say is true, but it's also not enabled at all yet, so we're good to do the breaking change. Nice catch though.

Comment thread tests/Temporalio.Tests/Worker/WorkflowCodecHelperTests.cs
@jmaeagle99 jmaeagle99 self-assigned this Aug 17, 2026
@tconley1428
tconley1428 force-pushed the fix/system-nexus-payload-marker branch from 2aed537 to fc95a27 Compare August 18, 2026 23:30
@tconley1428
tconley1428 changed the base branch from main to transfer-type-converter-context August 18, 2026 23:30
@tconley1428
tconley1428 force-pushed the fix/system-nexus-payload-marker branch from fc95a27 to adde828 Compare August 18, 2026 23:46
@tconley1428
tconley1428 force-pushed the fix/system-nexus-payload-marker branch from adde828 to 81ed67a Compare August 19, 2026 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants