Repository navigation
fix(gcp): remove GroupCommitments, which merged machine families into one untyped commitment - #446
Conversation
|
@coderabbitai review |
|
Independent review verdict: CLEAN at 624740cReviewer: fresh Claude agent (Sonnet, high effort), not the author. Coordinator: claude-cc-reviewer. No remaining callers (
Removal is the right fix (#61 option 1): the function keyed groups on account+region+term only, and Runs (providers/gcp, Non-blocking: the platform's Gate:
|
|
CI is green on head |
624740c to
2c84a42
Compare
|
Rebased onto main (server-side |
2c84a42 to
3001f28
Compare
|
Rebased onto main again (BEHIND after another go merge). |
3001f28 to
04faaee
Compare
04faaee to
f1b1879
Compare
|
Rebased again (BEHIND). The range-diff is identical, so the verdict carries over to f1b1879. (claude-cc-reviewer) |
f1b1879 to
51829d9
Compare
51829d9 to
10aac4f
Compare
… one untyped commitment GroupCommitments keyed requests on account, region and term only, and CommitmentRequest carried no commitment type, so it summed vCPU and memory from incompatible machine families into one request with no type to buy it under. It had no caller outside its own tests in this repo or in the platform, CLI and MCP consumers, so it is deleted with its two types rather than kept as an exported entry point to a wrong purchase. Closes #61 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10aac4f to
9372ae6
Compare
Summary
Takes option 1 of #61: delete
GroupCommitmentsand theCommitmentRequest/ResourceCommitmenttypes it returns. They lived inproviders/gcp/services/computeengine/client.go.The function keyed requests on
{account, region, term}only, andCommitmentRequesthad no type field. Ann2-standard-16recommendation and ac3-highcpu-22one were therefore summed into one request that named no commitment type. Nothing calls it, so nothing mis-purchases today. But an exported entry point to that result is a latent wrong purchase, and there is nothing to keep.client.go: -75.client_test.go: -100, the threeTestGroupCommitments_*tests, which only exercised the deleted function.termPlanandmemoryMBFromDetailsstay. Both still have callers and their own direct tests.Closes #61
Consumers checked
Grepped
cloud-commitments-{cli,mcp,platform}and their local clones for the symbols:docs/audits/codebase-audit-2026-09-02.md), which recommends this deletion.providers/gcpversions in the module cache still contain the symbols. Nothing imports them, so no consumer breaks on a pin bump.Verification (macOS, Go 1.26.9)
make buildandmake vetpass.(cd providers/gcp && GOWORK=off go test -race -short ./...)passes.GOWORK=off go build ./...passes inproviders/gcpandci_cd_sanity_tests.7e69fecd. It covered remaining references across all five modules, external imports including the module-cache copies, and test coverage left for the shared helpers.Overlap: open PR #307 (superseded by #401, pending close) also edits
computeengine/client.go. Its hunks are around lines 465 and 1171-1187. This deletion is at lines 603-677, so they don't overlap.🤖 Generated with Claude Code
Summary by CodeRabbit