Search docs
Docs searchValidation rule
Back to Rule CatalogAP-EVT-003Event ArchitectureSynchronous dependency disguised as event
Flags events used like immediate synchronous calls between modules.
warningviolationNo auto-fix
How to fix
- Use an explicit service boundary for synchronous dependencies.
- Use events for post-commit or eventually consistent work.
- Document expected consistency and failure handling.
What it means
A publisher appears to require immediate handler completion to finish its own workflow.
Why it matters
Events should decouple workflows; using them synchronously hides dependencies and failure behavior.
Common causes
- An event bus is used as a service locator.
- Handlers return data needed by the publisher.
- A synchronous dependency was renamed as an event without changing semantics.
Example bad pattern
Checkout publishes PriceCalculatedEvent and waits for the handler to return the price.Example good pattern
Checkout calls PricingService synchronously, then publishes CheckoutStarted for async follow-up.Related files/config
apps/api/srcpackages/contracts/src
Related CLI commands
archpilot validatearchpilot validate --ci