Skip to content

Detect Nexus operation changes during replay - #1645

Merged
Sushisource merged 4 commits into
mainfrom
sushisource/nexus-operation-determinism
Oct 12, 2026
Merged

Sushisource merged 4 commits into
mainfrom
sushisource/nexus-operation-determinism

Conversation

@Sushisource

@Sushisource Sushisource commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Replaces #1405

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

Testing

  • 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

Port the changes from #1405, originally contributed by JSap0914.
@Sushisource
Sushisource enabled auto-merge (squash) October 9, 2026 21:42
@Sushisource
Sushisource merged commit 8e98871 into main Oct 12, 2026
23 of 24 checks passed
@Sushisource
Sushisource deleted the sushisource/nexus-operation-determinism branch October 12, 2026 23:59
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

2 participants