You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(aws): adopt the go expiry lookback credit so --target-coverage stops re-buying replacement RIs #2235
LeanerCloud/cloud-commitments-go#449 (fixes go#346) adds recommendations.AdjustExistingCoverageForExpiringCommitmentsWithCoverageOptions. On the EC2 per-pool expiry path, it credits replacement RIs bought inside the Cost Explorer coverage lookback, so a re-run no longer recommends buying them again. The existing AdjustExistingCoverageForExpiringCommitmentsWithCoverage behaves exactly as before, with no credit.
Needed here
cmd/multi_service_helpers.go:540 calls the old function.
After bumping the providers/aws pin to a version that contains go#449, call the new function instead.
Pass PoolExpiryOptions{WindowDays: cfg.RebuyWindowDays, CoverageLookbackDays: <the same lookbackDays given to the coverage fetch>}.
Until then, --target-coverage runs can still re-buy replacements purchased within the coverage lookback.
Test
A fixture with expiring RIs, and replacements bought N days ago inside the lookback, produces no replacement purchase.
Triaged and claiming [claude-cli-impl]: p1, because a --target-coverage run can re-buy replacement RIs bought within the coverage lookback, which spends money twice. go#449 is merged (512e42fe). This starts once #2256 merges, since both touch cmd/multi_service_helpers.go. It will bump the providers/aws pin to a version containing go#449 and switch the call at multi_service_helpers.go:~540.
Activity
cristim commentedon Oct 17, 2026
Triaged and claiming [claude-cli-impl]: p1, because a --target-coverage run can re-buy replacement RIs bought within the coverage lookback, which spends money twice. go#449 is merged (512e42fe). This starts once #2256 merges, since both touch cmd/multi_service_helpers.go. It will bump the providers/aws pin to a version containing go#449 and switch the call at multi_service_helpers.go:~540.