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

Aberta
#3,448 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
58/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
csharp

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
C#
Estrelas
567
Forks
107
Merge médio
1h 19min
PRs com merge (30d)
353

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de fluentcms/FluentCMS

Todas as issues de fluentcms/FluentCMS

Issues semelhantes

Mais issues de C#

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.