- Shipped
- July 8, 2026 at 3:51 PM UTC
- Author
- Kamo
- Commit
- 56065a6
CREATE UNIQUE INDEX uk_mlos_closing_pkg_active_loan ON mlos_closing_package (loan_file_uid) WHERE status <> 'CANCELLED'. Durable backstop behind the assembler's in-app idempotency guard: a duplicate active closing package would drive its own MERS registration + funding (a double close). ClosingPackage lives in shared-lib with only non-unique @Index entries and can't express a partial-unique constraint via JPA, so it's hand-written DDL here (KI owns schema). Idempotent; applies on the next KI run.