Skip to content

feat(aws/ladder): Convertible RI commitment rate for purchase sizing #732

Closed

Description

@cristim

Part of the ladder phase 3 work in cloud-commitments-platform#70 (the Convertible RI layer).

GetCommitmentRates returns a purchase-sizing rate per layer. Compute SP (#698) and EC2 Instance SP have one; the Convertible RI layer has none, so the engine holds the buffer share that this layer would receive (DefaultBufferFraction).

Add a Convertible RI commitment rate for purchase sizing:

  • New recommendations.GetRICommitmentRate over GetReservationPurchaseRecommendation (EC2, Convertible, the same input as recommendations/client.go, using the ec2RecommendationOfferingClass constant from fix(aws): EC2 RI recommendation uses Standard pricing but the purchase defaults to Convertible #375), mirroring the Savings Plan formula in sp_commitment_rate.go: per detail, covered on-demand = effective monthly RI cost (recurring monthly cost plus upfront cost amortized over the term) plus estimated monthly savings, rate = utilization times cost divided by covered on-demand, as a ratio of sums; filter by account and region; strict parse; a sentinel error when no rate is present.
  • Support all three payment options (converting existing coverage needs the global-term rate).
  • Add LayerConvertibleRI to GetCommitmentRates, wired from the recommendations client beside the existing rate sources. A missing RI rate omits only that layer; any other error stays loud.
  • Do not touch parser_ri.go (the fix(aws): RI recommendation count and costs disagree when Cost Explorer's quantity is fractional #635 lane).
  • Fixture-based tests, including independence from the other two layers.

This is the sizing rate (marginal new purchase), not the observed rate of #686, which converts existing coverage.

Activity

  1. cristim commented on Nov 9, 2026

    @cristim
    MemberAuthor

    Claiming: planning and implementing this as one PR. [claude-cc-platform-2]

  2. self-assigned this
    on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions