Skip to content

Operation.to_dict drops Error and ReplayChildren from ContextDetails #477

Closed

Description

@yaythomas

Summary

Operation.to_dict serializes a context operation with only Result. It drops Error and ReplayChildren from ContextDetails. The deserializer ContextDetails.from_dict reads all three fields, so serialized operation state does not round trip through Operation.to_dict.

Scope of impact

This does not affect core SDK runtime behavior for callers. Operation.to_dict is used when serializing operation state to feed a handler. Normal published SDK execution does not exercise that path. The observed impact is confined to the local test runner, where it surfaced through cross language conformance: a serialized child context failure reconstructs as a generic error instead of the original class, and a large payload child context loses its ReplayChildren marker.

Expected

Operation.to_dict includes Error and ReplayChildren in ContextDetails when they are set, matching what ContextDetails.from_dict reads.

Actual

Only Result is emitted. In src/aws_durable_execution_sdk_python/lambda_service.py, Operation.to_dict:

if self.context_details:
    result["ContextDetails"] = {"Result": self.context_details.result}

Activity

  1. added
    pkg:sdkPackage: aws-durable-execution-sdk-python
    on Jun 17, 2026
  2. moved this from Backlog to In progress in aws-durable-executionon Jun 17, 2026
  3. moved this from In progress to In review in aws-durable-executionon Jun 17, 2026
  4. self-assigned this
    on Jun 17, 2026
  5. added a commit that references this issue on Jun 17, 2026
    a0dc691
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

pkg:sdkPackage: aws-durable-execution-sdk-python

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions