ARCCHR0016: Concurrency flag is ignored when the handler returns exact concurrency scopes
[EventSourceType], [EventStreamType] and [EventStreamId] take a concurrency flag that adds the attribute to the concurrency scope Arc derives for the command’s events. When Handle() returns EventsWithConcurrencyScopes, the returned scopes are used exactly as they are and nothing is derived from the attributes, so concurrency: true does nothing.
The rule fires on a model-bound [Command] whose public instance Handle() returns EventsWithConcurrencyScopes directly, in a Task<> or ValueTask<>, inside a Result<>/OneOf<> branch, or as an element of a tuple. It reports the concurrency argument whether it is passed positionally or by name. concurrency: false and a missing argument are not reported.
Severity
Section titled “Severity”Warning
Example
Section titled “Example”Violation
Section titled “Violation”[Command][EventStreamId("settlements", concurrency: true)] // ARCCHR0016public record SettleFunds(EventSourceId AccountId){ public Task<EventsWithConcurrencyScopes> Handle(IStreamReads streams) => ...;}[Command][EventStreamId("settlements")]public record SettleFunds(EventSourceId AccountId){ public Task<EventsWithConcurrencyScopes> Handle(IStreamReads streams) => ...;}Quick fix
Section titled “Quick fix”Remove concurrency: true deletes the argument and keeps the rest of the attribute. Fix All is supported.
Event source definitions are not reported
Section titled “Event source definitions are not reported”A definition ([EventSource<T>] with concurrency dimensions) is a shared policy that other writers also follow, so the command cannot remove it. An exact scope, for example from StreamDecision.Append, intentionally replaces it for this append. The rule therefore only looks at the attributes on the command itself.