KamoCRM

Catalog provenance + effective-dated versioning spine (Phase-2 Slice 1)

Featurekamo-shared-library
Shipped
26 ஜூன், 2026 அன்று 4:43 PM UTC
Author
Kamo
Commit
5c26d02

Smallest shippable slice of the Phase-2 catalog (doc 02 §6): the provenance chain ImgDat -> MlosSourceDocument -> MlosRateSheetVersion and the immutable effective-dated versioning spine with point-in-time resolution. Substrate-first (no MLOSCatalogService writer yet); this is the immutable-catalog-PK foundation DecisionInput will FK to. New pkg com.kamo.z.shared.mlos.catalog: - MlosInvestor (per-org registry; short_code unique per org), MlosSourceDocument (thin annotation over locked ImgDat; soft-FK img_dat_id, never re-stores bytes, doc 02 §6.4). - MlosRateSheetVersion: immutable effective-dated version (effective_from/until window, supersedes self-FK, sequence_no, status lifecycle, source_document FK, cutoff_time) with an app-layer partial-mutability WORM guard (@PostLoad snapshot + @PreUpdate diff): freezes priceable/identity cols, permits only DRAFT->ACTIVE, ACTIVE->SUPERSEDED, ACTIVE->RETIRED and the write-once close of effective_until. No DB trigger (CRDB can't finalize to 24.3). - EffectiveVersionResolver (gated mlos.catalog.enabled): point-in-time resolution — the version whose [effective_from, effective_until) window CONTAINS priced_as_of, never a "latest row" join; throws on effective-window overlap (defense-in-depth, doc 02 §6.5/§8.1). - 6 enums **************** RateSheetVersionStatus) + 3 repos. Base = BaseUuidEntity (doc 02 §6.1); orgId=Long @JsonSerialize(ToString) (code-verified: Organization.id is unique_rowid, not doc 02's "UUID"). 17 tests green (6 resolver point-in-time + 11 WORM guard). KamoInitializer adds the catalog repo pkg + the ux_rate_sheet_version_active partial-unique no-overlap index.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing