# Transaction Boundary

Record: `arch:transaction-boundary`
Kind: constraint
Layer: [Atomic Boundary](https://banes-lab.com/records/layer/atomic-boundary.md)
Severity: mandatory
Scope: unit of work, aggregate, service
Canonical: https://banes-lab.com/ontology#arch-transaction-boundary

## Repair

- Refactored by: Shrink Boundary, Add Saga
- Detected by: transaction scope leakage
- Violated by: spanning transactions across service boundaries
- Measured by: transaction size/duration
- Enforced by: transaction policy

## requires

- [Consistency Rules](https://banes-lab.com/records/lex/consistency-rules.md)

## reinforces

- [Atomicity](https://banes-lab.com/records/arch/atomicity.md)
- [Unit of Work Pattern](https://banes-lab.com/records/arch/unit-of-work-pattern.md)

## enables

- [Safe State Mutation](https://banes-lab.com/records/lex/safe-state-mutation.md)

## conflicts-with

- [Hidden Distributed Transaction](https://banes-lab.com/records/lex/hidden-distributed-transaction.md)

## tensions-with

- [Large Transaction Scope](https://banes-lab.com/records/lex/large-transaction-scope.md)

## tensions

- [Transaction Boundary Large Transaction Scope](https://banes-lab.com/records/tension/large-transaction-scope-transaction-boundary.md)

## contracts

- [Transaction Boundary](https://banes-lab.com/records/algo/transaction-boundary.md)

## referenced-by

- [Atomicity](https://banes-lab.com/records/arch/atomicity.md)
- [Unit of Work Pattern](https://banes-lab.com/records/arch/unit-of-work-pattern.md)
