Expected Behavior
The callback is rejected.
Actual Behavior
A Nexus callback carrying an older operation token is accepted after a retry persists a new token, allowing a stale remote operation to supply the workflow result when endpoint retries create distinct operations.
Step to Reproduce
- Start a standalone nexus operation
- In the Nexus handler, on the first attempt, start a workflow that completes after a 5 seconds and fail the Nexus request with a retryable error
- In the Nexus handler, on the second attempt, start a workflow that is blocked on a signal, respond successfully to the Nexus request
- Observe the standalone Nexus operation, it should be completed and link to the blocked workflow
Notes
We are currently relying on handler idempotency for correctness. We had to choose to either ignore or accept completions for executions that are created from a previous attempt, and we decided to accept them. I think it's a valid point that we may want to reconsider. This hurts the debugging experience when the link on the caller workflow points to a backing primitive and the completion comes from a different primitive.
Expected Behavior
The callback is rejected.
Actual Behavior
A Nexus callback carrying an older operation token is accepted after a retry persists a new token, allowing a stale remote operation to supply the workflow result when endpoint retries create distinct operations.
Step to Reproduce
Notes
We are currently relying on handler idempotency for correctness. We had to choose to either ignore or accept completions for executions that are created from a previous attempt, and we decided to accept them. I think it's a valid point that we may want to reconsider. This hurts the debugging experience when the link on the caller workflow points to a backing primitive and the completion comes from a different primitive.