Skip to content

feat(nexus): add async, cancellation, failure and parallel features - #871

Open
xepozz wants to merge 2 commits into
temporalio:mainfrom
xepozz:feature/nexus-feature-set
Open

feat(nexus): add async, cancellation, failure and parallel features#871
xepozz wants to merge 2 commits into
temporalio:mainfrom
xepozz:feature/nexus-feature-set

Conversation

@xepozz

@xepozz xepozz commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Four Nexus scenarios implemented in Go and Java: an async workflow-run operation, cancelling a running async operation, a sync operation that fails with an application error, and three parallel sync operations.

What was changed

Why?

Checklist

  1. Closes

  2. How was this tested:

  1. Any docs updates needed?

Four Nexus scenarios implemented in Go and Java: an async workflow-run
operation, cancelling a running async operation, a sync operation that fails
with an application error, and three parallel sync operations.
@xepozz
xepozz requested review from a team as code owners August 19, 2026 06:11

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d5d438ca6c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}
return runner.Client.ExecuteWorkflow(ctx, opts, Workflow, runner.NexusEndpoint)
},
CheckHistory: func(ctx context.Context, runner *harness.Runner, run client.WorkflowRun) error {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve default replay in Go history checks

When this feature runs, assigning CheckHistory replaces the harness path that calls Runner.CheckHistoryDefault (harness/go/harness/runner.go lines 151-157), so neither the current executions—including the backing workflow—nor stored histories are replayed. Run the default checker after the event assertion; the same omission occurs in the other three newly added Go Nexus features.

Useful? React with 👍 / 👎.

}

@Override
public void checkHistory(Runner runner, Run run) throws Exception {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve default replay in Java history checks

Overriding checkHistory here bypasses the default implementation in Feature.java, which calls runner.checkCurrentAndPastHistories(run). Consequently this feature never replay-checks its caller or backing workflow and cannot detect compatibility regressions against saved histories; invoke the default replay helper after the custom assertion. The other three new Java Nexus features have the same omission.

Useful? React with 👍 / 👎.

.getResult()
.handle(
(value, failure) -> {
resultHolder[0] = failure == null ? "completed" : "cancelled";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Verify that the operation actually reports cancellation

When the operation result fails for any reason after scope.cancel()—for example a timeout or backing-workflow application failure—this callback labels it "cancelled", and the workflow plus history assertion still pass. Since the feature specifically promises to observe a cancellation error, inspect the failure chain for CanceledFailure rather than treating every non-null failure as cancellation.

Useful? React with 👍 / 👎.

The java handler threw a bare application failure, which the SDK reports as a
handler error, so the two languages were asserting different contracts.
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.

1 participant