Dashboard › cli › Distillation
2d65a555-6eb2-4a09-88dc-8a4220b42223["lore_tm_v1_EIVAgYuBHuE9g0oYqYBDNV_amJ92Wl4Jx-X1M1GnCyA","lore_tm_v1_DtlLz7MLVDbAD1re_rGktXq4EbrjdBaYydx2quwrftM","lore_tm_v1_ckU1tFUbn900Gk63ufoIY36WhW-cd_6WHyPp59XBRs4"]
/home/byk/.local/share/opencode/tool-output/tool_08930f9e7001Fs5HRrYVdjULLE."fetches stable releases only from the explicitly selected legacy source" that records requested URLs and verifies stable-release requests remain confined to the explicitly selected legacy source."rejects GitHub release pagination outside the selected source" and "classifies malformed GitHub release pagination as a network error"."checks for update when never checked before"; it verifies that when getVersionCheckInfo().lastChecked is null, shouldCheckForUpdate returns true and initiates the background update check.https://api.github.com/repos/getsentry/toolkit return HTTP 200 before GHCR token and manifest checks./1.0.0/ under https://github.com/getsentry/cli/releases/download/ to /cli@1.0.0/ under https://github.com/getsentry/toolkit/releases/download/.vi.restoreAllMocks() to an afterEach cleanup that already calls abortPendingVersionCheck(), restores globalThis.fetch, and restores process.env.SENTRY_CLI_NO_UPDATE_CHECK.downloadNightlyBlob usages and found 4 matches: packages/cli/src/lib/upgrade.ts line 971; packages/cli/src/lib/ghcr.ts line 364 (downloadNightlyBlob declaration); and packages/cli/src/lib/ghcr.ts lines 548 and 554 (downloadLayerBlob declaration and call).packages/cli/src/lib/ghcr.ts to import valid as semverValid from semver and PRIMARY_UPGRADE_SOURCE, type UpgradeSource from ./binary.js.NIGHTLY_VERSION_REGEX = /^\d+\.\d+\.\d+-dev\.\d+$/, documenting that nightly versions use a numeric build timestamp as the prerelease value.fetchWithRetry(...) in packages/cli/src/lib/ghcr.ts so an externally initiated abort immediately throws lastError instead of breaking the retry loop and wrapping it in an UpgradeError; transient timeout/network failures still follow GHCR_MAX_RETRIES = 1.GHCR_REPO from the hardcoded "getsentry/cli" to PRIMARY_UPGRADE_SOURCE.ghcrRepo.GhcrManifestHttpError extends UpgradeError in packages/cli/src/lib/ghcr.ts; its constructor accepts (tag: string, status: number), uses code "network_error", sets message Failed to fetch manifest for tag "${tag}": HTTP ${status}, sets name = "GhcrManifestHttpError", and exposes readonly status.getAnonymousToken(...) to accept sourceOrSignal: UpgradeSource | AbortSignal = PRIMARY_UPGRADE_SOURCE plus optional signal; it distinguishes an UpgradeSource by the presence of "ghcrRepo", preserves the legacy signal-only call shape, and builds the token scope from source.ghcrRepo.fetchManifest(token, tag, signal?, source = PRIMARY_UPGRADE_SOURCE) to request https://ghcr.io/v2/${source.ghcrRepo}/manifests/${tag} and throw GhcrManifestHttpError(tag, response.status) for non-OK HTTP responses instead of a generic UpgradeError.fetchNightlyManifest(token, signal?, source = PRIMARY_UPGRADE_SOURCE) to forward both signal and source to fetchManifest(token, GHCR_TAG, signal, source).getNightlyVersion(manifest) validation: after requiring manifest.annotations?.version, it now rejects values when semverValid(version) === null or NIGHTLY_VERSION_REGEX.test(version) is false, throwing UpgradeError("network_error", "Nightly manifest has invalid version annotation").downloadNightlyBlob(token, digest, signal?, source = PRIMARY_UPGRADE_SOURCE) so its GHCR blob URL uses source.ghcrRepo rather than the global GHCR_REPO.fetchTagPage(token, lastTag?, signal?, source = PRIMARY_UPGRADE_SOURCE) so tag-list pagination requests use source.ghcrRepo.listTags(token, prefix?, signal?, source = PRIMARY_UPGRADE_SOURCE) to pass the selected source into fetchTagPage(token, lastTag, signal, source).downloadLayerBlob(token, digest, signal?, source = PRIMARY_UPGRADE_SOURCE) to forward the selected source through downloadNightlyBlob(token, digest, signal, source) before returning response.arrayBuffer().