Dashboard › cli › Distillation
c9cb7618-5dd7-45c6-928b-90a1adccaca9["lore_tm_v1_u6ZwxMA1qVjoQ9UGa0dEpmv9YmUpGIqi4ZuVnIEvF24","lore_tm_v1_BvgIN3LIjlaqGnulhx0NppTwwBG_8cN27TYaWyKzHdc","lore_tm_v1_018sKv3CCMeys5F5nPlGS1y1Pp3YM3kjbluq_NyAiQA","lore_tm_v1_smeUmAfjiIP3fdSyEiU39Pm4hsglapG2CS1BF0AcYY4","lore_tm_v1_QHtma9K7iqqzlz6Au---ivz4N2or407VlWfGwAeBPKc","lore_tm_v1_CzmKyr8yIEqmMZcJTaZpz8gp_WyT8FVC5IdISfm1LCY","lore_tm_v1_KDUaC1JIyj6epruAPLotkz4tyv_dnIleGR5GdUMJeBM","lore_tm_v1_c9VUcFdccQG_4hLqSK0c3r6qoAZNZQZD1jA7mRKM1Bk","lore_tm_v1_0lA1T9AsaafJoux8lBw3yda1diNMOJs1B0ql6GuHZS0"]
packages/cli changes 4 files with 232 insertions and 5 deletions: packages/cli/src/lib/binary.ts (88 lines changed), packages/cli/test/lib/binary.test.ts (109 lines), packages/cli/test/lib/ghcr.test.ts (30 lines), and packages/cli/test/lib/install-script.test.ts (10 lines).packages/cli/src/lib/binary.ts adds exported UpgradeSource with readonly githubRepo, ghcrRepo, and tagPrefix fields.UPGRADE_SOURCES must always check this exact ordered source list: 1. GitHub/GHCR getsentry/toolkit with stable tag prefix cli@; 2. legacy GitHub/GHCR getsentry/cli with an empty tag prefix.packages/cli/src/lib/binary.ts defines PRIMARY_UPGRADE_SOURCE = UPGRADE_SOURCES[0]; getBinaryDownloadUrl(version, source) now defaults to it and constructs https://github.com/${source.githubRepo}/releases/download/${source.tagPrefix}${version}/${getPlatformBinaryName()}.packages/cli/src/lib/binary.ts adds getGitHubReleasesUrl(source) returning https://api.github.com/repos/${source.githubRepo}/releases; GITHUB_RELEASES_URL now derives from getGitHubReleasesUrl().packages/cli/src/lib/binary.ts adds ResolvedUpgradeSource, containing the selected UpgradeSource and successful probe Response.resolveUpgradeSource() must give the caller its successful probe response so the caller βnever repeats the request.βresolveUpgradeSource(fetchFn = customFetch, signal?) probes each UPGRADE_SOURCES entry at ${getGitHubReleasesUrl(source)}/latest with getGitHubHeaders() and the optional AbortSignal; it returns the first successful { source, response }.resolveUpgradeSource() advances only after HTTP 404, throws UpgradeError("network_error", "Failed to fetch from GitHub: HTTP ${response.status}") for other unsuccessful HTTP statuses, and throws UpgradeError("network_error", "No CLI upgrade source was found: every source returned HTTP 404") after all sources return 404.packages/cli/test/lib/binary.test.ts verify: 1. exact Toolkit-before-legacy UPGRADE_SOURCES ordering, 2. first-source success performs only the Toolkit request, 3. Toolkit 404 falls back to legacy CLI, 4. HTTP 401/403/429/500 never falls back, 5. a network failure never falls back, and 6. all-source 404 probes both sources then fails.packages/cli/test/lib/ghcr.test.ts adds source-specific expectations: getAnonymousToken(UPGRADE_SOURCES[0]) must request scope=repository:getsentry/toolkit:pull and resolve to "toolkit-token"; fetchNightlyManifest("token", undefined, UPGRADE_SOURCES[0]) must request /v2/getsentry/toolkit/manifests/nightly.packages/cli/test/lib/install-script.test.ts now parses a shell declaration matching ^UPGRADE_SOURCES=\(([^)]*)\)$ and requires its whitespace-separated repositories to equal UPGRADE_SOURCES.map((source) => source.githubRepo) in the same order.getsentry/cli#1244, titled βtoolkit merge: bridge CLI release + dual-source upgrade compatibility,β is OPEN and is a sub-task of master tracking issue getsentry/cli#1248; BYK linked the master issue in comment IC_kwDOQm6jAs8AAAABKMLjRg.getsentry/cli#1244 requires shipping one stable bridge CLI release from getsentry/cli before importing any CLI history into getsentry/sentry-mcp; this is a hard prerequisite for the repository merge.getsentry/toolkit / ghcr.io/getsentry/toolkit; 2. getsentry/cli / ghcr.io/getsentry/cli.getsentry/cli, every migrated stable CLI release and nightly must be dual-published to Toolkit and legacy CLI endpoints throughout the compatibility window.getsentry/cli#1244 implementation checklist: 1. add UPGRADE_SOURCES across src/lib/binary.ts, ghcr.ts, upgrade.ts, and delta-upgrade.ts; 2. mirror ordered fallback in the install script; 3. add a check: script proving the install script and TypeScript resolver use one ordered source list; 4. preserve delta chains (sha256-<binary> / from-version) and cleanup/keep-count parity across both GHCR packages; 5. configure Toolkitβs post-migration release flow to dual-publish stable releases and nightlies to both repositories and keep getsentry/cli writable until compatibility ends.getsentry/cli using the release-system-computed version rather than manually pinning a target; 2. verify a pre-bridge binary upgrades to the bridge through getsentry/cli; 3. verify the bridge handles a not-yet-existing Toolkit 404 and upgrades through getsentry/cli; 4. verify the install script behaves identically; 5. record the bridge version in issue #1244, and only then begin getsentry/cli#1239.getsentry/cli; 3. verify the bridge and a Toolkit-built binary upgrade via getsentry/toolkit; 4. simulate 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 and require exact parity; 6. run the same matrix for the install script and one nightly.getsentry/cli may be archived only after telemetry and release evidence show the legacy endpoint is no longer needed, and it must remain writable until then./home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade found 40 upgrade-related references across packages/cli/src/lib/version-check.ts, packages/cli/src/lib/upgrade.ts, packages/cli/src/lib/release-notes.ts, packages/cli/src/commands/cli/upgrade.ts, packages/cli/src/lib/binary.ts, and packages/cli/src/lib/delta-upgrade.ts.packages/cli/src/lib/version-check.ts calls prefetchNightlyPatches, prefetchStablePatches, fetchLatestNightlyVersion, and fetchLatestFromGitHub; source selection therefore needs to propagate through version checking and patch prefetching.packages/cli/src/lib/upgrade.ts still references GITHUB_RELEASES_URL for latest-release and tag lookups, uses getBinaryDownloadUrl(version) for stable downloads, and calls attemptDeltaUpgrade, downloadNightlyToPath, and downloadStableToPath; these are remaining source-propagation points.packages/cli/src/lib/delta-upgrade.ts still references GITHUB_RELEASES_URL for release metadata and GHCR_REPO for nightly/delta OCI operations; these are remaining source-propagation points.packages/cli/src/lib/release-notes.ts imports GITHUB_RELEASES_URL; fetchReleasesForChangelog() requests ${GITHUB_RELEASES_URL}?per_page=30, while nightly changelogs still hard-code https://api.github.com/repos/getsentry/cli/commits?sha=main&since=${sinceDate}&until=${untilDate}&per_page=100.packages/cli/src/lib/release-notes.ts uses CHANGELOG_MAX_RELEASES = 30, compared with the delta-upgrade cap of 12; stable changelog fetching accepts optional prefetched releases to avoid a duplicate API request and returns an empty array/null on request, status, JSON, or shape failures.fetchNightlyChangelog() derives timestamps from nightly versions, adds 1 second to both boundaries because GitHub since is inclusive and until is exclusive, fetches up to 100 commits, and returns null for invalid versions or failed/empty responses.fetchChangelog(opts) is best-effort, dispatches between "stable" and "nightly", awaits the selected path, logs errors, and returns null on failure; its documented intent is to run in parallel with binary download with zero added latency.GITHUB_RELEASES_URL in binary.ts, delta-upgrade.ts, release-notes.ts, and upgrade.ts; GHCR_REPO = "getsentry/cli" and URL construction in ghcr.ts; legacy release links in formatters/human.ts; and the nightly commits URL in release-notes.ts.packages/cli/src/lib/ghcr.ts still defines GHCR_REPO = "getsentry/cli" and uses it for anonymous token scope, manifests, blobs, and paginated tag listing; comments likewise identify ghcr.io/getsentry/cli as the sole package.packages/cli/src/lib/formatters/human.ts still emits changelog continuation links to https://github.com/getsentry/cli/releases at lines 2287, 2305, and 2306..craft.yml stores project release configuration and can explicitly set github.owner and github.repo.preReleaseCommand is bash scripts/bump-version.sh; it receives CRAFT_OLD_VERSION and CRAFT_NEW_VERSION, must replace versions without committing or changing git state, and also receives old/new versions as trailing arguments for backward compatibility.minVersion: "2.21.0" or newer when no custom preReleaseCommand exists; targets are processed in configured order and each target type is processed only once.npm version --no-git-tag-version with workspace support; 2. PyPI via Hatch, Poetry, setuptools-scm, or direct edit; 3. crates via cargo set-version; 4. gems via direct .gemspec and lib/**/version.rb edits; 5. pub-dev via direct pubspec.yaml edit; 6. Hex via direct mix.exs edit; 7. NuGet via dotnet-setversion or direct XML edit.npm version --workspaces for npm 7+, otherwise bumps each non-private package individually for yarn, pnpm, or npm older than 7; workspace detection uses root package.json workspaces or pnpm-workspace.yaml, and private packages are skipped.[tool.hatch] exists; 2. Poetry when [tool.poetry] exists; 3. no-op for setuptools-scm when [tool.setuptools_scm] exists; 4. direct edit when [project] has a version.preReleaseCommand: '' or replaced by a custom command; on failures it reports missing tools or command errors, warns when no target supports bumping, and suggests a custom preReleaseCommand.git branch -D release/<version>; 2. revert modified version files with git checkout -- package.json pyproject.toml Cargo.toml; 3. rerun craft prepare, which is idempotent for the same version. craft prepare --dry-run previews changes.postReleaseCommand is bash scripts/post-release.sh; default release branch prefix is release, while a monorepo CLI can pair releaseBranchPrefix: release/cli with GitHub tagPrefix: "cli@" to produce branches such as release/cli/1.2.3 and tags such as cli@1.2.3.auto, manual, and calver; CalVer accepts a format such as '%y.%-m' and an offset such as 14 days..github/release.yml; Craft extends GitHubβs format with commit_patterns and semver, and custom categories without semver do not contribute to suggested version bumps.major); 2. Security π (patch); 3. New Features β¨ (minor); 4. Bug Fixes π plus Revert " (patch); 5. Documentation π (patch); 6. Internal Changes π§ covering build/refactor/meta/chore/ci/ref/perf/test/style (patch).### Changelog Entry overrides: multiple top-level bullets become separate entries, nested bullets remain nested without separate attribution, plain multi-line text becomes one joined entry, and other PR sections are ignored.true; scope headings appear only when a scope has more than one entry, and entries without scopes are placed at the bottom of the category.type and scope regex captures; non-capturing custom patterns disable stripping.#skip-changelog, the skip-changelog label, or configured excluded labels/authors./regex/ artifact patterns as a single pattern, a list, or workflow-scoped mappings; absent artifacts configuration, it retains legacy exact commit-SHA artifact lookup.