---
title: 'CHR0062: Concurrency applies across event sources'
editUrl: https://github.com/Cratis/Chronicle/edit/main/Documentation/code-analysis/CHR0062.mdx
description: CHR0062 reports a definition or stream concurrency declaration that omits EventSourceId.
lastUpdated: 2026-10-15T00:00:00.000Z
---


## Rule description

A nonempty `Concurrency` declaration on an event source definition or one of its streams that omits `ConcurrencyDimensions.EventSourceId` applies across event source instances. It is an independent cross-source condition, not a guard for the state a command read.

`None` and undeclared concurrency are not reported. The rule evaluates constant flags, including combined dimensions, aliases and casts.

## Severity

Info

A repository that raises all analyzer diagnostics to warning and treats warnings as errors (for example `dotnet_analyzer_diagnostic.severity = warning` in `.editorconfig` with `TreatWarningsAsErrors`) sees this rule as an error. Fix it or suppress it with a justification.

## How to fix

Include `EventSourceId` when the condition should apply per source. The code fix adds that dimension without dropping the existing ones. This changes the predicate; accept it only when per-source concurrency is intended.

A deliberate cross-source condition, or a deliberate stream-id boundary, can remain as declared. Suppress the diagnostic at that declaration and state the reason in the justification, for example `#pragma warning disable CHR0062 // Whole-ledger close applies across accounts`. Use a decision read to protect a state-dependent decision; a concurrency declaration alone does not do that.

## Related topics

- [Concurrency per event source and stream](/chronicle/event-sources/concurrency/)
- [Decision reads](/chronicle/read-models/decision-reads/)
