Skip to content

Add WaitForConditionAsync polling primitive (DOTNET-8665)#2376

Draft
GarrettBeatty wants to merge 9 commits into
feature/durablefunctionfrom
gcbeatty/durable-waitforcondition
Draft

Add WaitForConditionAsync polling primitive (DOTNET-8665)#2376
GarrettBeatty wants to merge 9 commits into
feature/durablefunctionfrom
gcbeatty/durable-waitforcondition

Conversation

@GarrettBeatty
Copy link
Copy Markdown
Contributor

@GarrettBeatty GarrettBeatty commented May 14, 2026

#2216

What

Adds service-mediated polling to Amazon.Lambda.DurableExecution. WaitForConditionAsync repeatedly evaluates a check function with a configurable wait strategy between attempts; each iteration runs in its own Lambda invocation (suspended via STEP + RETRY checkpoints carrying NextAttemptDelaySeconds), so polling does not consume compute time while waiting between checks.

Public API:

Type Purpose
IDurableContext.WaitForConditionAsync<TState>(...) Poll until the user-supplied predicate signals done or maxAttempts is exhausted. Per-iteration state is serialized via the ILambdaSerializer registered on ILambdaContext.Serializer (same pattern as StepAsync / RunInChildContextAsync).
IConditionCheckContext Passed to the check func: Logger, AttemptNumber.
WaitForConditionConfig<TState> Required InitialState + WaitStrategy.
IWaitStrategy<TState> Decide(state, attempt) returning WaitDecision.
WaitDecision Readonly record struct: ShouldContinue, Delay, factories Stop() / ContinueAfter(TimeSpan).
WaitStrategy factories Exponential, Linear, Fixed, FromDelegate — each accepting an optional Func<TState, bool> isDone predicate.
WaitForConditionException Thrown when maxAttempts is exhausted; carries AttemptsExhausted and LastState (preserved across both live execution and replay).

How

Internal/WaitForConditionOperation<TState> runs as a STEP with SubType = "WaitForCondition":

  • Each iteration calls the user check function with the current state. The strategy's Decide(state, attempt) returns either Stop() (success — return state) or ContinueAfter(delay) (suspend until next attempt). Continuing emits Action=RETRY with the new state in the payload and NextAttemptDelaySeconds set so the durable execution service schedules the next invocation without consuming compute time.
  • Strategies signal max-attempts exhausted by throwing WaitForConditionException directly from Decide(); the operation enriches with LastState before checkpointing FAIL. LastState survives FAIL replay: serialized into the FAIL payload at write time and deserialized in BuildFailureException with a warning-logged fallback for legacy / corrupt data.
  • Serialization is delegated to the registered ILambdaSerializer via stream-based Serialize<T> / Deserialize<T> calls — no AOT trim attributes on the public API. Mirrors StepOperation / ChildContextOperation.
  • ExponentialBackoff helper is extracted for sharing between this operation and ExponentialRetryStrategy. Math is byte-for-byte identical to the existing implementation.
  • Reuses OperationSubTypes.WaitForCondition from Wave 0 (doc updates #2372).

Defaults: 60 attempts, 5s initial delay, 300s max delay, 1.5x rate, Full jitter — distinct from RetryStrategy.Default and matching Python/JS/Java reference SDKs.

Cross-SDK note: Python returns success on max-attempts exhausted; .NET / Java / JS throw. Workflows ported from Python should review for new failure modes. Documented in the design doc.

Stacked on top of #2372.

Fixes DOTNET-8665.

Testing

41 new unit tests covering each wait strategy, the isDone predicate paths, max-attempts exhaustion, user-check exceptions, replay determinism, exponential-backoff bounds, and corrupt-payload fallback logging:

  • Each WaitStrategy factory: Exponential, Linear, Fixed, FromDelegate — both with and without isDone predicate.
  • WaitForConditionException thrown after max-attempts; AttemptsExhausted + LastState populated.
  • Replay determinism: SUCCEEDED returns cached state, FAILED reconstructs WaitForConditionException with LastState, STARTED re-suspends.
  • LastState survives FAIL replay; corrupt FAIL payload falls back gracefully with a warning.
  • ExponentialBackoff shared math: byte-for-byte identical to ExponentialRetryStrategy (regression test).
  • User check function throws are surfaced with the original exception preserved.

5 new integration tests build successfully (require AWS credentials to run).

Build clean: 0 warnings, 0 errors on net8.0 and net10.0.

Out of scope (follow-up PRs)

  • MapAsync / continued parallel-suite work.
  • DurableLogger replay-suppression (currently NullLogger).
  • Annotations source-generator integration / [DurableExecution] attribute.
  • DurableTestRunner / Amazon.Lambda.DurableExecution.Testing package.
  • dotnet new lambda.DurableFunction blueprint.

GarrettBeatty and others added 5 commits May 11, 2026 23:03
stack-info: PR: #2361, branch: GarrettBeatty/stack/3
Implements the minimum viable slice of the Amazon.Lambda.DurableExecution
SDK: a workflow can run StepAsync and WaitAsync against a real Lambda,
with replay-aware checkpointing wired through to the AWS service.

Public API surface introduced:
- DurableFunction.WrapAsync — entry point that handles the durable
  execution envelope (input hydration, output construction, status mapping)
- IDurableContext.StepAsync / WaitAsync (4 Step overloads, 1 Wait)
- StepConfig with serializer hook (retry deferred to follow-up PR)
- ICheckpointSerializer interface
- [DurableExecution] attribute (recognized by future source generator)
- DurableExecutionException base + StepException

Internals:
- DurableExecutionHandler — Task.WhenAny race between user code and
  the suspension signal, returning Succeeded/Failed/Pending
- ExecutionState — replay-aware operation lookup and pending checkpoint
  buffer
- OperationIdGenerator — deterministic, replay-stable IDs
- TerminationManager — TaskCompletionSource-based suspension trigger
- LambdaDurableServiceClient — wraps AWSSDK.Lambda's checkpoint and
  state APIs

Tests:
- 86 unit tests covering enums, exceptions, models, configs,
  ID generation, termination, execution state, the handler race,
  the context (Step + Wait paths), and the WrapAsync entry point
- 8 end-to-end integration tests deploying real Lambdas via Docker on
  the provided.al2023 runtime: StepWaitStep, MultipleSteps, WaitOnly,
  LongerWait, ReplayDeterminism, RetrySucceeds, RetryExhausts, StepFails

Out of scope (follow-up PRs):
- IRetryStrategy, ExponentialRetryStrategy, retry decision factories
- DefaultJsonCheckpointSerializer
- DurableLogger replay-suppression (currently returns NullLogger)
- Callbacks, InvokeAsync, ParallelAsync, MapAsync, RunInChildContextAsync,
  WaitForConditionAsync — interface intentionally does not declare them
- Annotations source-generator integration
- DurableTestRunner / Amazon.Lambda.DurableExecution.Testing package
- dotnet new lambda.DurableFunction blueprint

stack-info: PR: #2360, branch: GarrettBeatty/stack/2

remove

update

update

update

update
Match the Python / Java / JavaScript reference SDKs' replay-mode model:
the workflow is "replaying" iff it has not yet revisited every
checkpointed completed user-replayable operation. A single global flag
flipped on the first fresh op (the prior model) misclassified workflow-
body code that runs before the first step and would not generalize to
Map/Parallel/Callback later.

ExecutionState changes:
- Replace `Mode`/`ExecutionMode`/`EnterExecutionMode()` with `IsReplaying`
  + `TrackReplay(operationId)`.
- Initial replay decision: any non-EXECUTION op present means we're
  replaying. The service always sends an EXECUTION-type op carrying the
  input payload — that's bookkeeping, not user history, so it does not
  count toward replay (matches Python execution.py:258, Java
  ExecutionManager:81, JS execution-context.ts:62).
- TrackReplay flips IsReplaying false once every checkpointed terminal-
  status non-EXECUTION op has been visited. Terminal set matches
  Python's: SUCCEEDED, FAILED, CANCELLED, STOPPED.

Operation changes:
- DurableOperation.ExecuteAsync calls TrackReplay(OperationId) at the
  top, so every operation participates in visit accounting without each
  subclass needing to remember.
- StepOperation/WaitOperation drop their manual EnterExecutionMode calls.

Tests:
- ExecutionStateTests rewritten around IsReplaying/TrackReplay, including
  pinning regressions: only-EXECUTION-op ⇒ NotReplaying, all-visited ⇒
  flips out of replay, PENDING ops do not block transition, idempotency.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
stack-info: PR: #2363, branch: GarrettBeatty/stack/3

COPY bin/publish/ ${LAMBDA_TASK_ROOT}

ENTRYPOINT ["/var/task/bootstrap"]

COPY bin/publish/ ${LAMBDA_TASK_ROOT}

ENTRYPOINT ["/var/task/bootstrap"]

COPY bin/publish/ ${LAMBDA_TASK_ROOT}

ENTRYPOINT ["/var/task/bootstrap"]

COPY bin/publish/ ${LAMBDA_TASK_ROOT}

ENTRYPOINT ["/var/task/bootstrap"]

COPY bin/publish/ ${LAMBDA_TASK_ROOT}

ENTRYPOINT ["/var/task/bootstrap"]
GarrettBeatty and others added 2 commits May 14, 2026 17:47
Adds child-context support to the .NET Durable Execution SDK. A child
context is a logical sub-workflow with its own deterministic
operation-ID space, persisted as a CONTEXT operation so subsequent
invocations replay the cached value without re-executing the function.

Public surface:
- IDurableContext.RunInChildContextAsync<T> (reflection + AOT-safe
  ICheckpointSerializer<T> overloads, plus a void overload).
- ChildContextConfig with SubType (observability label) and
  ErrorMapping (transform exceptions before they surface to the caller).
- ChildContextException for failure surfacing.

Used as a building block for upcoming WaitForCallbackAsync.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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-waitforcondition branch from 87688ca to 7f91202 Compare May 14, 2026 21:49
Adds service-mediated polling to the .NET Durable Execution SDK.
WaitForConditionAsync repeatedly evaluates a check function with
configurable wait strategy between attempts; each iteration is its own
Lambda invocation (suspended via STEP+RETRY checkpoints carrying
NextAttemptDelaySeconds), so polling does not consume compute time.

Public surface:
- IDurableContext.WaitForConditionAsync<TState> (reflection + AOT-safe
  overloads taking ICheckpointSerializer<TState>)
- IConditionCheckContext (Logger + AttemptNumber)
- WaitForConditionConfig<TState> (required InitialState + WaitStrategy)
- IWaitStrategy<TState> with Decide(state, attempt) returning
  WaitDecision
- WaitDecision (readonly record struct, ShouldContinue + Delay,
  Stop() / ContinueAfter(TimeSpan) factories)
- WaitStrategy factories: Exponential / Linear / Fixed / FromDelegate,
  each accepting an optional Func<TState, bool> isDone predicate
- WaitForConditionException with AttemptsExhausted and LastState
  (preserved across both live execution and replay)

Internal:
- WaitForConditionOperation<TState> wire format = STEP + SubType
  "WaitForCondition". Each polling iteration emits Action=RETRY with
  the new state in payload and NextAttemptDelaySeconds for the
  service to schedule the next invocation.
- Strategies signal max-attempts exhausted by throwing
  WaitForConditionException directly from Decide(); the operation
  enriches with LastState before checkpointing FAIL.
- LastState survives FAIL replay: serialized into FAIL payload at
  write time, deserialized in BuildFailureException with
  warning-logged fallback for legacy/corrupt data.
- ExponentialBackoff helper extracted for sharing with
  ExponentialRetryStrategy. Math is byte-for-byte identical.
- Reuses OperationSubTypes.WaitForCondition from Wave 0.

Defaults: 60 attempts / 5s initial / 300s max / 1.5x rate / Full jitter -
distinct from RetryStrategy.Default and matching Python/JS/Java reference
SDKs. (Note: Python returns success on max-attempts; .NET/Java/JS throw
- documented in design doc.)

Adds 41 unit tests + 5 integration tests covering each wait strategy,
isDone predicate paths, max-attempts exhaustion, user-check exceptions,
replay determinism, exponential backoff bounds, and corrupt-payload
fallback logging.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@GarrettBeatty GarrettBeatty force-pushed the gcbeatty/durable-waitforcondition branch from 7f91202 to 3fa06ce Compare May 14, 2026 22:19
@GarrettBeatty GarrettBeatty force-pushed the gcbeatty/durable-wave0 branch from d308c3b to be4c3ad Compare May 18, 2026 15:23
@GarrettBeatty GarrettBeatty force-pushed the gcbeatty/durable-waitforcondition branch from 3fa06ce to 67f0c0c Compare May 18, 2026 15:50
@GarrettBeatty GarrettBeatty force-pushed the gcbeatty/durable-wave0 branch 3 times, most recently from ad4d208 to 3acbed5 Compare May 20, 2026 17:46
Base automatically changed from gcbeatty/durable-wave0 to gcbeatty/durable-child-context May 20, 2026 17:46
@GarrettBeatty GarrettBeatty force-pushed the gcbeatty/durable-child-context branch 2 times, most recently from 4d97473 to 8a6c41c Compare May 21, 2026 18:56
Base automatically changed from gcbeatty/durable-child-context to feature/durablefunction May 23, 2026 15:58
@GarrettBeatty GarrettBeatty force-pushed the gcbeatty/durable-waitforcondition branch 3 times, most recently from 299ac83 to b007169 Compare June 1, 2026 16:40
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new polling primitive (IDurableContext.WaitForConditionAsync) to Amazon.Lambda.DurableExecution, enabling service-mediated polling where each polling iteration runs in its own Lambda invocation (suspended/resumed via durable execution checkpoints). This expands the DurableExecution orchestration surface area with wait strategies, deterministic replay behavior, and supporting infrastructure plus unit/integration/AOT tests.

Changes:

  • Introduces WaitForConditionAsync API surface, wait strategies (WaitStrategy.*), and supporting config/result types (WaitForConditionConfig<TState>, WaitDecision, IWaitStrategy<TState>, IConditionCheckContext, WaitForConditionException).
  • Adds core internal plumbing for durable execution (checkpoint batching, deterministic operation IDs, replay state tracking, wait operation, termination/suspension mechanism, SDK service client mapping).
  • Adds substantial unit/integration coverage and an AOT publish smoke test project.

Reviewed changes

Copilot reviewed 114 out of 115 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Libraries/test/Amazon.Lambda.DurableExecution.Tests/WaitStrategyTests.cs Unit tests for wait strategy factories and WaitDecision behavior.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/UpperSnakeCaseEnumConverterTests.cs Unit tests for enum wire-format JSON converter.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/TerminationManagerTests.cs Unit tests for termination signaling/suspension coordination.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/RetryStrategyTests.cs Unit tests for retry strategies and exponential backoff behavior.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/RecordingBatcher.cs Test helper to capture flushed checkpoint batches.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/OperationIdGeneratorTests.cs Unit tests for deterministic operation ID generation/hashing.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/ModelsTests.cs Unit tests for model serialization and basic shape.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/MockLambdaClient.cs Mock AmazonLambdaClient for service client tests.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/LambdaDurableServiceClientTests.cs Unit tests for durable execution service client request/response mapping.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/ExecutionStateTests.cs Unit tests for replay state tracking and operation lookup.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/ExceptionsTests.cs Unit tests for exception types and properties.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/EnumsTests.cs Unit tests for enum/constants shapes and values.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/DurableExecutionHandlerTests.cs Unit tests for handler termination vs user-code completion race.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/coverage.sh Local helper script for collecting and reporting coverage.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/coverage.runsettings Coverage configuration for durable execution tests.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/ConfigTests.cs Unit test for serialization context record equality.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/CheckpointBatcherTests.cs Unit tests for batching, flushing, and error propagation semantics.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/Amazon.Lambda.DurableExecution.Tests.csproj New unit test project configuration and dependencies.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/xunit.runner.json Integration test runner configuration (serial execution).
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/WaitOnlyTest.cs Integration test validating wait-only suspend/resume behavior.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/WaitForConditionUserCheckThrowsTest.cs Integration test for user check exception surfacing as StepException.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/WaitForConditionReplayDeterminismTest.cs Integration test verifying replay determinism around polling.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/WaitForConditionMaxAttemptsTest.cs Integration test for max-attempts exhaustion and error checkpointing.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/WaitForConditionHappyPathTest.cs Integration test for successful polling completion.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/WaitForConditionExponentialTest.cs Integration test for exponential wait strategy end-to-end.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitOnlyFunction/WaitOnlyFunction.csproj Integration test function project for wait-only workflow.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitOnlyFunction/Function.cs Wait-only durable workflow test function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitOnlyFunction/Dockerfile Container image for wait-only test function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionUserCheckThrowsFunction/WaitForConditionUserCheckThrowsFunction.csproj Integration test function project for user-check-throws scenario.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionUserCheckThrowsFunction/Function.cs Durable workflow test function that throws from polling check.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionUserCheckThrowsFunction/Dockerfile Container image for user-check-throws test function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionReplayDeterminismFunction/WaitForConditionReplayDeterminismFunction.csproj Integration test function project for replay determinism with polling.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionReplayDeterminismFunction/Function.cs Workflow combining steps + polling to assert deterministic replay.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionReplayDeterminismFunction/Dockerfile Container image for replay determinism test function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionMaxAttemptsFunction/WaitForConditionMaxAttemptsFunction.csproj Integration test function project for max-attempts exhaustion path.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionMaxAttemptsFunction/Function.cs Workflow that catches WaitForConditionException and reports attempts.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionMaxAttemptsFunction/Dockerfile Container image for max-attempts test function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionHappyPathFunction/WaitForConditionHappyPathFunction.csproj Integration test function project for successful polling path.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionHappyPathFunction/Function.cs Workflow that polls until isDone and returns final state.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionHappyPathFunction/Dockerfile Container image for happy-path polling function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionExponentialFunction/WaitForConditionExponentialFunction.csproj Integration test function project for exponential polling behavior.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionExponentialFunction/Function.cs Workflow using exponential wait strategy with predictable timing.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitForConditionExponentialFunction/Dockerfile Container image for exponential polling function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/StepWaitStepFunction/StepWaitStepFunction.csproj Integration test function project for step-wait-step scenario.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/StepWaitStepFunction/Function.cs Workflow with step → wait → step to validate suspend/resume replay.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/StepWaitStepFunction/Dockerfile Container image for step-wait-step function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/StepFailsFunction/StepFailsFunction.csproj Integration test function project for step failure scenario.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/StepFailsFunction/Function.cs Workflow that throws inside a step to validate failure propagation.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/StepFailsFunction/Dockerfile Container image for failing-step function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/RetryFunction/RetryFunction.csproj Integration test function project for retry behavior.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/RetryFunction/Function.cs Workflow using retry strategy to validate service-driven retries.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/RetryFunction/Dockerfile Container image for retry function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/ReplayDeterminismFunction/ReplayDeterminismFunction.csproj Integration test function project for replay determinism via wait boundary.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/ReplayDeterminismFunction/Function.cs Workflow that ensures cached step output persists across replay.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/ReplayDeterminismFunction/Dockerfile Container image for replay determinism function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/MultipleStepsFunction/MultipleStepsFunction.csproj Integration test function project for multi-step chaining.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/MultipleStepsFunction/Function.cs Workflow with five steps to validate checkpointing order.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/MultipleStepsFunction/Dockerfile Container image for multi-step function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/LongerWaitFunction/LongerWaitFunction.csproj Integration test function project for longer waits.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/LongerWaitFunction/Function.cs Workflow with longer wait to validate timer behavior and replay.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/LongerWaitFunction/Dockerfile Container image for longer-wait function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/StepWaitStepTest.cs Integration assertions for step-wait-step workflow.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/StepFailsTest.cs Integration assertions for workflow failure behavior.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/RetryTest.cs Integration assertions for service-mediated retries and timing.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/ReplayDeterminismTest.cs Integration assertions for deterministic replay caching via wait.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/MultipleStepsTest.cs Integration assertions for multi-step checkpointing consistency.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/LongerWaitTest.cs Integration assertions for longer wait and multi-invocation behavior.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/Amazon.Lambda.DurableExecution.IntegrationTests.csproj New integration test project and AWS SDK dependencies.
Libraries/test/Amazon.Lambda.DurableExecution.AotPublishTest/Program.cs NativeAOT publish smoke test exercising source-gen serializer path.
Libraries/test/Amazon.Lambda.DurableExecution.AotPublishTest/Amazon.Lambda.DurableExecution.AotPublishTest.csproj NativeAOT/trim configuration for publish smoke test.
Libraries/src/Amazon.Lambda.DurableExecution/Services/LambdaDurableServiceClient.cs Service client wrapper for checkpoint/state APIs (SDK interop).
Libraries/src/Amazon.Lambda.DurableExecution/Models/ErrorObject.cs Serializable error representation for checkpoints/envelopes.
Libraries/src/Amazon.Lambda.DurableExecution/Models/DurableExecutionInvocationOutput.cs Public output envelope model and JSON annotations.
Libraries/src/Amazon.Lambda.DurableExecution/Models/DurableExecutionInvocationInput.cs Public input envelope model and internal replay state container.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/WaitOperation.cs Durable wait operation implementation (service-timer suspension).
Libraries/src/Amazon.Lambda.DurableExecution/Internal/UpperSnakeCaseEnumConverter.cs JSON converter for UPPER_SNAKE_CASE enum wire format.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/TerminationManager.cs Termination/suspension signal coordination for orchestration.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/ReflectionJsonCheckpointSerializer.cs Reflection-based default checkpoint serializer with trim/AOT annotations.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/OperationIdGenerator.cs Deterministic operation ID generator compatible with other SDKs.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/Operation.cs Internal operation wire-model and constant strings.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/ExponentialBackoff.cs Shared exponential backoff delay calculation helper.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/ExecutionState.cs Replay-state hydration, lookup, and replay-frontier tracking.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/DurableOperation.cs Base class for durable operations with start/replay dispatch.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/ChildContextOperation.cs Durable child-context operation with checkpointed result/failure.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/CheckpointBatcherConfig.cs Configuration for outbound checkpoint batching.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/CheckpointBatcher.cs Background worker batching/flushing checkpoint updates.
Libraries/src/Amazon.Lambda.DurableExecution/IDurableContext.cs Public durable context API surface (steps, waits, child contexts, polling).
Libraries/src/Amazon.Lambda.DurableExecution/IConditionCheckContext.cs Context passed to wait-for-condition check function.
Libraries/src/Amazon.Lambda.DurableExecution/ICheckpointSerializer.cs Public checkpoint serializer abstraction and serialization context record.
Libraries/src/Amazon.Lambda.DurableExecution/Exceptions/WaitForConditionException.cs Exception type for polling exhaustion with last-state capture.
Libraries/src/Amazon.Lambda.DurableExecution/Exceptions/DurableExecutionException.cs Base exception and related durable execution exception types.
Libraries/src/Amazon.Lambda.DurableExecution/Enums.cs Public invocation status enum.
Libraries/src/Amazon.Lambda.DurableExecution/DurableExecutionHandler.cs Core orchestration runner (user code vs termination race).
Libraries/src/Amazon.Lambda.DurableExecution/Config/WaitStrategy.cs Wait strategy factories and built-in strategy implementations.
Libraries/src/Amazon.Lambda.DurableExecution/Config/WaitForConditionConfig.cs Configuration container for polling operations.
Libraries/src/Amazon.Lambda.DurableExecution/Config/WaitDecision.cs Strategy decision struct for continue/stop + delay.
Libraries/src/Amazon.Lambda.DurableExecution/Config/StepConfig.cs Step execution configuration (retry/semantics).
Libraries/src/Amazon.Lambda.DurableExecution/Config/RetryStrategy.cs Retry strategy factories and implementations, jitter/backoff options.
Libraries/src/Amazon.Lambda.DurableExecution/Config/IWaitStrategy.cs Interface for wait strategies used by polling.
Libraries/src/Amazon.Lambda.DurableExecution/Config/IRetryStrategy.cs Interface for retry strategies used by steps.
Libraries/src/Amazon.Lambda.DurableExecution/Config/ChildContextConfig.cs Configuration for child contexts (subtype, error mapping).
Libraries/src/Amazon.Lambda.DurableExecution/Amazon.Lambda.DurableExecution.csproj New durable execution library project definition and dependencies.
CONTRIBUTING.md Adds Amazon.Lambda.DurableExecution to documented projects list.
buildtools/build.proj Adds durable execution unit tests to the build/test pipeline.
.autover/autover.json Registers new package for automated versioning.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +4
using Amazon.Lambda.DurableExecution.Internal;
using Amazon.Lambda.Model;
using SdkOperationUpdate = Amazon.Lambda.Model.OperationUpdate;
using SdkOperation = Amazon.Lambda.Model.Operation;
Comment on lines +86 to +90
Error = sdkOp.StepDetails.Error != null ? new ErrorObject
{
ErrorType = sdkOp.StepDetails.Error.ErrorType,
ErrorMessage = sdkOp.StepDetails.Error.ErrorMessage
} : null,
Comment on lines +109 to +113
Error = sdkOp.ContextDetails.Error != null ? new ErrorObject
{
ErrorType = sdkOp.ContextDetails.Error.ErrorType,
ErrorMessage = sdkOp.ContextDetails.Error.ErrorMessage
} : null
Comment on lines +1 to +2
using System.Text.Json;
using System.Text.Json.Serialization;
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.

3 participants