Search docs
Docs searchValidation rule
Back to Rule CatalogAP-TXN-001Transaction BoundariesTransaction boundary too broad
Flags transactions that appear to wrap more work than necessary.
warningviolationNo auto-fix
How to fix
- Narrow the transaction to the required write set.
- Move reads and non-database work outside the transaction.
- Split independent workflows into separate transaction scopes.
What it means
A transaction scope includes broad orchestration or unrelated work.
Why it matters
Oversized transactions increase lock duration, retry complexity, and failure blast radius.
Common causes
- A transaction wraps an entire service method.
- Read-only work sits inside a write transaction.
- Several independent workflows were grouped together.
Example bad pattern
A checkout transaction wraps pricing lookup, email rendering, external API calls, and writes.Example good pattern
The transaction wraps only the related database writes that must commit together.Related files/config
apps/api/srcapps/webpackages
Related CLI commands
archpilot validatearchpilot validate --ci