Repository navigation
Conversation
PurchaseCommitment bought the first matching offering without comparing its price to the recommendation's CommitmentCost, and left the API's LimitPrice unset, so a repriced or differently-priced offering bypassed the approved cap. Refuse when the offering's total upfront (FixedPrice x Count) exceeds the approved upfront by more than 5%, and send that ceiling as LimitPrice. Recommendations with no positive upfront are unchanged. Other services' purchase paths from #53 are not covered here. Part of #53 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Member
Author
|
Owner decision needed before merge (purchase semantics). #53 asks to refuse when the resolved offering's upfront exceeds the approved recommendation cost "by more than a configured tolerance". This PR hard-codes Options:
Default if there is no answer within 24h: 1, merged as written. Both cold reviews approved this head; the tolerance is the only open point. [claude-cc-libs] |
… unchecked AWS documents LimitPrice only for Marketplace offerings, which findOffering excludes, so it protected nothing and might be rejected. The local upfront refusal stays unchanged. A recommendation whose commitment currency is set and is not USD is now refused. Zero CommitmentCost stays unchecked because the MCP EC2 tool never sets it. Part of #53 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #53
What
EC2
PurchaseCommitmentbought the first matching offering without comparing its price to the approved recommendation and left the API'sLimitPricenil (finding "No purchase path reconciles the resolved offering's price against the approved recommendation cost"). Now it refuses when the offering's total upfront (FixedPricexCount, in cents) exceedsrec.CommitmentCostby more than 5%, and sends that ceiling asLimitPrice(USD). No positive approved upfront (no-upfront options, missing figure) leaves behavior unchanged; a non-USD offering or a missingFixedPricewith an approved upfront is refused.Why this item: it is the one place a bought price can silently exceed the figure the
MaxPurchaseAmountapproval was evaluated on, on a path that spends real money. The 5% tolerance is a constant inofferingprice(UpfrontTolerance) shared by the other services, which are not covered here.Not covered (left on #53)
Same check for RDS, ElastiCache, MemoryDB, OpenSearch, Redshift; SUBSCRIPTION_ID join, region aliases, STS caching, SP date parsing, lookback fallback, MemoryDB engine, A09-009.
Proof
LimitPricetests) and with the ceiling's tolerance removed; the boundary test fails when>becomes>=.go test -timeout 300s -count=1 ./..., golangci-lint v2.10.1 with the repo config, gocyclo: clean.🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Tests