Skip to content

[Testing] [Bug]: Return updated operations on empty checkpoint #438

Closed

Description

@dhegberg

Migration from aws/aws-durable-execution-sdk-python-testing#184


Expected Behavior

When creating a Checkpoint with an empty updates array, such that

 CheckpointDurableExecutionRequest(DurableExecutionArn=<<my-arn>>, CheckpointToken=<<my-token>>, Updates=[])

The response should contain NewExecutionState, where

If NO new events occurred:

  1. CheckpointToken: New token with incremented sequence
  2. NewExecutionState.Operations: Empty array []
  3. NewExecutionState.NextMarker: null

If new events occurred (timer fired, etc.):

  1. CheckpointToken: New token with incremented sequence
  2. NewExecutionState.Operations: Array with those operations
  3. NewExecutionState.NextMarker: null

The response CAN return an empty NewExecutionState.Operations array when there are no updates AND no new backend events.

The response should ALWAYS includes NewExecutionState - it never omits it.

Actual Behavior

The local-runner has a short-circuit only to pass back the updated checkpoint token and set new_execution_state=None if updates are empty. This is wrong.

        if updates:
            checkpoint_output = self._checkpoint_processor.process_checkpoint(
                checkpoint_token=checkpoint_token,
                updates=updates,
                client_token=client_token,
            )

            new_execution_state = None
            if checkpoint_output.new_execution_state:
                new_execution_state = CheckpointUpdatedExecutionState(
                    operations=checkpoint_output.new_execution_state.operations,
                    next_marker=checkpoint_output.new_execution_state.next_marker,
                )

            return CheckpointDurableExecutionResponse(
                checkpoint_token=checkpoint_output.checkpoint_token,
                new_execution_state=new_execution_state,
            )

        # Save execution state after generating new token
        new_checkpoint_token = execution.get_new_checkpoint_token()
        self._store.update(execution)

        return CheckpointDurableExecutionResponse(
            checkpoint_token=new_checkpoint_token,
            new_execution_state=None,
        )

Steps to Reproduce

Create empty checkpoint call

SDK Version

1

Python Version

3.13

Is this a regression?

No

Last Working Version

No response

Additional Context

No response

Activity

  1. added
    pkg:testingPackage: aws-durable-execution-sdk-python-testing
    on Jun 10, 2026
  2. self-assigned this
    on Jun 15, 2026
  3. moved this from Backlog to In progress in aws-durable-executionon Jun 15, 2026
  4. added 6 commits that reference this issue on Jul 7, 2026
    5017a88
    11eebdc
    8a6058c
    02ca156
    9e9fca0
    b839392
  5. added a commit that references this issue on Jul 13, 2026
    47977fb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

pkg:testingPackage: aws-durable-execution-sdk-python-testing

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions