Dashboard › cli › Distillation
6442e76e-c175-48f2-ab61-33cc0b5bdae4["lore_tm_v1_DievjkWvM8hW0p_dfo5yTU02HR65-mJm7q62afrrkz4","lore_tm_v1_-3nMBEhROXNhNWPMHv7eP3_WIdDFz8Iv_P0-_SFkV04","lore_tm_v1_7Tt-8F1xW235JzhDEdHu1BDauFDGO3nzCpCnB13KUKc","lore_tm_v1_eDwYjuw6hng3H4Jn58MGU6BUMr7enp6149RT_Sdlq7w","lore_tm_v1__D-PJMQsh9Be4-dOWyPBmZSBNDpfWX2N-GDo9d3KLAo","lore_tm_v1_QD4f4Y8o4m6FTDViC2j_83OVKDQrGCh5LvaP6m1srOY","lore_tm_v1_1ymKxmIIcA1LURFsM_dmtEkAzFGYuNq8ocrozcK8YEA","lore_tm_v1_Fr85D4KzDALpgeAUEcBgyaxfuohYsDFg92-uA9BX7HM","lore_tm_v1_wStcgLhVcCv9hAivvRGqKF_oPXHx8474TYJWKX_Knbo","lore_tm_v1_m_mOBY5fs4rXqBG-2zXhNk4RSeDzViIxUYJ_6hJoQCA"]
packages/cli/test/lib/binary.test.ts defines UPGRADE_SOURCES in priority order: 1. { githubRepo: "getsentry/toolkit", ghcrRepo: "getsentry/toolkit", tagPrefix: "cli@" }; 2. { githubRepo: "getsentry/cli", ghcrRepo: "getsentry/cli", tagPrefix: "" }.resolveUpgradeSource() queries https://api.github.com/repos/getsentry/toolkit/releases/latest first and falls back to https://api.github.com/repos/getsentry/cli/releases/latest only when the first response is HTTP 404. HTTP 401, 403, 429, or 500 and network errors are propagated without fallback; if every source returns 404, it throws "No CLI upgrade source was found".getBinaryDownloadUrl(version) tests expect a URL under https://github.com/getsentry/cli/releases/download/, containing the requested version and sentry-, using arm64 only when process.arch === "arm64" and otherwise x64; .exe is appended only on Windows.getBinaryPaths("/usr/local/bin/sentry") derives installPath="/usr/local/bin/sentry", tempPath="/usr/local/bin/sentry.download", oldPath="/usr/local/bin/sentry.old", and lockPath="/usr/local/bin/sentry.lock".samePath() treats path case as insensitive on win32 and darwin, but case-sensitive on other platforms.packages/cli/src/lib/release-notes.ts:429-453 implements buildChangelogSummary(): release tags are normalized with r.tag_name.replace(VERSION_PREFIX_RE, ""); releases are included when their normalized version is greater than exclusive fromVersion and less than or equal to inclusive toVersion; no in-range releases returns null; otherwise sections are merged by category and passed to buildSummaryFromSections().packages/cli/test/lib/delta-upgrade.test.ts:819-853 tests fetchRecentReleases(): it requests the getsentry/cli GitHub releases API with a per_page query, returns parsed releases on HTTP success, and returns [] for HTTP 500 or a network exception.downloadStablePatch(url) returns downloaded bytes as Uint8Array on success and returns null for HTTP 404 or network failure.resolveStableChain("0.13.0", "0.14.0") is tested to produce one patch, the target binaryβs SHA-256 digest, and steps [{ fromVersion: "0.13.0", toVersion: "0.14.0" }].resolveStableChain("0.13.0", "0.15.0") downloads a two-hop chain in parallel but returns patches in oldest-first application order, with steps ordered 0.13.0 β 0.14.0 then 0.14.0 β 0.15.0.resolveStableChain() tests expect null when the target is absent from fetched releases, the releases API fails, a patch download fails, or chain depth exceeds MAX_STABLE_CHAIN_DEPTH = 10; the depth test uses 15 releases/14 hops.packages/cli/src/lib/binary.ts with plain Node failed because ESM resolution could not find packages/cli/src/lib/constants.js; the error was ERR_MODULE_NOT_FOUND under Node.js v24.16.0.tsx --env-file-if-exists=.env.local --import ./script/require-shim.mjs command showed that compareVersions() passes prefixed release tags directly to semver parsing: "cli@0.45.0" versus "0.44.0" and "0.45.0", and "cli@1.0.0" versus "mcp@2.0.0", all throw TypeError with "Invalid Version: cli@...". .env.local was absent and execution continued.versionToTag(version, this.githubConfig.tagPrefix); tagPrefix is configurable, defaults to "", and Toolkit CLI releases can therefore use tags such as cli@0.45.0.isLatest to false for preview versions before otherwise calling isLatestRelease(latestRelease, version).isLatestRelease() parses both githubRelease.tag_name and the version being published, returns whether the new version is greater than or equal to the previous latest when both parse successfully, and defaults to true when parsing fails or no latest release exists.createRelease HTTP 422 by finding matching drafts through listReleases({ per_page: 100 }), deleting leftover drafts, and retrying; cleanup refuses to delete a non-draft release and re-fetches release state to avoid deleting a release that was published despite an earlier error.getReleaseByTag(tag) and skipped rather than recreated; floating-tag updates are still attempted. Floating-tag failures after publication are best-effort warnings and must not mark the target failed.GITHUB_RELEASES_URL remains shared across upgrade paths: packages/cli/src/lib/binary.ts:250 exports it; packages/cli/src/lib/upgrade.ts uses it for /latest and /tags/${version}; packages/cli/src/lib/release-notes.ts uses it with ?per_page=${CHANGELOG_MAX_RELEASES}; and packages/cli/src/lib/delta-upgrade.ts uses it as releasesUrl and directly requests ?per_page=12.getBinaryDownloadUrl(version) from packages/cli/src/lib/upgrade.ts:766; the function is defined at packages/cli/src/lib/binary.ts:234.