Dashboard › cli › Distillation
f465103e-4ef0-4434-911e-7c428f0ab372["lore_tm_v1_8i6Z5cVDrOdooYjUoRBmVxJUIEPRdM0wtsJfjj-v9XQ","lore_tm_v1_G9w_AxpFvgwyCgXsBGHn5bqic_biXiUQ_yL_TCOOCiA","lore_tm_v1_3F2XrHq6FJs6a4sVccqLJufPV1BSSbr-0i8hSMSiVL4","lore_tm_v1_jjSJARPtz_L9AoSjO6L9uWjOGWLyaRM3dMhwH8slCcE","lore_tm_v1_Re_dti9GW6G_00PXQCs7rvQIm_bPby7nPQGZ--_U2Rk","lore_tm_v1_Io5b9a1vmUe6WhCfKgN7JyYLTJA0i0A2OlqRf1JiRRU","lore_tm_v1_sJ7ngAe56QjoC46RAdpCy1sI66AME7GtjXUgXl3VEaE"]
.github/workflows/ci.yml adds pnpm run check:upgrade-sources to the lint/check job after pnpm run check:stale-refs.package.json adds "check:upgrade-sources": "pnpm --filter sentry run check:upgrade-sources".packages/cli/package.json adds "check:upgrade-sources": "vitest run test/lib/install-script.test.ts -t 'embeds the shared ordered upgrade source list'", providing a CI-enforced check that the installer embeds the shared ordered upgrade-source list.packages/cli/install now declares UPGRADE_SOURCES=('getsentry/toolkit|getsentry/toolkit|cli@' 'getsentry/cli|getsentry/cli|'), with marker comment UPGRADE_SOURCES_SYNC: keep these github|ghcr|tag-prefix entries in sync with src/lib/binary.ts.getsentry/toolkit / ghcr.io/getsentry/toolkit; 2. getsentry/cli / ghcr.io/getsentry/cli.404; network and fetch failures remain transient errors and never poison a source.getsentry/cli, so every migrated stable CLI release and nightly must be dual-published to Toolkit and the legacy CLI endpoints during the compatibility window.die() in packages/cli/install no longer executes wait 2>/dev/null || true before exit 1, so installer failure does not wait for the background telemetry curl.packages/cli/install adds parsing helpers source_tag_prefix(), source_github_repo(), and source_ghcr_repo(), extracting fields 3, 1, and 2 respectively from github|ghcr|tag-prefix records via cut -d'|'.version="${requested_version#v}", selected_source="", and selected_tag_prefix="", calls select_stable_source, builds tag="${selected_tag_prefix}${version}", and downloads from https://github.com/${selected_source}/releases/download/${tag}/${filename} rather than hard-coding getsentry/cli.select_nightly_source, extracts the version and platform digest from the selected manifest, and requests the blob from https://ghcr.io/v2/${selected_ghcr_source}/blobs/${digest} rather than hard-coding getsentry/cli.404, whereas GHCR token failures may return 401 or 403 for both missing and inaccessible packages.$tmp_binary, $github_response, and $nightly_manifest_file; $github_response is explicitly removed before disabling the EXIT trap and delegating to "$tmp_binary" cli setup $setup_args.getsentry/cli#1244, a sub-task of getsentry/cli#1248: ship one stable bridge CLI release from getsentry/cli before importing any CLI history into getsentry/sentry-mcp; it must work before the Toolkit rename, discover Toolkit releases after the rename, and preserve upgrades for older binaries through legacy endpoints.UPGRADE_SOURCES across src/lib/binary.ts, ghcr.ts, upgrade.ts, and delta-upgrade.ts; 2. mirror ordered fallback in install; 3. add a check: script proving the install script and TypeScript resolver use one ordered source list; 4. preserve delta-patch chains (sha256-<binary> / from-version) and cleanup/keep-count parity across both GHCR packages; 5. configure the post-migration Toolkit release flow to dual-publish releases and nightlies to both repositories and keep getsentry/cli writable through the compatibility window.getsentry/cli with the dual-source resolver, using the release systemβs 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 404 from not-yet-existing getsentry/toolkit and upgrades through getsentry/cli; 4. verify identical install-script behavior; 5. record the bridge version in getsentry/cli#1244, and only then begin getsentry/cli#1239.getsentry/cli; 3. verify the bridge binary and a Toolkit-built binary upgrade through getsentry/toolkit; 4. simulate a 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 between both repositories and require them to match; 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 required, and it must remain writable until then.getsentry/cli#1244 links master tracking issue getsentry/cli#1248 via a comment by GitHub user BYK, created 2026-07-15T09:05:00Z.packages/cli/test/commands/cli/upgrade.test.ts test helper mockBinaryDownloadWithVersion(version) serves Toolkit discovery at getsentry/toolkit/releases?per_page=100 with [{ tag_name: \cli@${version}` }] and serves a gzipped 4-byte ELF-magic payload (0x7f, 0x45, 0x4c, 0x46`) for binary downloads."Checking for updates", "Downloading 99.99.99", "Upgraded to", and "99.99.99"; the downloaded binary is spawned with cli setup --quiet --method curl --install --ensure-auth-scopes.--ensure-auth-scopes; default upgrades omit --no-agent-skills; explicitly passing --no-agent-skills forwards it to setup./npm/global/node_modules/sentry/dist/bin.cjs and include --ensure-auth-scopes; Homebrew JSON upgrades run the discovered new binary and omit --ensure-auth-scopes.1) is reported as "Setup failed with exit code 1".200, the token is "test-token", the manifest version is 0.99.0-dev.1234567890, and its platform layer uses digest sha256:abc123.packages/cli/test/lib/version-check.test.ts verifies stable background discovery passes UPGRADE_SOURCES[0] to prefetchStablePatches("99.0.0", AbortSignal, toolkitSource), requests only https://api.github.com/repos/getsentry/toolkit/releases?per_page=100, and treats any getsentry/cli access as unexpected.404, discovery requests https://api.github.com/repos/getsentry/cli/releases/latest, resolves v99.0.0, and calls prefetchStablePatches("99.0.0", AbortSignal, UPGRADE_SOURCES[1]); the exact request order is Toolkit releases first, legacy latest second."nightly", discovers 99.0.0-dev.200 from Toolkit, and calls prefetchNightlyPatches("99.0.0-dev.200", AbortSignal, UPGRADE_SOURCES[0]); exact requests are: 1. https://api.github.com/repos/getsentry/toolkit; 2. https://ghcr.io/token?scope=repository:getsentry/toolkit:pull; 3. https://ghcr.io/v2/getsentry/toolkit/manifests/nightly, with legacy access treated as unexpected.packages/cli/test/lib/version-check.test.ts opt-out test loads the module in a subprocess because SENTRY_CLI_NO_UPDATE_CHECK=1 is checked at module load; maybeCheckForUpdateInBackground() and getUpdateNotification() must behave as no-ops/null, trying Bun first and falling back to node --input-type=module.packages/cli/test/lib/delta-upgrade.test.ts source-affinity tests dynamically mock CLI_VERSION through importDeltaUpgradeWithVersion(version) and restore modules using vi.doUnmock("../../src/lib/constants.js") plus vi.resetModules().attemptDeltaUpgrade("0.14.0", "/tmp/fake-old", "/tmp/fake-out", false, undefined, LEGACY_UPGRADE_SOURCE) from mocked CLI version 0.13.0 returns null, requests only https://api.github.com/repos/getsentry/cli/releases?per_page=12, and never accesses Toolkit.attemptDeltaUpgrade("0.14.0-dev.101", "/tmp/fake-old", "/tmp/fake-out", false, undefined, LEGACY_UPGRADE_SOURCE) from mocked CLI version 0.14.0-dev.100 returns null after a 401, requests only https://ghcr.io/token?scope=repository:getsentry/cli:pull, and never accesses Toolkit.prefetchStablePatches("0.14.0", undefined, LEGACY_UPGRADE_SOURCE) from mocked CLI version 0.13.0 remains on the legacy source and requests only https://api.github.com/repos/getsentry/cli/releases?per_page=12.prefetchNightlyPatches("0.14.0-dev.101", undefined, LEGACY_UPGRADE_SOURCE) from mocked CLI version 0.14.0-dev.100 remains on the legacy source and requests only https://ghcr.io/token?scope=repository:getsentry/cli:pull.v4.1.10 emitted a deprecation warning that test.poolOptions was removed in Vitest 4 and its former options are now top-level.