NULLs-safe unique index for ClosingWorkflowTemplate versions (doc 05 §6.3)

FeatureInitializerService
Shipped
June 30, 2026 at 7:48 PM UTC
Author
Kamo
Commit
72d5e38

One version per (organization_id, scope_level, scope_ref_id) grain. CRDB is NULLs-distinct, so split for the nullable scope_ref_id (mirrors mlos_aiptp_*): mlos_closing_wft_version_uniq (scope_ref_id IS NOT NULL) + **************** on (org, scope_level, version) (scope_ref_id IS NULL). The MLOSDocOrchestration publisher's read-then-write (versionNumber=max+1) backstop: a concurrent dup-version publish loses to a 409 (else the assembler resolver 409s on the dup, bricking assembly).

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing