Dashboard › cli › Distillation
127f9538-15d8-4a9e-b14e-13e3531a0e1f["lore_tm_v1_rhlftoyB0TltSOvMNL94DPWuHS3WQ6JI7WzyZKodv3I","lore_tm_v1_aCgoVBYpfIwUs1eZkwb29tUOB1f7Rjgh_jUrizsnUHo","lore_tm_v1_2Oef7DGMxEbfYoM_u8IfkigVw44ROJ7YYWn8rBKi8A8","lore_tm_v1_4qDu0MfEM2s_hveM2_rwRyK1A55rtmwr14_EIhJ7X_Y","lore_tm_v1_XZ9w0tRR1aOEoBgXv-9yIZECrVloGdgJLi_olVE4_p0","lore_tm_v1_guz08RtcsLwRZMkwfTX2aJgXN9Lt_NhmjiDCd0N9r-E"]
Date: Sep 9, 2026
packages/cli/test/lib/install-script.test.ts: runInstaller() spawns bash with [installScript, ...args], prepends a temporary fake-tool directory to PATH, sets SENTRY_CLI_NO_TELEMETRY=1, SENTRY_TEST_ARGS_FILE, SENTRY_TEST_REQUESTS_FILE, SENTRY_TEST_SCENARIO, and TMPDIR, and captures exact stdout, stderr, and exitCode; temporary files are removed recursively after each test.curl and gunzip behavior in packages/cli/test/lib/install-script.test.ts: request URLs are appended to requests.txt; scenarios include fallback, gzip-fallback, forbidden, network, nightly-fallback, nightly-manifest-fallback, and nightly-manifest-forbidden; Toolkit stable discovery returns tags mcp@9.0.0, prerelease cli@0.51.0-dev.1, and stable cli@0.50.0; legacy latest returns 0.49.0; GHCR manifests expose version 0.51.0-dev.1 with sentry-linux-x64.gz and sentry-linux-arm64.gz layers; blob requests redirect to https://blob.example.test/sentry.gz; fake gunzip runs cat.https://api.github.com/repos/getsentry/toolkit/releases?per_page=100 then https://github.com/getsentry/toolkit/releases/download/cli@0.50.0/sentry-linux-x64.gz; legacy fallback requests Toolkit discovery, https://api.github.com/repos/getsentry/cli/releases/latest, then https://github.com/getsentry/cli/releases/download/0.49.0/sentry-linux-x64.gz; pinned v0.31.0 probes https://api.github.com/repos/getsentry/toolkit/releases/tags/cli%400.31.0 and downloads https://github.com/getsentry/toolkit/releases/download/cli@0.31.0/sentry-linux-x64.gz.--version nightly: https://api.github.com/repos/getsentry/toolkit, https://api.github.com/repos/getsentry/cli, https://ghcr.io/token?scope=repository:getsentry/cli:pull, https://ghcr.io/v2/getsentry/cli/manifests/nightly, https://ghcr.io/v2/getsentry/cli/blobs/sha256:x64, then https://blob.example.test/sentry.gz; setup arguments must contain nightly.0.31.0 under scenario gzip-fallback: Toolkitβs cli%400.31.0 probe and legacy 0.31.0 probe are followed by legacy downloads sentry-linux-x64.gz and then raw sentry-linux-x64, without switching source between the two asset attempts.--version 0.31.0 --no-modify-path --no-completions --no-agent-skills: cli, setup, --install, --method, curl, --channel, stable, --no-modify-path, --no-completions, --no-agent-skills.1 and reported elapsed time 0.00.packages/cli/test/commands/cli/upgrade.test.ts tests sentry cli upgrade through Stricliβs run() and uses createMockContext() to capture consola stderr, spinner/process stdout, and Stricli errors; the default mocked environment has PATH=/usr/bin:/bin, SHELL=/bin/bash, execPath=/usr/local/bin/sentry, argv=["/usr/local/bin/sentry"], homeDir=/tmp/test-home, cwd=/tmp, and configDir=/tmp/test-config, while forcing SENTRY_PLAIN_OUTPUT=0 for rich spinner output and restoring all modified streams/environment afterward.mockGhcrNightlyVersion() and mockNightlyVersion() recognize https://api.github.com/repos/getsentry/toolkit, exchange a GHCR token "test-token", and serve /manifests/nightly with annotations.version; mockGitHubVersion() serves Toolkit releases as cli@${version}, validates encoded tag cli%40${version}, and falls back to registry.npmjs.org.sentry cli upgrade --check --method curl output requirements: when the current version equals CLI_VERSION, output contains Method: curl, CLI_VERSION, and You are already on the target version; when latest is 99.99.99, output contains Run 'sentry cli upgrade' to update.; when the positional target is 88.88.88, output contains Run 'sentry cli upgrade 88.88.88' to update..CLI_VERSION reports Already up to date and not Upgrading to; a requested version v${CLI_VERSION} has its v prefix stripped and likewise reports Already up to date; missing version 0.0.1 reports Version 0.0.1 not found.sentry cli upgrade --method brew 1.2.3 fails before any network call with Homebrew does not support installing a specific version; --check --method brew can report latest version 99.99.99 and the generic upgrade hint.packages/cli/test/commands/cli/upgrade.test.ts: after Toolkit latest discovery returns HTTP 404 and legacy latest returns 99.99.99, changelog retrieval must request https://api.github.com/repos/getsentry/cli/releases?per_page=30 and must not request https://api.github.com/repos/getsentry/toolkit/releases?per_page=30.nightly with --check --method curl switches to the nightly channel, fetches the latest version from GHCR, and displays nightly version 0.0.0-dev.1740000000.fetchRecentReleases() tests in packages/cli/test/lib/delta-upgrade.test.ts: default requests target api.github.com/repos/getsentry/toolkit/releases with a per_page parameter; passing LEGACY_UPGRADE_SOURCE requests exactly https://api.github.com/repos/getsentry/cli/releases?per_page=12; successful mocked releases preserve order (0.14.0, then 0.13.0), while HTTP 500 and network TypeError("fetch failed") return [].downloadStablePatch() returns the downloaded Uint8Array on HTTP 200, but returns null on HTTP 404 or network failure; test data is new Uint8Array([1, 2, 3, 4, 5]) from https://example.com/patch.bin.resolveStableChain("0.13.0", "0.14.0") resolves a one-hop chain with one downloaded patch, step { fromVersion: "0.13.0", toVersion: "0.14.0" }, and target expectedSha256; passing LEGACY_UPGRADE_SOURCE keeps resolution exclusively on https://api.github.com/repos/getsentry/cli/releases?per_page=12 and returns null on HTTP 404, with no getsentry/toolkit request.0.13.0 β 0.14.0 using patchA = new Uint8Array([1, 2]), then 0.14.0 β 0.15.0 using patchB = new Uint8Array([3, 4]).resolveStableChain() returns null when the target release is absent, the releases API returns HTTP 500, a patch download is unavailable, or chain depth exceeds MAX_STABLE_CHAIN_DEPTH; the depth regression uses 15 releases producing 14 hops against MAX_STABLE_CHAIN_DEPTH (10) for 0.1.0 β 0.15.0.packages/cli/test/lib/delta-upgrade.test.ts: resolveNightlyChain, attemptDeltaUpgrade, prefetchStablePatches, and prefetchNightlyPatches each have tests requiring requests to remain on LEGACY_UPGRADE_SOURCE and never include getsentry/toolkit; intermediate patch hops are kept in memory rather than using legacy .patching.a/.b files.