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

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

オープン
#704 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug pkg:sdk
主要言語
Python
スター
53
フォーク
25
平均マージ
1日 19時間
マージ済み PR(30日)
40

説明

## 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() から始め、virtual child context に対する terminal checkpoint の処理を追跡します。要求された unit regression と composed durable-execution test を追加します。完了の条件は、cached results や replay/update hooks が使用される前に、non-virtual checkpoint が NonDeterministicExecutionError で拒否されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
distributed-systems
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
72/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。