Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

.NET: AI context streaming decorators do not dispose inner enumerators on early exit

Chiusa
#8,810 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
74/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
ai, backend

Direzione di ricerca

Locate AIContextProviderChatClient and MessageAIContextProviderAgent, then inspect where each manually acquires its inner async enumerator. Use the described inner stream with a finally block and consume one update before breaking; done means disposal is observed after normal completion, early exit, cancellation, and enumeration failure.

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

Descrizione

.NET triage
Description

AIContextProviderChatClient and MessageAIContextProviderAgent manually acquire inner async enumerators but do not dispose them when the outer consumer stops early.

If a caller breaks from the outer streaming enumeration before the inner stream completes, the inner iterator finally block does not run and resources owned by that iterator can remain undisposed.

Expected behavior

The inner async enumerator should be disposed after acquisition on normal completion, caller early exit, cancellation, and enumeration failures.

Reproduction

An inner async stream with a finally block can track disposal. Consuming one update from either wrapper and then breaking leaves that flag unset on the current implementation.

The fix can remain narrow by establishing async disposal ownership immediately after GetAsyncEnumerator succeeds.

Lingua principale
Python
Stelle
13.6k
Fork
2.3k
Merge medio
1g 15h
PR unite (30g)
442

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/agent-framework

Tutte le issue di microsoft/agent-framework

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.