docs(adr): 0003 — rename Cqrs markers to IAnchor* to fix Mediator clash#32
Open
andersonschott wants to merge 1 commit into
Open
docs(adr): 0003 — rename Cqrs markers to IAnchor* to fix Mediator clash#32andersonschott wants to merge 1 commit into
andersonschott wants to merge 1 commit into
Conversation
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>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
ADR proposing rename of
Aschott.Anchor.Application.Cqrsmarkers fromICommand<T>/IQuery<T>/ICommandHandler/IQueryHandlertoIAnchor{Command,Query,CommandHandler,QueryHandler}to eliminate name clash withMediator.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 adoptedAschott.Anchor.Applicationyet (it uses MediatR-style handlers internally per its current refactor plan). Renaming before HS or any external consumer adopts0.1.xmakes the migration cost zero for them; deferring gets expensive fast.What this PR does
docs/adr/0003-cqrs-marker-naming.mdwith full context, decision, alternatives considered (A through G), implementation scope tracking, versioning plan (lands inv0.2.0-preview.1), and Health-System implications.Test plan
dotnet build(no source changes; docs-only PR — checks pass viabuild-testCI)🤖 Generated with Claude Code