Repository navigation
audit(reshape): verify CE-driven cross-family alternatives (closes #152) - #814
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 4 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds a markdown audit document ( ChangesRI Exchange Alternatives Audit and Fixture Tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
@coderabbitai review |
Rate Limit Exceeded
|
|
@coderabbitai full review Generated by Claude Code |
|
🧠 Learnings used✅ Action performedFull review finished. |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@exchange-alternatives-audit.md`:
- Around line 122-123: The heading for Fixture C is split across two lines
(lines 122-123), which causes incorrect Markdown parsing and lint errors.
Combine the entire heading text "### Fixture C: dollar-units false positive at
CE layer is caught at exchange time, not recommendation time" onto a single
line, and then add a blank line after this heading before any body text follows
to ensure proper Markdown formatting.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 45c8d0ee-adc6-4122-b0fd-06a1155e4c7f
📒 Files selected for processing (2)
exchange-alternatives-audit.mdpkg/exchange/reshape_crossfamily_test.go
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
The peerFamilyGroups allowlist removed in 1d76df7 was both too restrictive (prevented cross-group exchanges like m5->c5 that AWS would accept) and too narrow (missed new-gen families like m8g). The CE-driven path is correct: term-match + dollar-units guards together enforce the same rules as GetReservedInstancesExchangeQuote without a per-pair API call. Add docs/exchange-alternatives-audit.md: full diff of old allowlist vs CE approach, classification of each delta, and verdict (no predicate tightening required). Extend reshape_crossfamily_test.go with three audit fixtures (#152): - cross-group alternatives surface (m5 sees c5/r5) - new-generation family surfaces (m8g, absent from old allowlist) - dollar-units pre-filter blocks an offering AWS would reject
The comment referenced docs/exchange-alternatives-audit.md but the file sits at the repo root as exchange-alternatives-audit.md.
The Fixture C heading wrapped onto a second line, so Markdown parsed the continuation as body text and markdownlint flagged a missing blank line after the heading. Keep the heading on one line.
Summary
fillAlternativesFromRecs/passesDollarUnitsCheck/termMatchesIfKnownagainst all five AWS RI Exchange API rules (convertible class, same region, same term, dollar-units, platform scope)exchange-alternatives-audit.mdat repo root with: oldpeerFamilyGroupsallowlist diff, per-delta classification, and a no-tightening verdictpkg/exchange/reshape_crossfamily_test.gowith three audit fixtures: cross-group surface (m5 sees c5/r5), new-gen family surface (m8g absent from old allowlist), dollar-units pre-filter blocks a sub-threshold offeringTest plan
go build ./...passesgo test github.com/LeanerCloud/CUDly/pkg/exchange/... github.com/LeanerCloud/CUDly/internal/api/...passes (1413 tests, +3 from baseline)exchange-alternatives-audit.mdverdict: no predicate tightening requiredSummary by CodeRabbit
Documentation
Tests