Repository navigation
fix(aws/ladder): scope EC2 coverage report to EC2 pools - #348
Conversation
computeEC2CoveragePct blended ElastiCache, OpenSearch, Redshift and MemoryDB pools (same region:instance_type key shape) into the reported EC2 RI coverage. Add Client.GetEC2RICoverageMap (one EC2-filtered CE call per region) and use it for the ladder. GetRICoverageMap is unchanged for its multi-service callers. Closes #37 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Warning Review limit reached
This review includes 7 billable files and costs up to $1.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 17 minutes for your next included review. View limit details
Comment |
Merge-gate review: APPROVE at 681407eIndependent gate review (Claude Opus 5.5, did not author this PR). Reviewed the PR diff at be5c4af; the branch was then brought up to date with Checked:
Local evidence (macOS, go1.26.9, CI: green at 681407e (CI - Build & Test, pre-commit). At be5c4af, the providers/aws lint job first failed on the known golangci-lint schema-fetch timeout and passed on rerun. Non-blocking: the plan's ladder-level test (stub returning a poisoned all-services map, expect CoveragePct 80) was not added; the interface rename makes the wiring compile-enforced, so this is a coverage nicety, not a defect. Labels mirror #37. Verdict: merge. |
Closes #37
GetRICoverageMapfans out over EC2, ElastiCache, OpenSearch, Redshift and MemoryDB, all keyedregion:instance_type.computeEC2CoveragePctcould not tell them apart, so the ladder's EC2CoveragePctwas blended. Key-shape filtering cannot work (Redshift dc2/ra3 look like EC2 types), so this addsClient.GetEC2RICoverageMap(one EC2-filtered CE call per region, down from about 12) and the ladder uses it.GetRICoverageMapkeeps its signature and behavior; the CLI multi-service target-coverage sizing path (cmd/multi_service.go) still gets the all-services map.LayerState.CoveragePctis display-only today: nothing consumes it (Allocateignores it, seeTestAllocate_CoveragePctDoesNotChangeAllocation), so there is no live purchase effect. The fix removes the latent risk that a future consumer over- or under-buys off a blended value.Verification: GOWORK=off go test ./recommendations ./ladder . (providers/aws) pass, golangci-lint clean, git secrets scan clean. Fixture/mock-based evidence only.
🤖 Generated with Claude Code