Add cross-cutting types for durable execution context operations#2372
Draft
GarrettBeatty wants to merge 1 commit into
Draft
Add cross-cutting types for durable execution context operations#2372GarrettBeatty wants to merge 1 commit into
GarrettBeatty wants to merge 1 commit into
Conversation
This was referenced May 14, 2026
Lays down shared types/constants for the upcoming durable-execution context operations (Callbacks, Invoke, Parallel, Map, WaitForCondition) and updates the design doc to match decisions reached after comparing against the Python, JS, and Java reference SDKs. SDK changes: - OperationSubTypes constants class (Step, Wait, Callback, WaitForCallback, Invoke, WaitForCondition, Parallel, ParallelBranch, Map, MapIteration). Replaces hard-coded SubType literals in StepOperation and WaitOperation. - OperationStatuses.TimedOut for callback/invoke timeout handling. Design-doc alignment: - Drop Serializer field from CallbackConfig, InvokeConfig, ChildContextConfig. Custom serializers flow through AOT-safe ICheckpointSerializer<T> overloads (matches the existing StepConfig pattern documented at line 1247). - InvokeConfig gains TenantId (matches Python/JS/Java); drops PayloadSerializer / ResultSerializer. - BatchItemStatus.Cancelled -> Started. The SDK does not synchronously cancel branches; the wire state of items still in flight when the batch resolves (e.g., FirstSuccessful short-circuit) is STARTED. Matches Python and JS. - IBatchResult<T> expanded to the full JS/Python surface: adds Started, GetErrors(), HasFailure, SuccessCount, FailureCount, StartedCount, TotalCount. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
464c591 to
d308c3b
Compare
e146869 to
369a029
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.
Summary
Lays down shared types/constants for the upcoming durable-execution context operations (Callbacks, Invoke, Parallel, Map, WaitForCondition) and aligns the design doc with decisions reached after comparing against the Python, JS, and Java reference SDKs.
This PR is the foundation for a stack of feature PRs:
SDK changes
OperationSubTypesconstants class (Step, Wait, Callback, WaitForCallback, Invoke, WaitForCondition, Parallel, ParallelBranch, Map, MapIteration). Replaces hard-coded SubType literals in StepOperation and WaitOperation.OperationStatuses.TimedOutfor callback/invoke timeout handling.State.EnterExecutionMode()call left over from the per-operation replay-state refactor (commit 5cdab8d removed the API; ChildContextOperation still referenced it).Design-doc alignment
Serializerfield fromCallbackConfig,InvokeConfig,ChildContextConfig. Custom serializers flow through AOT-safeICheckpointSerializer<T>overloads (matches the existingStepConfigpattern).InvokeConfiggainsTenantId(matches Python/JS/Java); dropsPayloadSerializer/ResultSerializer.BatchItemStatus.Cancelled->Started. The SDK does not synchronously cancel branches; the wire state of items still in flight when the batch resolves is STARTED. Matches Python and JS.IBatchResult<T>expanded to the full JS/Python surface: addsStarted,GetErrors(),HasFailure,SuccessCount,FailureCount,StartedCount,TotalCount.Test plan
🤖 Generated with Claude Code