agentscope-ai / agentscope-ai/QwenPaw

runtime: preserve partial state when async generator is closed

Aperta
#7,410 1 commento 0 reazioni 1 assegnatario Rivendicata da @XiuShenAl Vedi su GitHub
Lingua principale
TypeScript
Stelle
35k
Fork
3.1k
Merge medio
1g 13h
PR unite (30g)
228

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
backend, testing-qa
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.