Files
Josep Piguillem e14f445e6b fix(api): retry commands that clash with a concurrent write
Services run commands through a CommandRunner that runs one again (up to
5 times, waiting a little longer each time) when its aggregate changed
underneath, e.g. a saga writing to the same ticket. Each command loads its
aggregate fresh and stores its events in one transaction, so a
ConcurrencyError means nothing was stored and running it again is safe.
People no longer get a 409 for it, and the e2e suite stops flaking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:00:08 +02:00
..
2026-10-03 13:40:26 +02:00
2026-10-03 13:40:26 +02:00
2026-10-03 13:40:26 +02:00
2026-10-03 13:40:26 +02:00
2026-10-03 13:40:26 +02:00

api-identity-application

Casos de uso de identidad.

  • Import: @task-stream/api/identity/application
  • Capa: application · Tags: scope:api-identity, type:application

Contenido

  • IdentityService: punto de entrada para los presenters.
  • Queries: ResolveSessionQuery (token → usuario, con caché), FindUserQuery, FindUsersByIdsQuery, SearchUsersQuery, GetAuthorizationConfigQuery.
  • Commands: IssueTokenCommand (login / refresh vía Pireon), HandleIdentityWebhookCommand (al desactivar a un usuario, guarda UserDeactivatedEvent en el event store para que el tracker reaccione).
  • Puertos: IdentityProvider, SessionCache, UserRegistry.

Ver Autenticación.

Comandos

npx nx lint api-identity-application
npx nx test api-identity-application    # Jest

Reglas de dependencia entre capas: Arquitectura.