Dashboard › cli › Distillation
e1cdafbe-b8e8-4895-8358-52a8be3d7b5e["lore_tm_v1_VegOF6Vl-k0xvxG0fOHw4M5u4AUfcyfwrpoN97Ecm_s","lore_tm_v1_jv2Y08QCrRqotAw5f1DiyHhrUKsfb-xh9YKhv2cXoA8","lore_tm_v1_5adP5hVo5CQa9c8zkmNtMt6mygi38hxzz-kvJk5JzEU"]
packages/cli/src/lib/delta-upgrade.ts added semverPrerelease/semverValid, replaced GITHUB_RELEASES_URL with getGitHubReleasesUrl, and added PRIMARY_UPGRADE_SOURCE plus UpgradeSource to support source-specific delta discovery.packages/cli/src/lib/delta-upgrade.ts added the private symbol NORMALIZED_RELEASE_SOURCE and logic described as filtering and normalizing raw stable GitHub releases for one upgrade source.nightlySource() in packages/cli/src/lib/delta-upgrade.ts now requires source: UpgradeSource and configures ghcrSource() with repo: source.ghcrRepo; it retains registry https://ghcr.io, target tags formatted as nightly-${version}, getPlatformBinaryName(), compareVersions, user agent sentry-cli/${CLI_VERSION}, customFetch, and instrument.packages/cli/src/lib/delta-upgrade.ts added isGitHubRelease(value) runtime validation requiring a non-null object with string tag_name and array assets; optional draft and prerelease fields are represented in the type guard.downloadStablePatch(url, signal?) in packages/cli/src/lib/delta-upgrade.ts uses customFetch with User-Agent: sentry-cli/${CLI_VERSION} and the supplied AbortSignal, returns response bytes only for an OK response, and catches every thrown error—including cancellation—logging Failed to download stable patch before returning null.validateChainStep() in packages/cli/src/lib/delta-upgrade.ts first compares getPatchFromVersion(manifest) with opts.expectedFrom, returning version-mismatch with exact expected/actual values on mismatch. If binpatchValidateChainStep() fails, it maps presence of the named patch layer to size-exceeded with layerSize and budget, otherwise to missing-layer with layerName.packages/cli/src/lib/delta-upgrade.ts uses Promise.all(chainTags.map(tag => client.fetchManifest(opts.token, tag, opts.signal))); any thrown error is silently caught and converted to null.resolveDelta() in packages/cli/src/lib/delta-upgrade.ts preserves its public call shape, passes CLI_VERSION, target version, old/destination paths, patch cache, offline mode, progress handler, and telemetry to resolveAndApply(), then returns both the result and tel._source.current.isNightlyVersion(targetVersion), yielding "nightly" for nightly versions and "stable" otherwise.packages/cli/src/lib/errors.ts added UpgradeTransportError extends UpgradeError; its constructor calls super("network_error", message) and sets this.name = "UpgradeTransportError", distinguishing transport failures from HTTP or metadata failures while retaining the upgrade network-error exit behavior.packages/cli/src/lib/ghcr.ts added semverValid, parseUpgradeJson, PRIMARY_UPGRADE_SOURCE, UpgradeSource, and UpgradeTransportError; default GHCR_REPO is now derived from PRIMARY_UPGRADE_SOURCE.ghcrRepo instead of the literal "getsentry/cli".10_000 ms.fetchManifest(token, tag, signal?, source = PRIMARY_UPGRADE_SOURCE) in packages/cli/src/lib/ghcr.ts now constructs the manifest URL from source.ghcrRepo and sends Authorization: Bearer ${token}, Accept: OCI_MANIFEST_TYPE, and User-Agent: getUserAgent().fetchNightlyManifest(token, signal?, source = PRIMARY_UPGRADE_SOURCE) now propagates both cancellation and source affinity by calling fetchManifest(token, GHCR_TAG, signal, source).downloadNightlyBlob(token, digest, signal?, source = PRIMARY_UPGRADE_SOURCE) now constructs its GHCR blob URL from source.ghcrRepo. It accepts direct HTTP 200 responses or manually follows 301/302/307/308 redirects without forwarding GHCR authorization; failed redirected downloads raise UpgradeError("network_error", "Blob storage download failed: HTTP …"), and other initial statuses raise UpgradeError("network_error", "Unexpected GHCR blob response: HTTP …").nextTag = tags.at(-1) and fails closed if the cursor is absent or already in visitedCursors, throwing UpgradeError("network_error", "GHCR tag pagination returned a repeated cursor"); otherwise it records the cursor and continues with lastTag = nextTag.