Skip to content

fix(availability): a go version is known by its .info, not only by the list - #498

Merged
M0Rf30 merged 1 commit into
openartifact:mainfrom
orcamedia:fix/availability-go-versions
Nov 16, 2026
Merged

M0Rf30 merged 1 commit into
openartifact:mainfrom
orcamedia:fix/availability-go-versions

Conversation

@orcamedia

Copy link
Copy Markdown
Contributor

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

…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
M0Rf30 merged commit 8240338 into openartifact:main Nov 16, 2026
23 checks passed
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants