Skip to content

docs(adr): 0003 — rename Cqrs markers to IAnchor* to fix Mediator clash#32

Open
andersonschott wants to merge 1 commit into
devfrom
docs/adr-0003-cqrs-marker-naming
Open

docs(adr): 0003 — rename Cqrs markers to IAnchor* to fix Mediator clash#32
andersonschott wants to merge 1 commit into
devfrom
docs/adr-0003-cqrs-marker-naming

Conversation

@andersonschott
Copy link
Copy Markdown
Owner

Summary

ADR proposing rename of Aschott.Anchor.Application.Cqrs markers from ICommand<T>/IQuery<T>/ICommandHandler/IQueryHandler to IAnchor{Command,Query,CommandHandler,QueryHandler} to eliminate name clash with Mediator.ICommand<T>/Mediator.IQuery<T> in any consumer file that imports both namespaces (the realistic case for handlers).

Why now

Closes long-standing open question registered in F1 log (2026-05-01 + 2026-05-06 closeout). Decision is breaking but cheap at this moment — only known consumer is our own consumer test in /tmp/anchor-consume-test. Health-System has NOT adopted Aschott.Anchor.Application yet (it uses MediatR-style handlers internally per its current refactor plan). Renaming before HS or any external consumer adopts 0.1.x makes the migration cost zero for them; deferring gets expensive fast.

What this PR does

  • Adds docs/adr/0003-cqrs-marker-naming.md with full context, decision, alternatives considered (A through G), implementation scope tracking, versioning plan (lands in v0.2.0-preview.1), and Health-System implications.
  • No code changes — implementation will be a separate PR (Linear issue to be created if/when ADR accepted).

Test plan

  • dotnet build (no source changes; docs-only PR — checks pass via build-test CI)
  • License check passes (no new package refs)
  • Anderson reviews ADR content + signs off (move status from Proposed → Accepted)

🤖 Generated with Claude Code

Cqrs markers (ICommand<T>, IQuery<T>, ICommandHandler, IQueryHandler) collide
by simple-name with Mediator 3.x's own ICommand<T>/IQuery<T>. Consumers that
import both `Aschott.Anchor.Application.Cqrs` and `Mediator` (the realistic
case for any handler file) hit ambiguous-reference compile errors.

This ADR proposes renaming to IAnchor{Command,Query,CommandHandler,QueryHandler}
to land in v0.2.0-preview.1. Decision is breaking but cheap NOW (only one
known consumer, our own consumer test); cost grows fast as adoption widens.
Health-System has not adopted Anchor.Application yet — picks 0.2.x+ direct,
zero migration cost.

Implementation scope rastreado na ADR; será PR separado quando aceita.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant