Dashboard › cli › Distillation
45cfd88b-7854-44a9-9720-e304c3b6c12e["lore_tm_v1_uPHvZLaArFFfx8m3LDb_7eC8-woEokkEmaTIzYISlKY","lore_tm_v1_XNXcAPGRLSWj7Js_kxUobvZNMQg8j5o11MMqtE7gUuk","lore_tm_v1_JPxTppvWVf8RBS4qViKKZ3f9JqXFgzzSbdlasHRb36g"]
packages/cli/test/commands/cli/upgrade.test.ts updated GHCR nightly mocks to recognize the Toolkit repository probe https://api.github.com/repos/getsentry/toolkit with HTTP 200 before handling token exchange and /manifests/nightly.packages/cli/test/commands/cli/upgrade.test.ts now serve [{ tag_name: \cli@${version}` }]for URLs containinggetsentry/toolkit/releases?per_page=100, replacing the legacy releases/latestresponse{ tag_name: version }`.mockBinaryDownloadWithVersion(version) in packages/cli/test/commands/cli/upgrade.test.ts now models Toolkit release tags as cli@${version} while continuing to return a minimal gzipped ELF payload (0x7f, 0x45, 0x4c, 0x46) for binary downloads.packages/cli/test/commands/cli/upgrade.test.ts were adapted to the Toolkit/GHCR source-probing flow while retaining GHCR token, manifest, blob, and redirect mocks.packages/cli/test/lib/binary.test.ts now imports and tests getGitHubReleaseByTagUrl, resolveUpgradeSource, UPGRADE_SOURCES, and UpgradeSourceNotFoundError from packages/cli/src/lib/binary.js.getBinaryDownloadUrl("1.0.0") is now expected to produce a Toolkit release URL beginning https://github.com/getsentry/toolkit/releases/download/, containing /cli@1.0.0/, the sentry- binary prefix, and platform architecture arm64 or x64.UPGRADE_SOURCES priority is tested as exactly: 1. { githubRepo: "getsentry/toolkit", ghcrRepo: "getsentry/toolkit", tagPrefix: "cli@" }; 2. { githubRepo: "getsentry/cli", ghcrRepo: "getsentry/cli", tagPrefix: "" }.resolveUpgradeSource source-selection tests verify that an existing Toolkit release is selected immediately via https://api.github.com/repos/getsentry/toolkit/releases/tags/cli%400.45.0, returning { source: UPGRADE_SOURCES[0], response } without probing the legacy repository.resolveUpgradeSource fallback tests verify fallback from Toolkit to legacy CLI occurs only after HTTP 404, probing in order: https://api.github.com/repos/getsentry/toolkit/releases/tags/cli%400.45.0, then https://api.github.com/repos/getsentry/cli/releases/tags/0.45.0.resolveUpgradeSource tests verify HTTP statuses 401, 403, 429, and 500 from the first source are propagated as HTTP ${status} errors and do not trigger legacy-source fallback.resolveUpgradeSource tests verify a network TypeError("fetch failed") becomes Failed to connect to GitHub: fetch failed and does not trigger legacy-source fallback.resolveUpgradeSource tests verify that HTTP 404 from every configured source throws an error with class and name UpgradeSourceNotFoundError after probing both Toolkit and legacy CLI release-tag URLs.~/.local/bin and ~/bin are valid current installation targets and must never be treated as migration sources; getLegacyInstallDirs("/home/user") should return only the pre-XDG ~/.sentry/bin.packages/cli/test/lib/delta-upgrade.mocked.test.ts stable-delta fixtures now model Toolkit releases: patch URL https://github.com/getsentry/toolkit/releases/download/cli@0.14.0/${BINARY_NAME}.patch and release tags cli@0.14.0 and cli@0.13.0, replacing legacy unprefixed CLI release tags.resolveStableDelta chain still represents one hop from 0.13.0 to 0.14.0; its deliberately empty TRDIFF10 patch passes chain resolution and download but produces empty output, causing the expected SHA-256 mismatch.attemptDeltaUpgrade error-handling tests now use Toolkit-prefixed tags cli@0.14.0 and cli@0.13.0; malformed patch bytes [0, 1, 2, 3] remain expected to be caught with a null result.54d0dcd74478bc154b5b24393fdc6129518271baa36f446384d60e84021bb724, patchBytes: 89, and chainLength: 1; the patched output must exactly equal packages/cli/test/fixtures/patches/small-new.bin.