aws / aws/aws-durable-execution-sdk-python
[Bug]: Virtual child replay can consume a non-virtual container checkpoint
- Ngôn ngữ chính
- Python
- Star
- 53
- Fork
- 25
- Merge trung bình
- 1 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 39
Mô tả
## Expected Behavior
When replay changes a `run_in_child_context` operation from non-virtual to `ChildConfig(is_virtual=True)`, the SDK should reject the existing container checkpoint with `NonDeterministicExecutionError` before returning its cached result or emitting replay hooks.
Virtual child contexts never write their own container checkpoint. Therefore, any existing checkpoint at the virtual child operation ID proves that the prior execution used non-virtual checkpointing.
## Actual Behavior
`is_virtual` is not represented in `OperationIdentifier`. A successful `CONTEXT` checkpoint from a previous non-virtual child passes type, subtype, name, and parent validation. `ChildOperationExecutor.check_result_status()` then returns the cached result without executing the current virtual child body, so changes to the inner hierarchy are never validated.
This reproduces on both `main` and PR #698, so it is pre-existing and separate from #692, whose scope is type/subtype/name checkpoint identity.
## Suggested Fix
- Reject any existing child-container checkpoint when the current child is virtual.
- Perform the rejection before terminal checkpoint handling and replay/update plugin hooks.
- Add a unit regression for `ChildOperationExecutor` and a composed durable-execution test covering non-virtual to virtual replay.
## Context
Found while reviewing #698. Related review threads:
- #698 review comment 3909282767
- #698 review comment 3922629188
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với ChildOperationExecutor.check_result_status() và lần theo việc xử lý các checkpoint đầu cuối cho các context child ảo. Thêm regression test cấp unit được yêu cầu và một composed durable-execution test; hoàn thành có nghĩa là một checkpoint không ảo bị từ chối với NonDeterministicExecutionError trước khi các kết quả đã được cache hoặc các hook replay/update được sử dụng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- distributed-systems
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 72/100