[Feature]: Harden FileSystemSerDes publication and reference validation

未關閉
#679 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
35/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
python

研究方向

從 FileSystemSerDes 和設定的內部值 SerDes 開始,然後比較 aws/aws-durable-execution-sdk-java#648 中 Java SDK filesystem SerDes 的工作。檢視 #527 中追蹤的雲端涵蓋範圍,涵蓋不可變發布以及所有權/完整性情境。完成的標準是具備帶版本且繫結擁有者的 envelope、安全的不可變且經過完整性檢查的讀取、legacy 相容性、保留的模式、例外重新序列化,以及生命週期文件。

由索引模型根據 Issue 內容生成。

描述

enhancement parity pkg:sdk

What would you like?

Harden FileSystemSerDes so checkpoint file references remain immutable, integrity-checked, and bound to the durable payload that produced them.

The current implementation writes to a deterministic <operation_id>.json path using "w" and stores an unversioned {"file": ...} envelope. A later serialization for the same operation can overwrite content referenced by an older checkpoint, and deserialization trusts the file path carried in the envelope.

The desired behavior is:

  • publish each file payload immutably so an existing checkpoint never observes replaced content;
  • use a versioned, self-identifying filesystem envelope;
  • bind the envelope to its durable execution and entity identity;
  • verify file integrity and path safety before reading;
  • retain ALWAYS, OVERFLOW, preview, URI, and hash modes.

Possible Implementation

  • Serialize the configured value SerDes once, compute a SHA-256 digest, and create a unique payload file with exclusive-create semantics.
  • Include an envelope marker/version, owner durable execution ARN, owner entity/operation ID, payload type, file path, and content digest.
  • On deserialization, validate the recognized envelope, expected execution directory and filename, base-path containment, symbolic links, owner rules, and content digest.
  • Define explicit rules for safe cross-execution references such as invocation input/results. When an exception is forwarded through a child context, deserialize and reserialize it under the new owner rather than copying an owner-bound file envelope.
  • Preserve compatibility by continuing to read the existing legacy envelope format for an appropriate migration period.
  • Document storage lifecycle guidance because immutable payload publication can create orphaned files after checkpoint replacement.
  • Extend the cloud coverage tracked by #527 with immutable publication and ownership/integrity scenarios.

Is this a breaking change?

No. Existing constructors and configuration should remain compatible, and legacy envelopes can continue to be readable.

Does this require an RFC?

Yes.

Additional Context

The Java SDK filesystem SerDes work in aws/aws-durable-execution-sdk-java#648 uses immutable publication, versioned ownership metadata, content hashes, containment checks, and symbolic-link rejection. This issue requests equivalent guarantees adapted to Python's synchronous SerDes[Any] and configurable inner value SerDes.

主要語言
Python
星號
59
分支
32
平均合併
1 天 5 小時
30 天內合併 PR
76

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

aws/aws-durable-execution-sdk-python 的其他 Issue

查看 aws/aws-durable-execution-sdk-python 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。