Skip to content

Add cross-cutting types for durable execution context operations#2372

Draft
GarrettBeatty wants to merge 1 commit into
gcbeatty/durable-child-contextfrom
gcbeatty/durable-wave0
Draft

Add cross-cutting types for durable execution context operations#2372
GarrettBeatty wants to merge 1 commit into
gcbeatty/durable-child-contextfrom
gcbeatty/durable-wave0

Conversation

@GarrettBeatty
Copy link
Copy Markdown
Contributor

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:

  • #TBD Callbacks (DOTNET-8660)
  • #TBD InvokeAsync (DOTNET-8661)
  • #TBD ParallelAsync (DOTNET-8662)
  • #TBD WaitForConditionAsync (DOTNET-8665)

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.
  • Removes a stale State.EnterExecutionMode() call left over from the per-operation replay-state refactor (commit 5cdab8d removed the API; ChildContextOperation still referenced it).

Design-doc alignment

  • Drop Serializer field from CallbackConfig, InvokeConfig, ChildContextConfig. Custom serializers flow through AOT-safe ICheckpointSerializer<T> overloads (matches the existing StepConfig pattern).
  • 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 is STARTED. Matches Python and JS.
  • IBatchResult<T> expanded to the full JS/Python surface: adds Started, GetErrors(), HasFailure, SuccessCount, FailureCount, StartedCount, TotalCount.

Test plan

  • Build clean (zero warnings, TreatWarningsAsErrors enforced)
  • All 165 existing unit tests pass on net8.0 and net10.0

🤖 Generated with Claude Code

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>
@GarrettBeatty GarrettBeatty force-pushed the gcbeatty/durable-wave0 branch from 464c591 to d308c3b Compare May 14, 2026 21:49
@GarrettBeatty GarrettBeatty force-pushed the gcbeatty/durable-child-context branch from e146869 to 369a029 Compare May 14, 2026 21:49
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.

1 participant