Documentation
¶
Overview ¶
Command catalogfetch performs an HTTP GET of a release-catalog object using the SAME client shape the production catalog fetcher uses (release_catalog_http.go): HTTP/2 attempted and a self-identifying User-Agent.
Why this exists instead of curl: the live catalog origin (catalog.culvertlabs.com) is fronted by Cloudflare bot management, which fingerprints the TLS/HTTP2 client — NOT just the User-Agent header — and 403s curl even when curl sends the matching UA (two prior CI fixes added the UA and dropped Cache-Control and it still 403'd). The Go net/http client's fingerprint is accepted; it is the known-good shape TestServedVerify_BakedRootGate already relies on. CI convergence/confirm checks therefore fetch through this tool.
Usage:
go run ./cmd/catalogfetch [-raw] [-timeout 30s] <url>
Prints the lowercase-hex SHA-256 of the response body (matching `sha256sum | awk '{print $1}'`), or the raw body with -raw. Exits non-zero on a transport error or any non-200 status, so a caller can guard with `|| VAR=""`.