{{repo name}} / {{date}}

Architecture review

{{review scope}}

module seam leak deep module

Decision record: {roots.state}/specdev/changes/{change}/architecture-review.md

AR-001

Collapse the Order intake pipeline

Strong in-process

Files

src/order/handler.ts · src/order/validator.ts · test/order.test.ts

Before

flowchart LR
  A[OrderHandler] --> B[OrderValidator]
  B --> C[OrderRepo]
  C -. leak .-> D[PricingClient]
  classDef leaking stroke:#dc2626,stroke-width:2px
  class C,D leaking
                

After

Interface

one narrow interface

Hidden implementation

validation
pricing protocol
persistence
Problem
Callers coordinate three shallow modules and absorb the failure order.
Solution
Move the intake policy behind one deep module.
Wins
One test surface · Local failure policy · Fewer leaking seams

ADR note: {{none or conflict explanation}}

Best recommendation

Collapse the Order intake pipeline

It removes the hottest coordination seam while preserving the domain language and existing behavior.