mirror of
https://github.com/luxfi/aml.git
synced 2026-09-24 00:25:20 +00:00
AutoClose closed low-severity cases after thirty days of inactivity, writing Status, Resolution and ClosedAt directly. Store.Resolve refuses a closure with no assessment — a dismissed alert is a retained decision with its rationale, not a deleted row — and this path wrote the same fields itself and walked around that invariant. Eviction then removed the closed case after its retention window, so an alert that was raised, never reviewed and silently closed left no trace of having existed. That is the record AMLR Art. 77(1)(b) requires kept whether or not it produced a report, and the question JMLSG 6.32 requires the compliance officer to be able to answer: why was this not escalated. Closing asserts that somebody assessed the case and decided. Inactivity asserts the opposite. The two must not produce the same state, so the timer now escalates instead — an alert nobody has looked at is exactly what a compliance officer needs to see, and escalating puts it in front of one rather than deleting the question. It also swept only low-severity cases, which reads as caution and is the wrong way up: a critical case nobody has touched is the more serious governance failure. Every severity is now in scope. Nothing on a timer can close a case, and there is a test that says so rather than a comment. Five mutants killed, including restoring the original close. Co-authored-by: Hanzo Dev <[email protected]>