Repository navigation
Detect coalesced update ordering in Schedule V2 replay - #2
Closed
davidporter-id-au wants to merge 0 commit into
Closed
davidporter-id-au wants to merge 0 commit into
davidporter-id-au wants to merge 0 commit into
Conversation
davidporter-id-au
force-pushed
the
fix/schedule-v2-replay-update-ordering
branch
from
August 13, 2026 06:14
7659e3f to
1fb7419
Compare
Owner
Author
|
Superseded by a draft PR against temporalio/temporal:main. |
davidporter-id-au
added a commit
that referenced
this pull request
Aug 20, 2026
#1: HandleNexusCompletion now resolves BufferedStarts via getBufferedStart, not invoker.runningWorkflowID (which has zero production callers left, confirmed by repo-wide grep). But executeNexusCompletion's shared driver was still asserting through that orphaned helper for six tests (Success, Failure, Canceled, PauseOnFailure, ReenablesDeferredStarts, CompletionBeforeStart) -- they happened to still pass since both functions filter on Completed==nil, but a future divergence between them would go unnoticed. Replaced with a direct check against invoker.BufferedStarts by RequestId, which is what the real completion path actually touches. #2: TestHandleNexusCompletion_AllowAllDoesNotUpdateCompletionState only ever exercised resolveOverlapPolicy's UNSPECIFIED-falls-back-to-the- schedule's-live-policy branch (it sets the schedule's OverlapPolicy to ALLOW_ALL but never stamps the BufferedStart's own OverlapPolicy field). Production always stamps a concrete policy onto BufferedStart at buffer time (spec_processor.go, backfiller_tasks.go), so completion should be reading that stamped value, not falling back to the schedule's current policy. Added TestHandleNexusCompletion_AllowAllReadsStartsOwnPolicy, which stamps ALLOW_ALL on the start while leaving the schedule's own policy at its Skip default -- verified by temporarily reverting HandleNexusCompletion to read the schedule's live policy instead and confirming this new test fails, then restoring the fix. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
V1 can consume a timer and update in one workflow task. The event-by-event harness may fire the nominal CHASM deadline before it encounters the update event, producing an old-input versus new-input false positive.
Production replay evidence
The representative request-input case moves from significant to inconclusive with the causal name v1_workflow_task_input_ordering.
Test plan