Bulk removal of MCP clients: filter before the transaction per client, and skip only a foreign key refusal

Đang mở
#3,448 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
58/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
backend, databases, testing

Hướng nghiên cứu

Start with src/FluentCMS.Core/Identity/Oidc/McpClients.cs and trace RemoveOpenApprovedAsync and RemoveUnusedAsync, focusing on where the span and open-approved filter are applied and how save failures are handled. Add tests that count which clients the query touches and confirm only a foreign key refusal is skipped; other save failures should propagate. Done when both behaviors are covered and the bulk removal still respects the 100-client ceiling.

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

Mô tả

area:identity plugin type:bug

Follow-ups of the bulk removal of self-registered MCP clients (#3397, #3434), found in its second review. src/FluentCMS.Core/Identity/Oidc/McpClients.cs.

  • The span is applied after a transaction is opened per client. RemoveOpenApprovedAsync opens an IdentityChanges transaction and reads again every client the open policy approved, those outside the span included. The ceiling of 100 bounds the deletes, not the scan: a call costs up to maxClients (which can be set to 100000) empty transactions. A cost, not a wrong answer.
  • Any save failure is taken as "a consent arrived". catch (DbUpdateException) in the bulk removal and in RemoveUnusedAsync takes every failure of the save, a failed outbox write included, as the foreign key refusal it was written for. A failure that lasts would answer 200 with { removed: 0, more: false } and one warning 9009 per client.

Wanted

  • The span and the open-approved filter applied in the query, so that a call touches only its candidates, with a test that counts.
  • Only a foreign key refusal skipped; another failure thrown, with a test.

Bundle 26.

Ngôn ngữ chính
C#
Star
567
Fork
107
Merge trung bình
1 giờ 19 phút
Pull request đã merge (30 ngày)
353

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 fluentcms/FluentCMS

Tất cả issue của fluentcms/FluentCMS

Issue tương tự

Thêm issue về C#

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.