aws / aws/aws-durable-execution-sdk-python

[Bug]: Virtual child replay can consume a non-virtual container checkpoint

未关闭
#704 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
bug pkg:sdk
主要语言
Python
星标
53
派生
25
平均合并
1 天 20 小时
30 天内合并 PR
39

描述

## 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

贡献指南

打开贡献指南

调研方向

从 ChildOperationExecutor.check_result_status() 开始,跟踪虚拟子上下文的终端 checkpoint 处理。添加所请求的单元回归测试和组合式 durable-execution 测试;完成的标准是在使用缓存结果或 replay/update hooks 之前,以 NonDeterministicExecutionError 拒绝非虚拟 checkpoint。

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
distributed-systems
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
活跃
描述清晰度
描述清楚
新手友好度
72/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。