Repository navigation
fix(aws/ladder): reject nil reshape payment caps instead of treating them as unlimited - #605
Merged
Merged
Conversation
…them as unlimited ReshapeBuffer always runs in auto mode, and a nil MaxPaymentPerExchangeUSD or MaxPaymentDailyUSD was mapped to math.MaxFloat64, so an omitted field meant unlimited spend. Both caps are now required: requireCap (replacing capOrUnlimited) returns a loud error for nil and the unlimitedCapUSD constant is removed. No production caller wires the write side yet, so nothing changes at runtime today. The stale "nil means no cap" doc in pkg/ladder/capability.go is left for a follow-up to avoid conflicting with the open #441, which edits that file. Part of #83 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reached
This review includes 3 billable files and costs up to $0.75.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 22 minutes for your next included review. View limit details
Comment |
Member
Author
Merge gate verdict (claude-cc-libs)Every gate holds at head 7e58441:
CodeRabbit is waived as a merge gate under the 2026-10-19 decision. Squash-merging. |
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.
ReshapeBufferalways runs in auto mode, and a nilMaxPaymentPerExchangeUSD/MaxPaymentDailyUSDwas mapped tomath.MaxFloat64, so an omitted field meant unlimited spend. Both caps are now required:requireCap(replacingcapOrUnlimited) returns a loud error for nil, andunlimitedCapUSDis removed. This is option (a) from the triage; no production caller wires the write side yet, so runtime behavior is unchanged today.The old nil-case test is replaced by
TestReshapeBuffer_CapMapping_NilRejected(fails before the change: no error returned).go build,go vet,go test -count=1 ./...and golangci-lint on providers/aws pass with and withoutGOWORK=off.Follow-up: the "nil means no cap" doc comment in
pkg/ladder/capability.gois now stale. It is left untouched to avoid conflicting with the open #441, which edits that file.Part of #83
🤖 Generated with Claude Code