fix(ladder): tranche storage precision and refusing tranches without a CommitmentRate #1182
Copy link
Copy link
Closed
Labels
effort/sHoursHoursimpact/fewLimited audienceLimited audiencepriority/p3Polish / idea / may never shipPolish / idea / may never shipseverity/mediumModerate harmModerate harmtriagedItem has been triagedItem has been triagedtype/bugDefectDefecturgency/this-quarterWithin the quarterWithin the quarter
Description
Split out from LeanerCloud/cloud-commitments-go#354 (the go side is done: AWS SP commitments are range-checked and truncated to 5 decimals in #403, and the precision contract is documented at pkg/ladder/capability.go:62-74 in #438).
Two items remain for the platform tranche path:
- Tranche commitments are stored as float64 in NUMERIC(20,6). Confirm that the stored precision round-trips the provider precision contract.
- When the tranche executor lands, it must refuse old tranches stored without a CommitmentRate rather than defaulting.
Platform main has no tranche executor yet, so item 2 is a design constraint for that work. See platform#118.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
effort/sHoursHoursimpact/fewLimited audienceLimited audiencepriority/p3Polish / idea / may never shipPolish / idea / may never shipseverity/mediumModerate harmModerate harmtriagedItem has been triagedItem has been triagedtype/bugDefectDefecturgency/this-quarterWithin the quarterWithin the quarter
Activity
IAmJSD commentedon Oct 20, 2026
Claiming: working on this
fix(ladder): drop tranches that floor to $0 and floor the display plan
fix(ladder): floor tranche amounts to the stored scale instead of rou…
IAmJSD commentedon Oct 27, 2026
Closing: both items are fixed on main.
ClaimDueLadderTranchesonly claimsamount_basis = 'commitment'rows (internal/config/store_postgres_ladder_lifecycle.go), and the validatedladder_tranche_amount_provenanceconstraint (migrations 000121/000122) requires a non-emptycommitment_rateon those rows. A future executor built on the claim can't receive a tranche without a rate, so nothing is left to carry into fix(ladder): tranche status is never updated, so in-flight netting grows and planning silently stops #118.