One case generates four different kinds of record. Each has its own purpose, its own consumer, its own retention policy. They never merge.
The temptation is to build one "audit log" for everything. We don't, because legal discovery, forensic debugging, the human case narrative, and service reconciliation are four problems with four different shapes. One table cannot serve all of them well.
Regulatory proof of physical possession of remains and assets. Subject to legal discovery.
Field-level "who changed what when" on every tracked Rails model. High volume, machine-oriented, forensic.
audited gem (automatic)
Curated, human-readable narrative of every meaningful interaction with a case. The story of what happened.
Typed, structured record of what was actually delivered. Backs contract reconciliation and operational analytics.
No single event writes to all four layers. The shape of the event determines where it lands. These three examples show the pattern.
Without explicit rules, four layers drift back into one over time. These are the load-bearing constraints that keep the architecture honest.
custody_events. A mirror narrative
entry is added to Layer 3 — but it carries only a summary and a reference,
never the full custody payload. Regulators read Layer 1; everyone else reads
the mirror.
audits rows. The
translation cost is too high, the noise ratio is too poor. Developers query
Layer 2 directly; end users never see it.
For developers and reviewers: the routing answer in one read.