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}
Summary
Operation.to_dictserializes a context operation with onlyResult. It dropsErrorandReplayChildrenfromContextDetails. The deserializerContextDetails.from_dictreads all three fields, so serialized operation state does not round trip throughOperation.to_dict.Scope of impact
This does not affect core SDK runtime behavior for callers.
Operation.to_dictis 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 itsReplayChildrenmarker.Expected
Operation.to_dictincludesErrorandReplayChildreninContextDetailswhen they are set, matching whatContextDetails.from_dictreads.Actual
Only
Resultis emitted. Insrc/aws_durable_execution_sdk_python/lambda_service.py,Operation.to_dict: