aboutsummaryrefslogtreecommitdiff
path: root/internal/stdlib/testdata/dev.fuzz/src
diff options
context:
space:
mode:
authorHana Kim <hyangah@gmail.com>2026-04-12 22:10:16 -0400
committerHyang-Ah Hana Kim <hyangah@gmail.com>2026-04-13 11:42:30 -0700
commitaca48c6d9dcc4892027cdad3243527882201358b (patch)
tree8827e389417a4d7ef4344fd7f28dac0c6be19934 /internal/stdlib/testdata/dev.fuzz/src
parent70e5087371296e2632232f4a3a795f124c73baf3 (diff)
downloadgo-x-pkgsite-aca48c6d9dcc4892027cdad3243527882201358b.tar.xz
internal/api: improve ambiguous package path resolution
Instead of falling back to UnknownModulePath, we now: 1. Query all candidate module paths. 2. Filter out candidates where the database fell back to a different module path (preventing false positives like google.golang.org). 3. Filter out deprecated or retracted candidates if at least one good candidate exists. 4. Return 400 if ambiguity remains among good candidates. This commit fixes the issue where /v1/package/google.golang.org/adk/agent was returning HTTP 400 because all candidate module paths matched: ``` { "code":400, "message":"ambiguous package path", "candidates":[ {"modulePath":"google.golang.org/adk/agent","packagePath":"google.golang.org/adk/agent"}, {"modulePath":"google.golang.org/adk","packagePath":"google.golang.org/adk/agent"}, {"modulePath":"google.golang.org","packagePath":"google.golang.org/adk/agent"}] } ``` Change-Id: I3ea24bca5144d536490019efd85fb597da214029 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/766380 kokoro-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Jonathan Amsterdam <jba@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'internal/stdlib/testdata/dev.fuzz/src')
0 files changed, 0 insertions, 0 deletions