Skip to content

Standardize Nexus Operation Input Arg. Deserialization Failure#1949

Merged
Quinn-With-Two-Ns merged 5 commits intotemporalio:mainfrom
Quinn-With-Two-Ns:issue-1948
Mar 10, 2026
Merged

Standardize Nexus Operation Input Arg. Deserialization Failure#1949
Quinn-With-Two-Ns merged 5 commits intotemporalio:mainfrom
Quinn-With-Two-Ns:issue-1948

Conversation

@Quinn-With-Two-Ns
Copy link
Contributor

@Quinn-With-Two-Ns Quinn-With-Two-Ns commented Feb 23, 2026

Standardize Nexus Operation Input Arg. Deserialization Failure. Previously typescript was treating all failures as non-retryable. After consolation with the SDK team, the agreed behaviour is in core based SDKs failures from the payload converter are non retry able (BAD_REQUEST), and failures in the codec are retry able (INTERNAL) and ApplicationFailureException should be respected.

see also: temporalio/features#762

closes temporalio/sdk-dotnet#614


Note

Medium Risk
Changes Nexus operation input decoding error classification and retryability, which can alter production retry behavior and error surfaces for callers. Scope is contained and covered by new integration tests, but impacts a core request path.

Overview
Standardizes Nexus operation input deserialization error handling so payload codec decode failures are surfaced as INTERNAL nexus.HandlerErrors (with underlying cause attached) to allow retries, while payload converter failures become BAD_REQUEST handler errors and remain non-retryable; ApplicationFailure is now passed through without being wrapped.

Adds integration coverage to verify codec failures are retried and converter failures are not (including a new intentionally failing payload converter), and slightly relaxes an existing JSON parse error assertion in test-nexus-handler.ts.

Written by Cursor Bugbot for commit 608ad70. This will update automatically on new commits. Configure here.

@Quinn-With-Two-Ns Quinn-With-Two-Ns marked this pull request as ready for review February 23, 2026 17:42
@Quinn-With-Two-Ns Quinn-With-Two-Ns requested a review from a team as a code owner February 23, 2026 17:42
});

t.true(decodeCount >= 2, `Expected decode count >= 2, got ${decodeCount}`);
});
Copy link

Choose a reason for hiding this comment

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

Codec retry test may hit wrong decode

Low Severity

failingCodec is installed on both the Worker and the Client, so the first decode failure can occur while decoding workflow inputs/other payloads (before any Nexus operation input is decoded). This can make the test pass without exercising the intended Nexus operation codec failure path, and can also make it flaky depending on decode ordering.

Fix in Cursor Fix in Web

Copy link

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

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: b0cac77d95

ℹ️ 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".

Comment on lines +40 to +41
if (decodeCount === 1) {
throw new Error('Intentional codec decode failure');

Choose a reason for hiding this comment

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

P2 Badge Fail codec on Nexus decode path only

This injection throws on the first decode call globally, but the same codec is also configured on the worker (dataConverter.payloadCodecs) where it is used for workflow activation decoding (WorkflowCodecRunner.decodeActivation) before the Nexus handler runs. That means the initial failure can be consumed outside the Nexus operation path, and decodeCount >= 2 can still pass even if Nexus input deserialization is never retried, so this test can miss regressions in the behavior this commit is trying to validate.

Useful? React with 👍 / 👎.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit e637140 into temporalio:main Mar 10, 2026
71 of 78 checks passed
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.

[Feature Request] Standardize Nexus Operation Input Arg. Deserialization Failure

2 participants