Dashboard › cli › Distillation
641febae-4777-47c1-b316-b0b5281d2eab["lore_tm_v1_FMwHPZqvzw4QbQiuv1drsMtP0l_C1dsisG1F4mIxVF4","lore_tm_v1_pf8FOz76t5HwRIhuRgANAFvpSM3gEPr3t1w6cxubEUE"]
packages/cli/test/commands/cli/upgrade.test.ts removed the mock response that returned cli@99.99.99 for getsentry/toolkit/releases?per_page=100; the test now asserts requests.every((request) => !request.includes("per_page=100")) is true, in addition to excluding https://api.github.com/repos/getsentry/toolkit/releases?per_page=30.packages/cli/test/lib/ghcr.test.ts added test "preserves external cancellation during the GHCR blob request": an AbortController is aborted during the mocked request, the mock throws DOMException("aborted", "AbortError"), downloadNightlyBlob("token", "sha256:abc", controller.signal) must reject with { name: "AbortError" }, and exactly 1 request must occur.packages/cli/test/lib/ghcr.test.ts added test "preserves external cancellation during the redirect request": the first request returns HTTP 307 redirect to https://blob.storage.azure.com/file, the second aborts and throws DOMException("aborted", "AbortError"), downloadNightlyBlob("token", "sha256:abc", controller.signal) must preserve { name: "AbortError" }, exactly 2 header sets must be captured, and the redirected request must omit authorization.packages/cli/test/lib/release-notes.test.ts added test "normalizes raw prefetched Toolkit releases without fetching": fetchChangelog() receives channel: "stable", fromVersion: "0.20.0", toVersion: "0.21.0", source: toolkitSource, and raw prefetched releases mcp@0.21.0 / "- Unrelated MCP release" plus cli@0.21.0 / "### Bug Fixes π\n\n- Raw prefetched release". Expected result: totalItems === 1, first section contains "Raw prefetched release", excludes "Unrelated MCP release", and performs zero network requests (requestedUrls equals []).c6030fbf4d0c190f037c86d832edb6680d3e54ab, base ec83887a16f780f32fba4b7d710bad262dba3a22, and committed patch SHA-256 cf038bf6ee6a8295fdff38c4e32ebc135daf9c4f4daf566505e61b347ba23722.resolveTargetVersion() resolves the latest release in packages/cli/src/commands/cli/upgrade.ts:322-330 before exact pinned resolution at packages/cli/src/commands/cli/upgrade.ts:339-343; therefore a pinned legacy release can fail due to Toolkit latest-release HTTP 403, HTTP 429, malformed metadata, or another terminal error even when the requested legacy tag exists.sentry cli upgrade --check --method curl 88.88.88, make Toolkitβs exact tag return HTTP 404, make the legacy exact tag return HTTP 200, reject every releases?per_page=100 request, then assert success and that no latest-release request occurs.AbortError. Although the token and manifest retry layer preserves external cancellation, the initial GHCR blob request catch at packages/cli/src/lib/ghcr.ts:375-389 and redirect-download catch at packages/cli/src/lib/ghcr.ts:420-431 wrap cancellation as UpgradeError("network_error"), changing caller cancellation into a network failure and breaking cancellation classification.AbortError unchanged; abort once during the authenticated GHCR request and once during the unauthenticated redirect request, asserting one request per stage, error.name === "AbortError", and no Authorization header on the redirect.fetchStableChangelog() passes prefetchedReleases directly to the summary builder at packages/cli/src/lib/release-notes.ts:625-638; the builder ignores options.source and passes raw cli@VERSION tags to compareVersions() at packages/cli/src/lib/release-notes.ts:427-440. This throws on Toolkit-prefixed tags, after which the outer best-effort catch silently drops the changelog.mcp@0.21.0 and cli@0.21.0 entries, assert only the CLI entry appears, and assert zero network requests.binary.ts:338-355 and upgrade.ts:602-631.upgrade.ts:138-175 and upgrade.ts:486-531.X.Y.Z-dev.NUMERIC validation at ghcr.ts:306-320.upgrade.ts:681-717 and upgrade.ts:956-976.binpatch@0.4.2; offline mode reads cache before any source network access.ghcr.ts:411-424.packages/cli/install has blob e05cef2018d3fb6ddde9dcc1a4d7c47c0db3b3da at both base and head.485 passed, and tsc --noEmit --incremental false passed. These results were explicitly not treated as an immutable final-HEAD attestation because the worktree changed before the final state check.DO-NOT-MERGE.