Skip to content

Extract shared durable local-emulation kernel#2496

Draft
GarrettBeatty wants to merge 1 commit into
feature/durable-testtoolfrom
feat/kernel-on-feature
Draft

Extract shared durable local-emulation kernel#2496
GarrettBeatty wants to merge 1 commit into
feature/durable-testtoolfrom
feat/kernel-on-feature

Conversation

@GarrettBeatty

Copy link
Copy Markdown
Contributor

What

Extracts the durable-execution checkpoint state machine and in-memory operation store—today duplicated between Amazon.Lambda.DurableExecution.Testing and the Lambda Test Tool's durable emulator (a hand-maintained fork)—into a new internal package, Amazon.Lambda.DurableExecution.LocalEmulation, so the two can no longer silently drift on replay-critical logic.

  • InMemoryOperationStore and CheckpointProcessor (state machine, callback minting, time-skip, pending-invoke tracking)
  • OperationUpdateInput, a transport-neutral update record each consumer maps its own representation to at the boundary
  • DurableEmulationHelpers for the shared exec-0 seeding and TryGetNextResumeDelay

Amazon.Lambda.DurableExecution.Testing is rewired onto the kernel: it keeps a thin SdkOperationUpdateMapper (AWSSDK OperationUpdateOperationUpdateInput) and drops its own processor/store. Kernel types stay internal, shared via InternalsVisibleTo. The forked processor/store unit tests move to a new kernel test project (rewritten against OperationUpdateInput); the testing package keeps focused coverage of its SDK-update adapter.

No public API or behavior change.

Stack

This is PR 1 of 2, targeting the feature/durable-testtool integration branch.

  • PR 2 (feat/durable-testtool-on-kernel) stacks on this and rewires the Test Tool emulator onto the kernel.

Testing

  • LocalEmulation kernel tests: 28/28 (net8.0 + net10.0)
  • Testing package: 132/132 (net8.0 + net10.0), including the new SDK-mapper tests

The durable-execution checkpoint state machine and in-memory operation
store live in Amazon.Lambda.DurableExecution.Testing today and are
hand-forked into the Lambda Test Tool's durable emulator, so the two can
silently drift on replay-critical logic.

Extract the shared core into a new internal package,
Amazon.Lambda.DurableExecution.LocalEmulation:
- InMemoryOperationStore and CheckpointProcessor (state machine, callback
  minting, time-skip, pending-invoke tracking)
- OperationUpdateInput, a transport-neutral update record each consumer
  maps its own representation to at the boundary
- DurableEmulationHelpers for the shared exec-0 seeding and
  TryGetNextResumeDelay

Rewire Amazon.Lambda.DurableExecution.Testing onto the kernel: it keeps a
thin SdkOperationUpdateMapper (AWSSDK OperationUpdate -> OperationUpdateInput)
and drops its own processor/store. Kernel types stay internal and are
shared via InternalsVisibleTo (the Test Tool grant lands with its own PR).

The forked processor/store unit tests move to a new kernel test project
(rewritten against OperationUpdateInput); the testing package keeps focused
coverage of its SDK-update adapter.

No public API or behavior change.
@GarrettBeatty
GarrettBeatty force-pushed the feat/kernel-on-feature branch from 5711349 to 3d23038 Compare July 23, 2026 20:01
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