Skip to content

Detect Nexus operation changes during replay - #1405

Open
JSap0914 wants to merge 4 commits into
temporalio:mainfrom
JSap0914:fix/nexus-operation-determinism
Open

Detect Nexus operation changes during replay#1405
JSap0914 wants to merge 4 commits into
temporalio:mainfrom
JSap0914:fix/nexus-operation-determinism

Conversation

@JSap0914

Copy link
Copy Markdown

What

  • compare the service and operation in NexusOperationScheduled history events with the command produced during replay
  • report nondeterminism when either value changes
  • gate the new checks behind a dedicated Core internal flag so existing histories remain compatible
  • add regression coverage and an Unreleased changelog entry

Why

The Nexus operation state machine accepted scheduled history events without validating their service or operation. This allowed workflow code to change either field during replay without raising the non-determinism error used by comparable activity and child-workflow state machines.

Fixes #1231

Tests

  • cargo test -p temporalio-sdk-core nexus_operation_state_machine::tests --lib
  • cargo test -p temporalio-sdk-core --lib (367 passed, 1 ignored)
  • cargo clippy -p temporalio-sdk-core --lib --tests --all-features -- -D warnings
  • cargo fmt --all --check
  • git diff --check

@JSap0914
JSap0914 requested a review from a team as a code owner July 15, 2026 19:37
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Sushisource Sushisource left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for this! Makes perfect sense. I think adding an integration test would be great and then we can merge.

@Sushisource

Copy link
Copy Markdown
Member

@JSap0914 Looks like you need to run the formatter

JSap0914 added 2 commits July 23, 2026 08:46
Signed-off-by: JSup <hanjisang0914@gmail.com>
Signed-off-by: JSup <hanjisang0914@gmail.com>
@Sushisource
Sushisource enabled auto-merge (squash) July 23, 2026 16:44
@Sushisource

Copy link
Copy Markdown
Member

@JSap0914 We'll need you to sign the CLA too :)

@Sushisource

Copy link
Copy Markdown
Member

@JSap0914 - we can merge this if you sign the CLA. Thanks!

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.

[Bug] ScheduleNexusOperation doesn't raise NDE on Operation or Service mismatch

3 participants