Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng
#8,810 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
74/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
ai, backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
14.2k
Fork
2.5k
Merge trung bình
2 ngày 9 giờ
Pull request đã merge (30 ngày)
392

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/agent-framework

Tất cả issue của microsoft/agent-framework

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.