Skip to content

Add durable execution Step + Wait end-to-end#2360

Draft
GarrettBeatty wants to merge 1 commit into
GarrettBeatty/stack/1from
GarrettBeatty/stack/2
Draft

Add durable execution Step + Wait end-to-end#2360
GarrettBeatty wants to merge 1 commit into
GarrettBeatty/stack/1from
GarrettBeatty/stack/2

Conversation

@GarrettBeatty
Copy link
Copy Markdown
Collaborator

@GarrettBeatty GarrettBeatty commented May 12, 2026

Stacked PRs:


Add durable execution Step + Wait end-to-end

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

remove

@GarrettBeatty GarrettBeatty requested review from a team as code owners May 12, 2026 02:36
@GarrettBeatty GarrettBeatty requested review from normj and philasmar and removed request for a team May 12, 2026 02:36
GarrettBeatty added a commit that referenced this pull request May 12, 2026
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 retry strategy, semantics, and serializer hooks
- IRetryStrategy + ExponentialRetryStrategy + retry decision factories
- ICheckpointSerializer + DefaultJsonCheckpointSerializer
- [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, retry,
  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):
- Callbacks, InvokeAsync, ParallelAsync, MapAsync, RunInChildContextAsync,
  WaitForConditionAsync — interface intentionally does not declare them
- DurableLogger replay-suppression
- Annotations source-generator integration
- DurableTestRunner / Amazon.Lambda.DurableExecution.Testing package
- dotnet new lambda.DurableFunction blueprint

stack-info: PR: #2360, branch: GarrettBeatty/stack/2
@GarrettBeatty GarrettBeatty force-pushed the GarrettBeatty/stack/2 branch from 55db890 to 92e2428 Compare May 12, 2026 02:36
@GarrettBeatty GarrettBeatty force-pushed the GarrettBeatty/stack/1 branch from 9d78744 to 075b5e6 Compare May 12, 2026 02:36
@GarrettBeatty GarrettBeatty marked this pull request as draft May 12, 2026 02:37

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"]

COPY bin/publish/ ${LAMBDA_TASK_ROOT}

ENTRYPOINT ["/var/task/bootstrap"]
@GarrettBeatty GarrettBeatty removed the request for review from a team May 12, 2026 02:37
@GarrettBeatty GarrettBeatty changed the base branch from GarrettBeatty/stack/1 to feature/durablefunction May 12, 2026 03:03
GarrettBeatty added a commit that referenced this pull request May 12, 2026
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 retry strategy, semantics, and serializer hooks
- IRetryStrategy + ExponentialRetryStrategy + retry decision factories
- ICheckpointSerializer + DefaultJsonCheckpointSerializer
- [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, retry,
  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):
- Callbacks, InvokeAsync, ParallelAsync, MapAsync, RunInChildContextAsync,
  WaitForConditionAsync — interface intentionally does not declare them
- DurableLogger replay-suppression
- Annotations source-generator integration
- DurableTestRunner / Amazon.Lambda.DurableExecution.Testing package
- dotnet new lambda.DurableFunction blueprint

stack-info: PR: #2360, branch: GarrettBeatty/stack/2
@GarrettBeatty GarrettBeatty force-pushed the GarrettBeatty/stack/2 branch from 92e2428 to edd8c5f Compare May 12, 2026 03:03
GarrettBeatty added a commit that referenced this pull request May 12, 2026
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 retry strategy, semantics, and serializer hooks
- IRetryStrategy + ExponentialRetryStrategy + retry decision factories
- ICheckpointSerializer + DefaultJsonCheckpointSerializer
- [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, retry,
  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):
- Callbacks, InvokeAsync, ParallelAsync, MapAsync, RunInChildContextAsync,
  WaitForConditionAsync — interface intentionally does not declare them
- DurableLogger replay-suppression
- Annotations source-generator integration
- DurableTestRunner / Amazon.Lambda.DurableExecution.Testing package
- dotnet new lambda.DurableFunction blueprint

stack-info: PR: #2360, branch: GarrettBeatty/stack/2
@GarrettBeatty GarrettBeatty force-pushed the GarrettBeatty/stack/2 branch from edd8c5f to fe03624 Compare May 12, 2026 03:03
@GarrettBeatty GarrettBeatty mentioned this pull request May 12, 2026
@GarrettBeatty GarrettBeatty changed the base branch from feature/durablefunction to GarrettBeatty/stack/1 May 12, 2026 03:03
@GarrettBeatty GarrettBeatty changed the base branch from GarrettBeatty/stack/1 to feature/durablefunction May 12, 2026 03:05
GarrettBeatty added a commit that referenced this pull request May 12, 2026
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 retry strategy, semantics, and serializer hooks
- IRetryStrategy + ExponentialRetryStrategy + retry decision factories
- ICheckpointSerializer + DefaultJsonCheckpointSerializer
- [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, retry,
  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):
- Callbacks, InvokeAsync, ParallelAsync, MapAsync, RunInChildContextAsync,
  WaitForConditionAsync — interface intentionally does not declare them
- DurableLogger replay-suppression
- Annotations source-generator integration
- DurableTestRunner / Amazon.Lambda.DurableExecution.Testing package
- dotnet new lambda.DurableFunction blueprint

stack-info: PR: #2360, branch: GarrettBeatty/stack/2
@GarrettBeatty GarrettBeatty force-pushed the GarrettBeatty/stack/2 branch from fe03624 to 322fa09 Compare May 12, 2026 03:05
@GarrettBeatty GarrettBeatty changed the base branch from feature/durablefunction to GarrettBeatty/stack/1 May 12, 2026 03:05
@GarrettBeatty GarrettBeatty changed the base branch from GarrettBeatty/stack/1 to feature/durablefunction May 12, 2026 03:15
GarrettBeatty added a commit that referenced this pull request May 12, 2026
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 retry strategy, semantics, and serializer hooks
- IRetryStrategy + ExponentialRetryStrategy + retry decision factories
- ICheckpointSerializer + DefaultJsonCheckpointSerializer
- [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, retry,
  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):
- Callbacks, InvokeAsync, ParallelAsync, MapAsync, RunInChildContextAsync,
  WaitForConditionAsync — interface intentionally does not declare them
- DurableLogger replay-suppression
- Annotations source-generator integration
- DurableTestRunner / Amazon.Lambda.DurableExecution.Testing package
- dotnet new lambda.DurableFunction blueprint

stack-info: PR: #2360, branch: GarrettBeatty/stack/2
@GarrettBeatty GarrettBeatty force-pushed the GarrettBeatty/stack/2 branch from 322fa09 to 983c9aa Compare May 12, 2026 03:16
@GarrettBeatty GarrettBeatty changed the base branch from feature/durablefunction to GarrettBeatty/stack/1 May 12, 2026 03:16
@GarrettBeatty GarrettBeatty requested a review from Copilot May 12, 2026 03:24
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

Introduces the first end-to-end slice of the new Amazon.Lambda.DurableExecution .NET SDK, wiring a workflow wrapper (DurableFunction.WrapAsync) to replay-aware step execution (StepAsync) and time suspension (WaitAsync) with checkpoint flushing to the Lambda Durable Execution service, plus extensive unit/integration testing and AOT publish coverage.

Changes:

  • Add core durable execution runtime types: invocation envelope models, workflow wrapper, replay-aware DurableContext (Step/Wait), in-memory ExecutionState, deterministic operation ID generation, and termination signaling.
  • Add service integration shim (LambdaDurableServiceClient) to send checkpoint updates via CheckpointDurableExecutionAsync.
  • Add unit tests, AWS-backed integration tests (Docker-deployed Lambdas), and a NativeAOT publish smoke-test project; update design docs with AOT usage guidance.

Reviewed changes

Copilot reviewed 67 out of 67 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Libraries/test/Amazon.Lambda.DurableExecution.Tests/UpperSnakeCaseEnumConverterTests.cs Unit coverage for enum JSON converter read/write branches.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/TerminationManagerTests.cs Tests termination signaling and concurrency behavior.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/OperationIdGeneratorTests.cs Tests deterministic operation ID generation and sanitization.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/ModelsTests.cs Tests serialization/shape of durable execution models.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/MockLambdaClient.cs Test double for CheckpointDurableExecutionAsync.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/LambdaDurableServiceClientTests.cs Verifies checkpoint request mapping to AWSSDK models.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/ExecutionStateTests.cs Tests replay lookup and pending checkpoint buffering.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/ExceptionsTests.cs Tests durable execution exception types.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/EnumsTests.cs Tests enum/value constants used by the runtime.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/DurableFunctionTests.cs Tests WrapAsync behavior (success/fail/pending + checkpoint flush).
Libraries/test/Amazon.Lambda.DurableExecution.Tests/DurableExecutionHandlerTests.cs Tests handler race between workflow completion and termination.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/DurableContextTests.cs Tests StepAsync/WaitAsync replay and end-to-end local flow.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/coverage.sh Script to run tests with coverage collection + report generation.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/coverage.runsettings Coverage include/exclude configuration (coverlet collector).
Libraries/test/Amazon.Lambda.DurableExecution.Tests/ConfigTests.cs Tests StepConfig defaults and SerializationContext equality.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/AssemblyLoadTests.cs Removes prior scaffolding “assembly loads” test.
Libraries/test/Amazon.Lambda.DurableExecution.Tests/Amazon.Lambda.DurableExecution.Tests.csproj Enables warnings-as-errors and adds coverage/test-utility deps.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/xunit.runner.json Disables test parallelization for AWS resource integration tests.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/WaitOnlyTest.cs AWS integration scenario: wait-only workflow.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/StepWaitStepTest.cs AWS integration scenario: step → wait → step.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/StepFailsTest.cs AWS integration scenario: step failure propagates to FAILED.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/ReplayDeterminismTest.cs AWS integration scenario: deterministic replay of step results.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/MultipleStepsTest.cs AWS integration scenario: multiple steps checkpointed.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/LongerWaitTest.cs AWS integration scenario: longer wait suspension/resume.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/DurableFunctionDeployment.cs Test harness to build/push images and create/invoke/cleanup Lambdas.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/Amazon.Lambda.DurableExecution.IntegrationTests.csproj New integration test project referencing AWSSDK + durable execution lib.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitOnlyFunction/WaitOnlyFunction.csproj Test Lambda function project for wait-only scenario.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitOnlyFunction/Function.cs Wait-only durable workflow handler using WrapAsync.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/WaitOnlyFunction/Dockerfile Container image for wait-only test function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/StepWaitStepFunction/StepWaitStepFunction.csproj Test Lambda function project for step-wait-step scenario.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/StepWaitStepFunction/Function.cs Step-wait-step durable workflow handler.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/StepWaitStepFunction/Dockerfile Container image for step-wait-step test function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/StepFailsFunction/StepFailsFunction.csproj Test Lambda 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 step-failure test function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/ReplayDeterminismFunction/ReplayDeterminismFunction.csproj Test Lambda function project for replay determinism scenario.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/ReplayDeterminismFunction/Function.cs Generates GUID in step 1 and verifies it’s replayed/cached.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/ReplayDeterminismFunction/Dockerfile Container image for replay determinism test function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/MultipleStepsFunction/MultipleStepsFunction.csproj Test Lambda function project for multiple-steps scenario.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/MultipleStepsFunction/Function.cs Workflow chaining 5 checkpointed steps.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/MultipleStepsFunction/Dockerfile Container image for multiple steps test function.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/LongerWaitFunction/LongerWaitFunction.csproj Test Lambda function project for longer-wait scenario.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/LongerWaitFunction/Function.cs Workflow with longer wait boundary between steps.
Libraries/test/Amazon.Lambda.DurableExecution.IntegrationTests/TestFunctions/LongerWaitFunction/Dockerfile Container image for longer wait test function.
Libraries/test/Amazon.Lambda.DurableExecution.AotPublishTest/Program.cs NativeAOT publish smoke test using JsonSerializerContext overload.
Libraries/test/Amazon.Lambda.DurableExecution.AotPublishTest/Amazon.Lambda.DurableExecution.AotPublishTest.csproj NativeAOT/trimming settings (warnings as errors) for smoke test.
Libraries/src/Amazon.Lambda.DurableExecution/Services/LambdaDurableServiceClient.cs Wrapper around AWSSDK Lambda durable APIs for checkpoint flush.
Libraries/src/Amazon.Lambda.DurableExecution/Models/ErrorObject.cs Serializable error model stored in checkpoints and returned on failures.
Libraries/src/Amazon.Lambda.DurableExecution/Models/DurableExecutionInvocationOutput.cs Output envelope model with enum converter + result/error payload.
Libraries/src/Amazon.Lambda.DurableExecution/Models/DurableExecutionInvocationInput.cs Input envelope model + internal InitialExecutionState for replay.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/UpperSnakeCaseEnumConverter.cs JSON converter mapping UPPER_SNAKE_CASE ↔ PascalCase enums.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/TerminationManager.cs TCS-based termination/suspension trigger for handler race.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/OperationIdGenerator.cs Deterministic operation ID generator (replay-stable).
Libraries/src/Amazon.Lambda.DurableExecution/Internal/Operation.cs Internal wire-format operation models/constants for replay parsing.
Libraries/src/Amazon.Lambda.DurableExecution/Internal/ExecutionState.cs Replay lookup + pending checkpoint accumulation.
Libraries/src/Amazon.Lambda.DurableExecution/IDurableContext.cs Public durable context interfaces (StepAsync, WaitAsync, metadata).
Libraries/src/Amazon.Lambda.DurableExecution/ICheckpointSerializer.cs Public checkpoint serializer interfaces + serialization context record.
Libraries/src/Amazon.Lambda.DurableExecution/Exceptions/DurableExecutionException.cs Public exception hierarchy (DurableExecutionException, StepException).
Libraries/src/Amazon.Lambda.DurableExecution/Enums.cs Public invocation status enum + internal operation-action enum.
Libraries/src/Amazon.Lambda.DurableExecution/DurableFunction.cs Public WrapAsync entry point (JIT + AOT overloads) + mapping logic.
Libraries/src/Amazon.Lambda.DurableExecution/DurableExecutionHandler.cs Handler orchestrator racing user code against termination signal.
Libraries/src/Amazon.Lambda.DurableExecution/DurableExecutionAttribute.cs Public attribute for future annotations/source-gen integration.
Libraries/src/Amazon.Lambda.DurableExecution/DurableContext.cs IDurableContext implementation for replay-aware step/wait behavior.
Libraries/src/Amazon.Lambda.DurableExecution/Config/StepConfig.cs Step configuration surface (currently serializer hook).
Libraries/src/Amazon.Lambda.DurableExecution/AssemblyMarker.cs Removes prior scaffolding marker type.
Libraries/src/Amazon.Lambda.DurableExecution/Amazon.Lambda.DurableExecution.csproj Enables warnings-as-errors for trimming/AOT analyzer warnings.
Docs/durable-execution-design.md Updates design doc with AOT JsonSerializerContext guidance + API shape.

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

Comment thread Libraries/src/Amazon.Lambda.DurableExecution/DurableContext.cs Outdated
Comment thread Libraries/src/Amazon.Lambda.DurableExecution/DurableContext.cs
Comment on lines +32 to +36
ILambdaContext lambdaContext)
{
_cachedLambdaClient ??= new AmazonLambdaClient();
return WrapAsyncCore(workflow, invocationInput, lambdaContext, _cachedLambdaClient, jsonContext: null);
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

this is not possible i dont think

Comment thread Libraries/src/Amazon.Lambda.DurableExecution/Config/StepConfig.cs
@GarrettBeatty GarrettBeatty changed the base branch from GarrettBeatty/stack/1 to feature/durablefunction May 12, 2026 15:12
GarrettBeatty added a commit that referenced this pull request May 12, 2026
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 retry strategy, semantics, and serializer hooks
- IRetryStrategy + ExponentialRetryStrategy + retry decision factories
- ICheckpointSerializer + DefaultJsonCheckpointSerializer
- [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, retry,
  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):
- Callbacks, InvokeAsync, ParallelAsync, MapAsync, RunInChildContextAsync,
  WaitForConditionAsync — interface intentionally does not declare them
- DurableLogger replay-suppression
- Annotations source-generator integration
- DurableTestRunner / Amazon.Lambda.DurableExecution.Testing package
- dotnet new lambda.DurableFunction blueprint

stack-info: PR: #2360, branch: GarrettBeatty/stack/2
@GarrettBeatty GarrettBeatty force-pushed the GarrettBeatty/stack/2 branch from 983c9aa to c9a441c Compare May 12, 2026 15:12
@GarrettBeatty GarrettBeatty changed the base branch from feature/durablefunction to GarrettBeatty/stack/1 May 12, 2026 15:12
@GarrettBeatty GarrettBeatty changed the base branch from GarrettBeatty/stack/1 to feature/durablefunction May 12, 2026 15:34
GarrettBeatty added a commit that referenced this pull request May 12, 2026
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
@GarrettBeatty GarrettBeatty force-pushed the GarrettBeatty/stack/2 branch from c9a441c to f821fe9 Compare May 12, 2026 15:34
@GarrettBeatty GarrettBeatty changed the base branch from feature/durablefunction to GarrettBeatty/stack/1 May 12, 2026 15:34
@GarrettBeatty GarrettBeatty changed the base branch from GarrettBeatty/stack/1 to feature/durablefunction May 12, 2026 16:19
@GarrettBeatty GarrettBeatty force-pushed the GarrettBeatty/stack/2 branch from f821fe9 to bb4d070 Compare May 12, 2026 16:19
@GarrettBeatty GarrettBeatty changed the base branch from feature/durablefunction to GarrettBeatty/stack/1 May 12, 2026 16:20
@GarrettBeatty GarrettBeatty mentioned this pull request May 12, 2026
@GarrettBeatty GarrettBeatty changed the base branch from GarrettBeatty/stack/1 to feature/durablefunction May 12, 2026 16:30
@GarrettBeatty GarrettBeatty force-pushed the GarrettBeatty/stack/2 branch from bb4d070 to b67c1c2 Compare May 12, 2026 16:31
@GarrettBeatty GarrettBeatty changed the base branch from feature/durablefunction to GarrettBeatty/stack/1 May 12, 2026 16:31
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
@GarrettBeatty GarrettBeatty changed the base branch from GarrettBeatty/stack/1 to feature/durablefunction May 12, 2026 18:16
@GarrettBeatty GarrettBeatty force-pushed the GarrettBeatty/stack/2 branch from b67c1c2 to 7458625 Compare May 12, 2026 18:16
@GarrettBeatty GarrettBeatty changed the base branch from feature/durablefunction to GarrettBeatty/stack/1 May 12, 2026 18:16
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