← Graph

All writes must go through the aggregate

takeaway 2 connections

Once an aggregate is introduced as the source of truth for some logic, every feature that modifies that part of the system must write through it. The 'closed bank account with missing events' bug happened because a new 'ignore webhooks' feature updated the read model directly, skipping the aggregate — so the stream no longer reflected reality. Code review and tests must enforce this rule; human errors happen but are recoverable via event replay and backfilling.

type
lesson-learned
takeaway All writes must go through the aggregate
about
Aggregate Root concept
Reinforces aggregate as the single write path.
takeaway All writes must go through the aggregate
from_talk
Lesson from the 'closed bank account with missing events' story.

Provenance