agentscope-ai / agentscope-ai/QwenPaw
runtime: preserve partial state when async generator is closed
- 主要言語
- TypeScript
- スター
- 35k
- フォーク
- 3.1k
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 228
説明
## Problem
Closing the runtime async generator through GeneratorExit skips the cancellation-state persistence path. Partial assistant output or tool state can be lost even though agent cleanup and the FINALLY phase still run.
## Expected behavior
GeneratorExit should persist the interrupted state once, re-raise GeneratorExit, avoid the ON_ERROR phase and error envelope, and still close the agent and run FINALLY once.
## Proposed scope
A focused runtime change plus a regression test for the generator-close lifecycle. No API or user-facing behavior changes.
コントリビューションガイド
調査の方向性
Start by tracing the runtime async generator's GeneratorExit path and compare it with the cancellation-state persistence path. Verify the lifecycle around agent cleanup, FINALLY, ON_ERROR, and the error envelope. Add the mentioned regression test and confirm that interrupted state persists once, GeneratorExit is re-raised, ON_ERROR is skipped, and cleanup and FINALLY each run once.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- backend, testing-qa
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100