RateSheetSanityGate — §6.6 hard pre-publish sanity gate (range + monotonic)

Featurekamo-shared-library
Shipped
June 27, 2026 at 9:13 PM UTC
Author
Kamo
Commit
3e1f8f1

A pure-logic ungated @Component (the PriceAssemblyEngine pattern) validating a candidate rate/price ladder BEFORE a rate-sheet version publishes (doc 02 §6.6): convention-aware price-range band [par±20] (par=100 PRICE_TO_100 / 0 POINTS_FROM_PAR — catches gross sign/convention errors), monotonic-ladder (price non-decreasing as note rate rises, per (lockPeriodDays,ioFlag) ladder), and structural well-formedness (non-empty / positive rate / positive lock / no duplicate rate). Reports ALL violations; fails closed. Reusable by the future ingestion candidate-stage (takes a decoupled RateSheetLadderCell record, not the JPA entity). 2-agent adversarial review → FIX_THEN_SHIP (1 must-fix applied): removed the par-sanity near-par-PRICE check — it false-rejected legal all-premium/all-discount coupon windows (par-RATE sanity needs rate labeling, deferred; the band already bounds prices to ±20 of par). Also: softened the sign-convention javadoc (explicit sign-convention check DEFERRED, band catches only gross magnitude errors), excluded null-rate cells from the duplicate/monotonic scan, and skip the monotonic compare on equal rates. 18 no-DB tests (TDD). No new entity → no KamoInitializer run.

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