aws / aws/aws-durable-execution-sdk-python
[Feature]: Expand SerDesContext with payload and operation metadata
- 主要语言
- Python
- 星标
- 53
- 派生
- 25
- 平均合并
- 1 天 19 小时
- 30 天内合并 PR
- 40
描述
## What would you like?
Expand `SerDesContext` beyond `operation_id` and `durable_execution_arn` so context-aware SerDes implementations can identify the exact payload being processed.
Useful metadata includes:
- stable entity ID;
- payload kind, such as execution input/output, operation result, invoke payload, state, or exception;
- operation name, parent ID, type, and subtype;
- retry attempt number when applicable.
This enables safer external-storage ownership rules, better diagnostics, and stable naming without parsing operation IDs.
## Possible Implementation
- Add optional fields to the frozen `SerDesContext` dataclass while preserving `operation_id` and `durable_execution_arn`.
- Populate the fields for every SDK-managed serialization and deserialization path, including execution input/output, steps, child contexts, callbacks, wait-for-condition state, invoke payload/results, exceptions, and retry attempts.
- Document which fields are always present and which are operation-specific.
- Ensure the same context is passed to every attempt of a retryable SerDes operation.
- Add parity tests that capture context from each payload path and validate first execution versus replay.
- Use the richer context when implementing owner-bound filesystem envelopes and safely rebinding forwarded exception data.
## Is this a breaking change?
No. New dataclass fields should have defaults so existing custom SerDes implementations and direct context construction continue to work.
## Does this require an RFC?
Yes.
## Additional Context
The Java SDK work in aws/aws-durable-execution-sdk-java#648 passes payload kind, stable entity identity, operation metadata, and attempt number explicitly to SerDes stages.
贡献指南
调研方向
首先定位 frozen SerDesContext dataclass,以及 issue 中列出的由 SDK 管理的序列化和反序列化路径。检查 execution input/output、steps、callbacks、invoke payloads、exceptions 和 retries 当前如何传递 context。完成的标准是:可选的 metadata 字段有文档说明并得到一致填充,且 parity tests 覆盖每条 payload path 和 replay behavior。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- backend
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 活跃
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100