Generic Temporal Nexus Operation Handler - #690
Merged
jmaeagle99 merged 10 commits intoJun 3, 2026
Merged
Conversation
Quinn-With-Two-Ns
marked this pull request as ready for review
May 13, 2026 23:46
jmaeagle99
reviewed
May 27, 2026
jmaeagle99
left a comment
Contributor
There was a problem hiding this comment.
Still reviewing but wanted to leave my initial comments.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 9eb951c. Configure here.
jmaeagle99
approved these changes
Jun 2, 2026
| { | ||
| /// <summary> | ||
| /// Context used to create workflow run handles. This is passed to functions passed to | ||
| /// <c>FromHandleFactory</c> on <see cref="WorkflowRunOperationHandler"/>. |
Contributor
There was a problem hiding this comment.
Do we want to guide customers to use TemporalNexusOperationHandler instead of WorkflowRunOperationHandler? Obsoleting would be a forcing function. If not that, maybe update the comments on WorkflowRunOperationHandler and related types to recommend using the new types.
Quinn-With-Two-Ns
force-pushed
the
nexus-generic-handler
branch
from
June 3, 2026 17:38
3f24384 to
c354d2a
Compare
This was referenced Jun 5, 2026
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 a generic Nexus operation handler that consolidates the common pattern of "either return a synchronous
result or start a workflow as an async operation."
Why?
The existing
WorkflowRun/SyncOperationsplit forces users to pick the operation shape up front, which is awkward when:The new TemporalOperation unifies these cases behind one API and makes the common path much shorter.
Checklist
Closes
How was this tested:
Note
Medium Risk
Changes experimental Nexus operation start/cancel and callback token wiring shared by old and new handlers; mistakes could break async completion or cancel the wrong workflow, though coverage is broad.
Overview
Adds a unified experimental Nexus API (
TemporalOperationHandler.FromHandleFactory) so one handler can return either a sync result or an async workflow-run token, withITemporalNexusClient/TemporalNexusClientfor starting workflows and accessingTemporalClientfor signals and similar work.Shared workflow-start behavior (links, completion callbacks,
Nexus-Operation-Tokenheader with case-insensitive dedup,UseExistingconflict options, outbound links) moves intoNexusWorkflowStartHelper;WorkflowRunOperationContextnow delegates there instead of inlining that logic.Operation tokens gain
ParseToken, anOperationTokenrecord, and aWorkflowRunOperationTokenTypeconstant; cancel on the generic handler validates namespace and token type, then calls overridableCancelWorkflowRunAsync(default: cancel workflow by ID). Unit and worker integration tests cover tokens, sync/async paths, cancel, links, and conflict policy.Reviewed by Cursor Bugbot for commit c354d2a. Bugbot is set up for automated code reviews on this repo. Configure here.