Search docs
Docs searchValidation rule
Back to Rule CatalogAP-EVT-002Event ArchitectureCircular event chain risk
Flags event chains that may loop back to their starting workflow.
warningviolationNo auto-fix
How to fix
- Break the cycle with a clearer event boundary.
- Add idempotency and correlation guards.
- Document intentional event choreography.
What it means
An event handler appears to publish an event that can trigger the original publisher path again.
Why it matters
Circular event chains can create duplicate processing, retry storms, or inconsistent state.
Common causes
- Handlers publish broad follow-up events.
- No idempotency guard exists.
- A workflow was converted from sync calls to events without reviewing cycles.
Example bad pattern
PolicyUpdated triggers RepositoryRevalidated, which triggers PolicyUpdated again.Example good pattern
Event handlers publish downstream events that do not re-enter the same state transition.Related files/config
apps/api/srcpackages/contracts/src
Related CLI commands
archpilot validatearchpilot validate --ci