Skip to content

Operation.to_dict drops Error and ReplayChildren from ContextDetails #477

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}

Metadata

Metadata

Assignees

Labels

SDKrelated to the AWS Durable Execution SDK

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions