zeekayandHanzo Dev f7ff1b6e4d cases: the case plane is durable
The other half of the record. Cases and their timelines were two maps, so an
investigation lasted until the pod did — and a case is the record that an
alert was considered and what was decided, kept whichever way the decision
went (AMLR Art. 77(1)(b); JMLSG 6.32). A rollout took the evidence of the
work with it: who looked, what they found, what they concluded.

Split the state onto a shelf, the way the retention ledger already is: one
interface, a memory implementation for the tests, and a Base-backed one for
what an instance serves from. Two collections, aml_cases and
aml_case_events, declared as store.Kinds so every read is tenant-scoped and
every write carries an org.

Three things the maps got for free and the shelf has to earn, so each is
asserted: the case number continues across a restart rather than starting
again at one, which is what stops two cases sharing a number; Get is
deliberately unscoped because the caller holding the id is the one that knows
whose it should be, and putting the check in two places makes the second one
the easy one to forget; and eviction still only removes cases closed longer
ago than the window, so an open investigation is never dropped to make room.

TestCasesSurviveARestart takes the bytes as they are on disk, drops the
instance, opens a second one over them and asks for the case, its note and
its author — then checks the other tenant still cannot read or write it, that
the next case is number two, and that a resolution sticks. Full suite green
under -race.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-30 18:51:53 -07:00
2026-07-30 18:51:53 -07:00
2026-07-30 18:51:53 -07:00
2026-07-30 18:11:22 -07:00
2026-07-30 17:57:36 -07:00
S
Description
Real-time AML/CFT transaction monitoring, sanctions screening and case management
2.1 MiB
Languages
Go 88.1%
TypeScript 9.3%
CSS 1.2%
Python 0.7%
JavaScript 0.4%
Other 0.2%