I appreciate the work, but I think this would have been better done in chunks.
I'm trying to lint some of the obvious ones you found but I don't think I can merge this PR as is.
Currently there are a few bugs from the refactor:
Logic Inversion in Version Check - cmd/credential-helper/main.go:714-721
shouldUpdate, err := isNewerVersion(versionInfo.Latest, version)
if err != nil {
return err
}
if shouldUpdate { // ← BUG: true means newer IS available
fmt.Printf("You're already running the latest version (%s)\n", version)
return nil
}
WriteHeader Order Bug - pkg/appview/handlers/images.go:103-107
w.Header().Set("Content-Type", "application/json")
resp := map[string]any{...}
if err := json.NewEncoder(w).Encode(resp); err != nil {
slog.Error("failed to write response", "error", err)
w.WriteHeader(http.StatusInternalServerError)
}
w.WriteHeader(http.StatusConflict) // ← BUG: ALWAYS called, after body!
pkg/hold/oci/xrpc_test.go imports slog, which shouldn't be added to test files.
There are more issues, I wish i could inline-comment here like on github.