Repository navigation
fix(availability): a go version is known by its .info, not only by the list - #498
Merged
Merged
Conversation
…e list The batch availability check lists a proxy's versions from the cached metadata, for go the "@v/list" document. Two things made that wrong for go: - the list names no pseudo-version, so every pseudo-version of a go.sum was not_found, although the proxy serves it; - a build never requests the list (the go command fetches the .info, .mod and .zip of each version), so after a plain "go build" through the proxy every version was unknown. Hooks gain VersionDated (Published reads a document of the version itself, fetched without the list) and Unlisted (versions the list never names); go sets both (its .info, module.IsPseudoVersion). For such a format the batch asks PublishTime about a version the cached list does not name, or when no list is cached: dated, the member has the version and the gate judges it; not dated, a pseudo-version is unknown and a release a cached list lacks is still not there. The reads join the bounded cached-metadata rounds, one per version the list does not name; other formats are not asked. Checked against a go proxy to proxy.golang.org behind a group: cold everything is unknown; after the .info requests of a build a pseudo-version of golang.org/x/exp and golang.org/x/text v0.14.0 are available and dated; an uncached pseudo-version stays unknown; v9.9.9 is not_found once the list is cached; a block rule on the module holds the pseudo-version, as the 403 of its .mod. Co-Authored-By: Claude Fable 5.2 <[email protected]>
M0Rf30
pushed a commit
that referenced
this pull request
Nov 17, 2026
pkg/lockfile reads go.sum: every module version once, also the ones it lists only as "/go.mod" (the go command fetches that file through the proxy too, and the proxy gates it like the zip). A line the go command would refuse (not three fields, a path or version module.Check rejects) makes the file invalid. go.sum records neither requirers nor test-only modules: the table has no REQUIRED BY column, the JSON reports "dependency_graph": false, and --no-dev is refused. --fetch requests the ".info" of each version, escaped as the go command does (module.EscapePath, EscapeVersion), which is what a build fetches and what the batch check reads since #498; and the version list of each module, once, so that a release the module does not have is not_found instead of unknown. The lists are not counted as packages. The fixture is a real go.sum (go mod tidy of a module with a pseudo-version dependency) renamed to example.com/acme. Fuzz target; the --fetch path fuzz target covers go too. Checked against a go proxy to proxy.golang.org on the real go.sum: cold all unknown; after --fetch all five module versions available, the two pseudo-versions included; --no-dev refused; a block rule on golang.org/x/exp holds its pseudo-version; an invented rsc.io/quote v1.9.9 is not_found. Co-authored-by: Areef <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
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.
The batch availability check listed a go proxy's versions from @v/list only. That list names no pseudo-version (so every pseudo-version of a go.sum was not_found), and a build never requests it (so after a plain go build everything was unknown). Two proxy hooks (VersionDated, Unlisted; go sets both) let the batch ask PublishTime about a version the cached list does not name: dated, the member has it; not dated, a pseudo-version is unknown and a release a cached list lacks is still not_found. Other formats are not asked.
Checked against a go proxy to proxy.golang.org: cold all unknown; after a build's .info requests a pseudo-version of golang.org/x/exp and x/text v0.14.0 are available and dated; a block rule holds the pseudo-version, as the 403 of its .mod. Groundwork for go.sum in oa check, which waits for #496 and #497.
🤖 Generated with Claude Code