agentscope-ai / agentscope-ai/QwenPaw
runtime: preserve partial state when async generator is closed
- Lenguaje dominante
- TypeScript
- Estrellas
- 35k
- Forks
- 3.1k
- Merge medio
- 1 d 13 h
- PR fusionados (30 d)
- 228
Descripción
## 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.
Guía de contribución
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- python
- Área
- backend, testing-qa
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Activo
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100