DashboardcliDistillation

Distillation

ID: ed844c24-8016-44e2-9a48-bc927eb2fdbb
Session: 1YFBlrgyVUrb
Generation: 0
Tokens: 876
R_compression: 18.044
C_norm: 0.000
Archived: No
Created: 2026-09-08 21:24:11
Source IDs:
["lore_tm_v1_XKrMKSe3JbFzIgtdHEqafztNNS4AmuydpXw-gut9540","lore_tm_v1_SCfhEA4qOjSYuPoYXfrzNGRvmU66yNCFxte2MfAtrJw"]

Observations

🔴 (20:45) packages/cli/test/lib/delta-upgrade.test.ts is a 1,846-line Vitest suite for stable GitHub Releases and nightly GHCR delta-upgrade chain resolution, covering exported pure-computation functions and async orchestration through mocked globalThis.fetch.

🔴 (20:45) packages/cli/test/lib/delta-upgrade.test.ts imports applyPatchChain, attemptDeltaUpgrade, canAttemptDelta, downloadStablePatch, ExtractStableChainOpts, extractSha256, extractStableChain, fetchRecentReleases, filterAndSortChainTags, GitHubAsset, GitHubRelease, getPatchFromVersion, getPatchTargetSha256, getStableTargetSha256, PatchChain, prefetchNightlyPatches, prefetchStablePatches, resolveNightlyChain, resolveNightlyDelta, resolveStableChain, resolveStableDelta, and validateChainStep from packages/cli/src/lib/delta-upgrade.js; it also imports getPlatformBinaryName from packages/cli/src/lib/binary.js and OciManifest from packages/cli/src/lib/ghcr.js.

🔴 (20:45) Test helper makeAsset(overrides: Partial<GitHubAsset> = {}) defaults to asset name sentry-linux-x64, size 100_000, and URL https://example.com/download; helper makeRelease(tag, assets) returns { tag_name: tag, assets }.

🔴 (20:45) Test helper makePatchManifest(fromVersion, sha256Map, layers) builds an OCI image manifest with schemaVersion: 2, media type application/vnd.oci.image.manifest.v1+json, empty-config media type application/vnd.oci.empty.v1+json, config digest sha256:config, config size 2, annotation from-version, and per-platform annotations named sha256-${key}.

🔴 (20:45) getPlatformBinaryName() tests require a sentry- prefix, exactly 3 hyphen-separated components after removing .exe, platform in linux, darwin, or windows, architecture in x64 or arm64, and an .exe suffix only when process.platform === "win32".

🔴 (20:45) Visible canAttemptDelta() tests expect false for target 0.14.0-dev.123 as a stable-to-nightly cross-channel upgrade, false for target 0.14.0 from a dev build, and false for nightly target 0.14.0-dev.abc123 from a dev build.

🔴 (20:45) extractSha256() tests expect sha256:abcdef0123456789 to yield abcdef0123456789; a missing digest, empty digest, or md5:abcdef to yield null; uppercase hexadecimal in sha256:ABCDEF0123456789 to normalize to lowercase; and mixed-case prefix SHA256:abc123 to be accepted.

🔴 (20:45) A visible getStableTargetSha256() test constructs release 0.14.0 with asset sentry-linux-x64 and digest sha256:deadbeef, expecting target SHA-256 deadbeef.

🔴 (20:46) packages/cli/test/lib/delta-upgrade.test.ts defines mockFetch around lines 799–803 by assigning a supplied function to globalThis.fetch; originalFetch is captured around lines 807–810 and restored around line 814.

🔴 (20:46) A search found exactly 29 fetch-related matches in packages/cli/test/lib/delta-upgrade.test.ts, including mocked GitHub Releases requests to api.github.com/repos/getsentry/cli/releases, stable patch URL construction as https://github.com/getsentry/cli/releases/download/0.14.0/${binaryName}.patch, and mocked HTTP failure responses with statuses 500, 404, and 401.