feat(testing): invoker state and checkpoint stamping#515
Draft
yaythomas wants to merge 1 commit into
Draft
Conversation
This was referenced Jul 7, 2026
yaythomas
commented
Jul 7, 2026
| @@ -33,7 +33,10 @@ | |||
|
|
|||
|
|
|||
| class ValidActionsByOperationTypeValidator: | |||
Contributor
Author
There was a problem hiding this comment.
ooof, this belongs elsewhere.
99be1b4 to
5017a88
Compare
yaythomas
commented
Jul 7, 2026
| @@ -1,66 +0,0 @@ | |||
| """Validator for valid actions by operation type.""" | |||
|
|
|||
| from __future__ import annotations | |||
Contributor
Author
There was a problem hiding this comment.
moved to CheckpointValidator
Align the local test runner's data-plane responses with the deployed service, validated against the JS example suite as a cross-language conformance check (failures reduced from 27 to 7; the remaining 7 are the unimplemented CHAINED_INVOKE operation and an upstream JS SDK replay bug). Invoker state and checkpoint stamping: - Track invocation state (PRE_INVOKE/INVOKING/COMPLETED) and gate checkpoints so at most one handler invocation is in flight per execution - Record per-update timestamps and stamp checkpoint operations with a monotonic sequence so delta computation and pagination share one snapshot - Offload handler invocation off the scheduler event loop so concurrent map/parallel branches no longer serialize on a single thread - Return a locked snapshot from in-process state reads History generation (GetDurableExecutionHistory): - Emit one history event per checkpoint update so step retries report the correct StepStarted/StepFailed counts and attempt numbers, instead of one pair per operation - Reconstruct events from recorded update transitions using the real operation for details, with a fallback for operations completed outside the checkpoint path Fidelity fixes: - Serialize Error and ReplayChildren in ContextDetails so child-context failures reconstruct the correct error class on replay - Store the RETRY payload as the step result so waitForCondition state replays, and map a RETRY without error to StepSucceeded - Set callback timeout errorType to Callback.Timeout/Callback.Heartbeat with the expected message strings Invocation timeout: - Add execution_timeout and invocation_timeout to the runner constructor and CLI to simulate the Lambda function Timeout; a timed-out invocation leaves the step STARTED and replays Closes #464 Closes #460 Closes #462 Closes #438 Closes #439
5017a88 to
11eebdc
Compare
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.
What
Align the local test runner's data-plane responses with the real service, validated against the JS example suite as a cross-language conformance check.
Changes
Invoker state and checkpoint stamping:
History generation (GetDurableExecutionHistory):
Fidelity fixes:
CheckpointCore.match_cachedas the single source of truth for idempotent checkpoint replay detection (both web and in-process paths delegate to it).Invocation timeout:
Testing
Stack
This is PR 1 of 2. PR 2 (per-execution worker serialization #516) builds on top.
Closes #464, #460, #462, #438, #439