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

Abierto
#3,448 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
58/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
csharp

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C#
Estrellas
567
Forks
107
Merge medio
1 h 19 min
PR fusionados (30 d)
353

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de fluentcms/FluentCMS

Todos los issues de fluentcms/FluentCMS

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.