Dashboard › cli › Distillation
1822990f-3073-4692-b7fd-ccb0010a9333["lore_tm_v1_0PXcOs-m8VKCTFn717q2Cv_3wiLDIkmxxiy7DvG1B5g"]
packages/cli/test/lib/upgrade.test.ts, including source-aware stable and nightly upgrade coverage.UPGRADE_SOURCES to imports from ../../src/lib/binary.js in packages/cli/test/lib/upgrade.test.ts.resolveExistingUpgradeVersion to the dynamically imported functions from ../../src/lib/upgrade.js.fetchLatestFromGitHub() fixture to use the Toolkit-prefixed release tag { tag_name: "cli@1.2.3" } and assert that the resolved version is "1.2.3".fetchLatestFromGitHub(), including a GitHub Link header pointing to https://api.github.com/repositories/1114546946/releases?per_page=100&page=2.fetchLatestFromGitHub() failure assertion for unsafe or invalid pagination links with the exact error message "GitHub returned an invalid release pagination URL".{ tag_name: "mcp@9.0.0" } are not treated as CLI releases.resolveExistingUpgradeVersion("1.0.0") tests covering Toolkit release resolution, fallback behavior, request ordering, and structured rejection matching including error annotations."falls back to an unprefixed legacy tag on Toolkit HTTP 404", requiring version resolution to retry against the legacy release source when the Toolkit lookup returns HTTP 404.fetchLatestFromGitHub() to reject with UpgradeError and the exact message "Failed to connect to GitHub: fetch failed".versionExists("curl", "1.0.0") network-failure coverage requiring an UpgradeError containing "Failed to connect to GitHub".getsentry/cli when fallback is not appropriate.{ token: "tok" }.scope=repository:getsentry/cli:pull."does not fall back from a non-404 Toolkit nightly failure", using an HTTP 403 "Forbidden" response to verify that only HTTP 404 triggers legacy fallback.https://api.github.com/repos/getsentry/toolkit.fetchLatestNightlyVersion() returns "0.0.0-dev.1740000000" with exactly 2 calls, documented as token + manifest.