Problem. When the pricing API returns no reservation/commitment line, the code invents one from a hardcoded multiplier and surfaces it as a real OfferingDetails.TotalCost/SavingsPercentage:
- Azure:
reservationPrice = onDemandPrice * hoursInTerm * 0.62 (services/compute/client.go:620-624; parallel reservationPrice == 0 branches in cache:512, cosmosdb:504, database:513, search:448).
- GCP:
onDemand * hours * <0.63/0.45/0.85/...> (computeengine:760-766, cloudsql:446-452, memorystore:385-391, cloudstorage:439-445).
managedredis already does the right thing (returns an error when reservation pricing is missing).
Evidence. Azure 09-H4; GCP 10-M4. Violates feedback_nullable_not_zero / §5.
Impact. Misleading savings figures can justify uneconomical real purchases.
Suggested fix. Return an error (as managedredis does) or mark OfferingDetails.Estimated bool and omit SavingsPercentage when estimated, so the UI/CLI discloses it. Pairs with the savings-formula consolidation (I-20, report-12 D5).
References. Source: reports 09 (H4) + 10 (M4). Related: I-20 (shared SavingsPct with zero guard).
Filed from automated adversarial code review (see docs/code-review/). Source finding(s): 09-H4, 10-M4.
Problem. When the pricing API returns no reservation/commitment line, the code invents one from a hardcoded multiplier and surfaces it as a real
OfferingDetails.TotalCost/SavingsPercentage:reservationPrice = onDemandPrice * hoursInTerm * 0.62(services/compute/client.go:620-624; parallelreservationPrice == 0branches incache:512,cosmosdb:504,database:513,search:448).onDemand * hours * <0.63/0.45/0.85/...>(computeengine:760-766,cloudsql:446-452,memorystore:385-391,cloudstorage:439-445).managedredisalready does the right thing (returns an error when reservation pricing is missing).Evidence. Azure 09-H4; GCP 10-M4. Violates
feedback_nullable_not_zero/ §5.Impact. Misleading savings figures can justify uneconomical real purchases.
Suggested fix. Return an error (as
managedredisdoes) or markOfferingDetails.Estimated booland omitSavingsPercentagewhen estimated, so the UI/CLI discloses it. Pairs with the savings-formula consolidation (I-20, report-12 D5).References. Source: reports 09 (H4) + 10 (M4). Related: I-20 (shared
SavingsPctwith zero guard).Filed from automated adversarial code review (see docs/code-review/). Source finding(s): 09-H4, 10-M4.