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: ChatHistoryMemoryProvider swallows caller cancellation

Đã đóng Phù hợp với người mới
#8,811 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
74/100
Loại issue
Lỗi
Độ rõ ràng
Khá 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

Bắt đầu từ đường dẫn tìm kiếm BeforeAIInvoke của ChatHistoryMemoryProvider và đường dẫn lưu trữ UpsertAsync sau khi gọi, tập trung vào các trình xử lý ngoại lệ generic của chúng. Tái hiện cả hai trường hợp với caller token đã bị hủy và xác minh rằng việc hủy của caller được truyền đi, trong khi các lỗi phía provider vẫn hoàn tất theo best-effort.

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

Mô tả

.NET triage
Description

ChatHistoryMemoryProvider treats vector search and history storage failures as best-effort, but its generic exception handlers also swallow OperationCanceledException when the caller-provided CancellationToken has been cancelled.

This affects both the BeforeAIInvoke search path and the post-invocation UpsertAsync storage path, allowing work to continue after caller cancellation.

Expected behavior

Caller-triggered cancellation should propagate. Unrelated provider-side failures, including provider-side cancellation when the caller token remains active, should keep the existing best-effort behavior.

Reproduction

With an already-cancelled caller token, configure SearchAsync or UpsertAsync to surface cancellation. Both paths currently complete without propagating OperationCanceledException.

The fix can remain narrow by filtering the generic catch based on whether the caller token is actually cancelled.

Ngôn ngữ chính
Python
Star
13.6k
Fork
2.3k
Merge trung bình
1 ngày 14 giờ
Pull request đã merge (30 ngày)
451

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

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.