Repository navigation
fix: recfilter, aws and httpclient nits from the #220, #221 and #234 reviews - #501
Conversation
|
@coderabbitai review |
|
|
Independent review: CLEAN at The non-test diff is two lines:
Mutation probes, run locally in a scratch copy and reverted:
Pass-after on macOS at this SHA:
Labels mirror #227. CodeRabbit is quota-limited. If that holds at merge: CR waived: quota, adversarial review + local verification + green CI. |
22b7a84 to
b550846
Compare
|
Updated onto |
Refs #227 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Log at info when ListAccounts is denied or the account is not in an organization on the first page, so the single-account fallback is visible. Add page-two success, three-plus page and page-two NotInUse tests. Refs #227 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…es stay allowed Refs #227 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #227 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b550846 to
9344fe7
Compare
|
Updated again onto |
|
Merged by squash at reviewed head
CR waived: quota, adversarial review + local verification + green CI. A retrospective CodeRabbit review will run when quota returns. Refs #227 (items 4-5 follow after #493). |
Summary
Items 1-3 of #227 (nits from the #220, #221 and #234 reviews), one commit each plus a follow-up test commit:
fix(recfilter):pkg/recfilter/sizing.go:376printed the target with%vwhile its five siblings use%.1f%%; it now matches. Log text only; a NaN-input test pins the message.fix(aws):appendOrgAccounts(providers/aws/provider.go) fell back to the caller account alone, silently, when the firstListAccountspage returned AccessDenied or NotInUse. It now logs that fallback at Info (the level the issue asks for). Behavior is unchanged: the first-page fallback stays as documented, and errors on page 2 and later still propagate, so a partial list cannot slip through. Added subtests for two pages, four pages (the caller account skipped), and NotInUse on page 2; a follow-up commit captures the logger (existinglogging.SetOutputseam, restored int.Cleanup) and asserts the fallback line.test(httpclient): the issue's premise was partly off.169.254.0.0/16is blocked whole, so 169.254.169.253 and .255 are pinned as blocked. The /128 and /32 entries (fd00:ec2::23 and ::254, fd20:ce::254, 168.63.129.16, 100.100.100.200) get allowed-neighbor cases; each neighbor was checked against the block list and the embedded-IPv4 prefixes.Refs #227. Items 4-5 touch
providers/gcp/provider.goandprovider_test.go, which open PR #493 edits; they follow after it merges.Evidence
Mutation probes (implementer and reviewer, scratch copies or reverted in-place edits):
%vfails the NaN test;page == 0guard fails the page-2 tests, an earlybreakfails five tests, deleting the Info log fails both first-page subtests;go test -race -count=5on theproviders/awsroot package passes (the onlyt.Parallelthere is a top-level test, so the global logger swap in serial subtests cannot overlap it).Verification
make build,make vet,(cd pkg && GOWORK=off go test -race -short ./recfilter/... ./httpclient/...),(cd providers/aws && GOWORK=off go test -race -short .), pinned golangci-lint v2.10.1 onpkgandproviders/aws(0 issues), gofmt, and the commit/pre-push hooks pass.Local review: two adversarial passes by a non-author reviewer. Pass 1 found the Info log unpinned (fixed in the fourth commit); pass 2 found nothing actionable.
🤖 Generated with Claude Code
Summary by CodeRabbit