Conversation
bakayolo
approved these changes
Apr 29, 2026
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.
What and Why ?
Picks up the two coverage targets the round-1 coverage PR (#60) deliberately
punted, plus a tiny lint fix on
EOLConfigthat surfaced after the round-1baseline.
Coverage
pkg/policypkg/inventory/wizProduction-code changes (2, both non-behavioral)
pkg/inventory/wiz/http_client.go— added package-privateauthURLandgraphqlURLfields onHTTPClient.NewHTTPClientdefaults them to theexisting
wizAuthURL/wizGraphQLURLconstants, so production callers seeno behavioral or API change. Tests can now construct an
*HTTPClientliteral pointed at an
httptest.Serverwithout a new public constructor orenv var.
pkg/config/types.go— added//nolint:govet // YAML field order chosen for readability of resources.yamlonEOLConfig. Same wire-format-stabilityrationale already applied to
Snapshot,SnapshotSummary,WorkflowOutput,etc. in #59 — struct field order surfaces in YAML emission order, so
reordering would silently rewrite how
resources.yamlround-trips.New tests
pkg/policy/messages_test.go— branch coverage forDefaultPolicy.GetMessage(every status arm + bogus-status default),GetRecommendation(every status arm + with/without upgrade target),usableUpgradeTarget(empty / equals-cycle / equals-current / validcandidate),
versionMatches(exact, prefix, mismatch,k8s-andkubernetes-prefix stripping, bare-major false-prefix guard), and thetwo
Classifybranches round-1 didn't exercise.pkg/inventory/wiz/http_client_test.go— network-side coverage ofHTTPClientdriven byhttptest.Server:NewHTTPClientdefaults,GetAccessToken(happy / non-200 / bad JSON / transport error),GetReport(happy / lastRun-not-COMPLETED / GraphQLerrors[]/ HTTP5xx),
doGraphQLretry behavior (rate-limit retried then succeeds;rate-limit then context cancelled mid-backoff returns ctx error),
DownloadReport(happy / non-200 / transport error).Verification
All commands run with
GOTOOLCHAIN=go1.24.2(see toolchain caveat noted on #59):go build ./...→ cleango test ./...→ all packages greengolangci-lint run ./...→ 0 findings (PR chore(lint): clear pre-existing golangci-lint baseline (20 → 0 findings) #59 lint baseline preserved)go test ./pkg/policy ./pkg/inventory/wiz -cover→ 98.8% / 88.9%