KamoCRM

Pricing run + result + applied-adjustment (Phase-2 Slice 12b)

Featurekamo-shared-library
Shipped
27 ஜூன், 2026 அன்று 12:15 AM UTC
Author
Kamo
Commit
803ae70

The immutable priced-quote record (doc 02 §6.3/§7.2/§8.1): MlosPricingRun -> MlosPricedProductResult -> MlosAppliedAdjustment, written in one tx by the PPE. - All 3 IMMUTABLE-BY-CREATION (total-block WORM, AiDecision idiom: @PreUpdate throws, no @PostLoad). - Frozen version FK set **************** on the RESULT, not the run (per-product resolution; doc §6.3 line 293/294). - Pricing numbers raw BigDecimal matching the shipped grids: base/final price (9,4); **************** (9,6). total_adjustments = ADDITIVE-only; multiplicative on applied-adjustment rows. - price_adjustment_id = mandatory soft FK -> MlosPriceAdjustment (the §6.5 never-deleting audit chain). created_by_member_id nullable=false. - eligibility_status REUSES EligibilityOutcome; ineligible_reason_code = new MlosAdverseActionReasonCode enum (doc's FK target absent in code). - Review fix: guideline/lock-policy version FKs + priced terms are NULLABLE so KEPT CANNOT_PRICE/NO_COVERAGE rows persist (no sentinel UUID); a @PrePersist invariant restores integrity (ELIGIBLE => priced + no reason; non-ELIGIBLE => reason code present). - 19 tests green. All indexes entity-declared (no KamoInitializer DDL). Grounded by a research Workflow + adversarial 2-agent review (FIX-THEN-SHIP: applied the guideline-version-nullable must-fix + the coherent broadening).

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