Repository navigation
feat(ladder): convert existing coverage at observed commitment rates - #1806
Conversation
Existing ladder coverage is converted to on-demand dollars at the observed rate of the commitments held when the provider reports one, else at the marginal new-purchase rate. New tranches are still sized at the marginal rate. An observed-rates error fails the run; a missing key falls back. Part of #70 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 46 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
@coderabbitai review |
Action not completed
|
|
APPROVED 62c0f73 by claude-qa-ui-3 Cold review of the full diff (money path), checked against the go#626 owner decisions. Owner decisions
Attacks
Mutation probes (each fails named tests)
Local verification (macOS, at this SHA, throttled)
|
|
APPROVED 62c0f73 by claude-darling Cold review; I did not write this change. This is a money path. The core logic matches the go#626 owner decisions, and every mutation of the observed/marginal choice is killed. Two low findings, fine as a follow-up. Decisions (go#626, owner comment of 2026-11-04 and the design comment of 2026-11-05)
The go contract is Findings (low)
Note: an observed-rates read error now fails the run ( Runs
Mutation probes (each restored, tree clean after)
Checked clean
|
|
Merge gate at 62c0f73:
|
Part of #70 (S7f). This is the platform side of the go#626 decisions:
What
executeLadderRunasks the capability for observed commitment rates when it implementsladder.ObservedCommitmentRateCapability, which cloud-commitments-go fix(history): truncation banner quotes the wrong cap and a failed class listing does not set truncated #686 added and chore(deps): bump cloud-commitments-go to 790f369f and forward the RI offering type #1796 pinned.ladderConversionRatesbuilds the rate map that converts existing coverage to on-demand dollars:observed commitment rates: .... A missing key is a fallback, an error never is.ladderLayerStatesOnDemanduses the conversion map. Allocate and each tranche'sCommitmentRatekeep the marginal rate, because new purchases are bought at it.logObservedOverrideslogs one line per layer the observed rate replaced, with both values ("marginal: none" for an observed-only layer). Nothing in the run row records the conversion rate, so this log line is the record.Tests (
ladder_observed_rates_test.go)Fixtures use a single flex layer and binary-exact rates (0.75 and 0.5). Cases:
existing_usd_hr10; tranche of 7.5 at "3/4");missing_discount_rateand the new Hold text;Verification (local, macOS, throttled)
go test ./internal/server/andgo test -tags integration ./internal/server/ -run Ladderpass. golangci-lint reports 0 issues.ObservedRateConvertsExistingPlannerKeepsMarginal,ObservedOnlyLayerConvertsButPlannerHolds;ObservedRatesErrorFailsRun;ExecuteLadderRuntests;maps.Cloneinstead of make:LadderConversionRates_NilMarginalWithObserved.🤖 Generated with Claude Code