Dashboard › cli › Distillation
9b3b18ef-c49f-4829-9770-6137a5d4fbbc["lore_tm_v1_mpaq0HiJHakENeintrQkgr94Wkf1QQnMc6EirNkPUDI","lore_tm_v1_cjfzrhqYsbxSWWGpmBEp3D4oFPPiu1vn2f5OiARIOpQ","lore_tm_v1_vw-pLB6uYHEf90IC7exgUNi9ojAWnvqC7Z4eEvMMAo0","lore_tm_v1_rLRWa6pNqXLIhw43wci2Z9064tOR6i8XRztG_vx3EcY","lore_tm_v1_xd_5Clot9AeD07cO8k99MOerM-lDBvFh8J4Q4bD2WoE","lore_tm_v1_r7RcjrWrrB20eLNZtSF0LfMK3T_J_0J2wLYwKmspnlA","lore_tm_v1_0gf11uHPXmkq-ThMjIH7Bf_xhXDyp9wk4_OBXsgNwdo","lore_tm_v1_rRJcNkOvBss0xmWyhX5z9RsUeV9wgQSYb4Zn0613eD8"]
packages/cli/src/lib/ghcr.ts:134 exports GHCR_REPO = "getsentry/cli"; token exchange, manifest fetches, blob downloads, and tag listing all use this repository. packages/cli/src/lib/delta-upgrade.ts:44,135,288 imports and uses that same GHCR_REPO, so GHCR-backed delta upgrades currently have a single hard-coded repository source.packages/cli/src/lib/errors.ts:586-618 defines UpgradeErrorReason values "unknown_method", "unsupported_operation", "network_error", "execution_failed", "version_not_found", and "offline_cache_miss". UpgradeError extends CliError, uses EXIT.UPGRADE, stores the selected reason, and provides a default message for each reason.packages/cli/src/lib/errors.ts:810-885 identifies search-query parse failures as ApiError instances with HTTP 400 and detail containing "Error parsing search query". toSearchQueryError() converts such an error to ValidationError(..., "query") only when userQuery is truthy, adding SEARCH_QUERY_HELP and optional command-specific suggestions; without a user query it preserves the original ApiError so CLI-authored malformed queries remain reportable bugs.packages/cli/src/lib/errors.ts:904-927 defines isNetworkError() narrowly as TypeError with message exactly "fetch failed". isUserError() treats that raw fetch failure and ApiError.status === 0 as user environment/configuration errors rather than CLI bugs; status 0 deliberately includes both connectivity failures and TLS certificate errors.binpatch@0.4.2βs OciClient.fetchWithRetry() combines AbortSignal.timeout(timeout) with an optional external signal via AbortSignal.any(), retries retryable failures through MAX_RETRIES, stops on external AbortError, and ultimately throws BinpatchError("network_error", ...).binpatch@0.4.2βs OciClient builds registry URLs from configurable config.registry and config.repo: anonymous token exchange uses /token?scope=repository:${repo}:pull, manifests use /v2/${repo}/manifests/${tag}, tags use paginated /v2/${repo}/tags/list?n=${TAGS_PAGE_SIZE}, and blobs use /v2/${repo}/blobs/${digest}.binpatch@0.4.2βs downloadBlob() manually follows HTTP 301, 302, 307, and 308 redirects without forwarding the Authorization header, applies BLOB_TIMEOUT to both registry and redirected storage requests, accepts a direct HTTP 200 response, and reports missing Location, failed storage downloads, or unexpected statuses as BinpatchError("network_error", ...).binpatch@0.4.2βs ghcrSource(config) accepts caller-supplied binaryName, targetTag, and compareVersions, then constructs OciClient(config); repository selection is therefore configurable within the library even though the CLI currently passes its hard-coded GHCR_REPO.ghcrSource.resolveChain() gets an anonymous registry token, then concurrently fetches targetTag(targetVersion) and lists tags beginning with PATCH_TAG_PREFIX. It requires the target manifest to contain a layer whose org.opencontainers.image.title is ${binaryName}.gz; absence reports "malformed_chain" and returns null.resolveNightlyChain() filters and sorts patch tags using the supplied compareVersions; zero tags reports "no_patches", more than MAX_NIGHTLY_CHAIN_DEPTH reports "too_long", and chain manifests are fetched concurrently. Missing manifests report "network" when a fetch threw, otherwise "malformed_chain".ArrayBuffer to Uint8Array; returned patches preserve validation digest order, totalSize is the sum of downloaded byte lengths, and steps are built sequentially from currentVersion through each patch tagβs version.ghcrSource.resolveChain() catches BinpatchError, reports "network", and returns null, while rethrowing non-BinpatchError exceptions.