Dashboard › cli › Distillation
d6fed323-1a1a-4868-886d-c73f1653b205["lore_tm_v1_rnJLBQ8bPPGeauxIhZxzU75Yx_hoDEuQtUSeat0camY","lore_tm_v1_aipOG4spSHLdlgN_2jZ7r67OlnU1qNGqpmnZzbn5HRo"]
packages/cli/src/lib/binary.ts adding UpgradeSource = { readonly githubRepo: string; readonly ghcrRepo: string; readonly tagPrefix: string } and the shared ordered UPGRADE_SOURCES: 1. { githubRepo: "getsentry/toolkit", ghcrRepo: "getsentry/toolkit", tagPrefix: "cli@" }; 2. { githubRepo: "getsentry/cli", ghcrRepo: "getsentry/cli", tagPrefix: "" }. PRIMARY_UPGRADE_SOURCE = UPGRADE_SOURCES[0].getsentry/toolkit / ghcr.io/getsentry/toolkit; 2. getsentry/cli / ghcr.io/getsentry/cli.401, 403, 429, and 500, TLS failures, other network/fetch failures, and cancellation abort immediately rather than falling through; network and fetch failures are transient and never poison a source.getBinaryDownloadUrl(version, source = PRIMARY_UPGRADE_SOURCE) changed in packages/cli/src/lib/binary.ts to construct https://github.com/${source.githubRepo}/releases/download/${source.tagPrefix}${version}/${getPlatformBinaryName()}. The default URL therefore moved from getsentry/cli/.../1.0.0/ to getsentry/toolkit/.../cli@1.0.0/.packages/cli/src/lib/binary.ts: getGitHubReleasesUrl(source = PRIMARY_UPGRADE_SOURCE), getGitHubReleaseByTagUrl(version, source = PRIMARY_UPGRADE_SOURCE) with encodeURIComponent(tag), getGitHubLatestReleaseUrl(source = PRIMARY_UPGRADE_SOURCE) using ?per_page=100 for prefixed sources and /latest otherwise, and getGitHubRepositoryUrl(source = PRIMARY_UPGRADE_SOURCE). GITHUB_RELEASES_URL now equals getGitHubReleasesUrl().ResolvedUpgradeSource = { readonly source: UpgradeSource; readonly response: Response } and ResolveUpgradeSourceOptions = { readonly getProbeUrl: (source: UpgradeSource) => string; readonly fetch?: typeof fetch; readonly signal?: AbortSignal } added to packages/cli/src/lib/binary.ts.resolveUpgradeSource(options) in packages/cli/src/lib/binary.ts: it uses options.fetch ?? customFetch, probes UPGRADE_SOURCES in order with getGitHubHeaders() and the shared options.signal, returns { source, response } on success, advances only for status 404, rethrows AbortError, maps TLS certificate errors through buildTlsErrorDetail(error), maps other fetch errors to UpgradeError("network_error", "Failed to connect to GitHub: ..."), maps non-404 HTTP failures to UpgradeError("network_error", "Failed to fetch from GitHub: HTTP ..."), and after all 404s throws UpgradeError("network_error", "No CLI upgrade source was found: every source returned HTTP 404").packages/cli/src/lib/binary.ts changed from Bun.semver.order to semver.compare; it handles stable versions X.Y.Z and nightly versions X.Y.Z-dev.<unix-seconds>, comparing numeric prerelease identifiers numerically per SemVer.packages/cli/test/lib/binary.test.ts for UPGRADE_SOURCES ordering and resolveUpgradeSource: first-source success makes only the Toolkit request; Toolkit 404 falls back to legacy CLI; statuses 401, 403, 429, and 500 do not fall back; TypeError("fetch failed") does not fall back and yields Failed to connect to GitHub: fetch failed; all-source 404 yields No CLI upgrade source was found.https://api.github.com/repos/getsentry/toolkit/releases/tags/cli%400.45.0, followed only after a 404 by legacy https://api.github.com/repos/getsentry/cli/releases/tags/0.45.0.getsentry/cli#1244, titled toolkit merge: bridge CLI release + dual-source upgrade compatibility, authored by BYK, created July 15, 2026 and updated September 8, 2026. It is a sub-task of getsentry/cli#1248 and a hard prerequisite for the repository merge.install script, with a check: script that fails if the two source lists or their ordering diverge.UPGRADE_SOURCES must be integrated across src/lib/binary.ts, ghcr.ts, upgrade.ts, and delta-upgrade.ts, with the same ordered fallback mirrored in the install script.getsentry/cli; during the compatibility window, every migrated stable CLI release and nightly must therefore be dual-published to Toolkit and legacy CLI endpoints.sha256-<binary> / from-version) plus cleanup/keep-count parity across both GHCR packages.getsentry/sentry-mcp: cut the next stable release from getsentry/cli with the dual-source resolver, use the release systemβs computed version rather than manually pinning one, verify a pre-bridge binary upgrades through getsentry/cli, verify the bridge binary handles a nonexistent Toolkit source returning 404 and upgrades through legacy CLI, verify identical install-script behavior, and record the bridge version in issue #1244 before beginning getsentry/cli#1239.getsentry/cli; 3. verify bridge and Toolkit-built binaries upgrade through getsentry/toolkit; 4. simulate a Toolkit 404 and verify both new binaries fall back to getsentry/cli; 5. compare release assets, SHA-256 values, GHCR manifests, and delta-chain metadata for exact parity; 6. run the same matrix for the install script and one nightly.getsentry/cli must remain writable until telemetry and release evidence show the legacy endpoint is no longer required, and it may be archived only after that compatibility window ends.