Dashboard › cli › Distillation
57e6a819-1bc6-4c11-935e-e0aecde041e6["lore_tm_v1_PmtKRTdupLSXKZKskrzKZVToMkSiX5xQFF6feEottkw","lore_tm_v1_ipsQsJubrsT9lv9-TW2nCxWyb3REcnxWTGIgJIKjIh4"]
packages/cli/src/lib/version-check.ts now imports UpgradeSource from ./binary.js and uses fetchLatestFromGitHubWithSource / fetchLatestNightlyVersionWithSource from ./upgrade.js, allowing version discovery to retain the selected upgrade source.source into maybePrefetchPatches(channel, latestVersion, signal, source), so delta-patch prefetch uses the same source selected during stable or nightly discovery.checkForUpdateInBackgroundImpl() never throws; errors are caught and reported to Sentry. A failure while evaluating shouldCheckForUpdate() is captured with Sentry.captureException(error) and does not crash the CLI.upgrade, --version, -V, --json, token, and init; init is explicitly suppressed because its interactive wizard has its own terminal UI and should not receive unrelated banners mid-flow.cleanupPatchCache() failures are caught and logged with logger.debug("Patch cache cleanup failed (best-effort)", error)."checks for update when never checked before" requires getVersionCheckInfo().lastChecked to initially be null; with no prior lastChecked, shouldCheckForUpdate() returns true and initiates the background check.source and its already-fetched Response, so the caller never repeats the successful probe request.0.45.0 with response { tag_name: "cli@0.45.0" } to resolve as { source: UPGRADE_SOURCES[0], response: expect.any(Response) }."UpgradeSourceNotFoundError".getGitHubReleaseByTagUrl() builds the GitHub API URL for one source-specific release tag, while getGitHubLatestReleaseUrl() accepts an UpgradeSource defaulting to PRIMARY_UPGRADE_SOURCE.[{ tag_name: "cli@1.0.0" }] and [{ tag_name: "cli@99.0.0" }], replacing legacy single-object responses such as { tag_name: "v99.0.0" }."check mode with version shows versioned command" test returns { tag_name: "cli@2.0.0" } for URLs containing /releases/tags/cli%402.0.0; other release discovery requests return [{ tag_name: "cli@99.0.0" }]."check mode shows already on target when versions match" is now "check mode compares the current version with a stable target" and uses Toolkit release data [{ tag_name: "cli@1.0.0" }]."throws UpgradeError when specified version does not exist" test now returns HTTP 404 for every fetch and tracks callCount, removing the former initial latest-version response followed by a second 404.