Dashboard › cli › Distillation
20251a4b-e06b-4847-8481-4bc2bf0948a0["lore_tm_v1_gOnZuDYbJHd2N6b3ZtGE05i3y4lxZcGD7e7rco7IaV4","lore_tm_v1_yj1b5glUrcyW2DWqKnKy9PYQ2b47U-GRHdNoN-3BOtk","lore_tm_v1_Fov_QnpXtDb3LQDB5B_clyBm2Dh4oglITfnaoAILs4I","lore_tm_v1_5RsvvVWpP0wY3aZS2kdgGhwB6vTdHXVVq1hfGgm85TI","lore_tm_v1_hQS5MfuU3Fgi9cNhlD59eRm9OCWjLrZLL2Nj6VVjpMs","lore_tm_v1_QxbFSaGbOcnC4rHN_ojv9gPCd2RypvQOBc7k8NI17n4","lore_tm_v1_K6wHZuuTKP7QPEEx7eMsp1gwj6FD72xW1B1QNYevAp4","lore_tm_v1_qCSHgfQI2p3PiuDtJF0pRpZuFT49TVeDOmghQapc7rQ"]
packages/cli/src/lib/delta-upgrade.ts:375-401 defines applyPatchChain(chain, oldBinaryPath, destPath, onBytes?); it traces upgrade.delta.apply, records patches.count and patches.total_bytes, applies all in-memory patches with applyPatchChainInMemory(), and throws SHA-256 mismatch after patching: got ${sha256}, expected ${chain.expectedSha256} if the resulting digest differs.packages/cli/src/lib/delta-upgrade.ts:403-435 defines makeProgressHandler(setMessage?). A new progress bar is created when the byte-event phase changes; "apply" uses percent-only format "pct" because multi-hop totals sum every hop’s newSize and could display 930 MB for a 310 MB install, while pre-apply "download"/"read" phases use "bytes". Incremental progress is calculated as event.written - previousWritten, and "done" calls progress?.done().packages/cli/src/lib/delta-upgrade.ts:437-483 changed telemetry() to expose _source.current. onResolved captures the source, sets span attribute delta.source, and logs patch count and formatted total size; onOfflineMiss records "offline_miss"; onUnavailable sets telemetry_reason. resolveDelta() returns both { result, source: tel._source.current }.resolveStableDelta() and resolveNightlyDelta() preserve their existing public APIs by calling resolveDelta() with stableSource() or nightlySource() and returning only result.packages/cli/src/lib/delta-upgrade.ts:523-598 defines attemptDeltaUpgrade(): skips unsupported targets via canAttemptDelta(), derives "nightly" or "stable" from isNightlyVersion(), records from/to versions, patch bytes, chain length, and distributions upgrade.delta.patch_bytes and upgrade.delta.chain_length; unavailable results set delta.result="unavailable". Errors are captured by Sentry at warning level, logged as falling back to full download, set span status code 2 plus delta.result="error" and delta.error, and return null.attemptDeltaUpgrade() error path intends to preserve resolved-chain attribution after patch application fails by assigning chainSource = resolved.source and then setting delta.source in the catch block. However, because resolveDelta() only resolves its { result, source } promise after resolveAndApply() completes, an exception thrown during apply prevents resolved from being returned and leaves chainSource unset despite the comment’s stated intent.packages/cli/src/lib/delta-upgrade.ts:600-627 defines shared prefetch(source, targetVersion, signal?); it exits if delta cannot be attempted or the signal is aborted, resolves a chain from CLI_VERSION, requires chain.steps, rechecks abort state, and saves the chain using getPatchCache().save(chain, chain.steps). prefetchNightlyPatches() and prefetchStablePatches() delegate with their respective source strategies.toolkit=401, doesnotexist123456789=401, and cli=401.toolkit=404, doesnotexist123456789=404, and cli=403.binpatch version range "^0.4.2" at packages/cli/package.json:111; pnpm-lock.yaml contains binpatch@0.4.2 entries at lines 2169 and 6698.binpatch/package.json under Node.js v24.16.0 failed with ERR_PACKAGE_PATH_NOT_EXPORTED because package subpath ./package.json is not defined by binpatch’s "exports".packages/cli/install:213-274 still hard-codes nightly installation to getsentry/cli: anonymous token scope repository:getsentry/cli:pull, manifest URL https://ghcr.io/v2/getsentry/cli/manifests/nightly, and blob URL https://ghcr.io/v2/getsentry/cli/blobs/${digest}.nightly manifest, extracts the version annotation with awk, locates the platform .gz layer digest by matching org.opencontainers.image.title, manually extracts the GHCR redirect URL to avoid forwarding authorization to Azure Blob Storage, then downloads without auth and pipes through gunzip.packages/cli/install:276-303 still hard-codes stable installation to legacy getsentry/cli: latest version comes from https://api.github.com/repos/getsentry/cli/releases/latest, and assets come from https://github.com/getsentry/cli/releases/download/${version}/${filename}. It strips a leading v, attempts ${url}.gz first, and falls back to the raw binary.packages/cli/install:296-302 documents the gzip stable asset as approximately 60% smaller—approximately 37 MB versus 99 MB—and uses gunzip; failure of the compressed path falls back to curl -fsSL --progress-bar "$url" -o "$tmp_binary".packages/cli/install:306-327 marks the downloaded binary executable and delegates setup with --install --method curl --channel $channel; channel is "nightly" only for requested version "nightly", otherwise "stable". It conditionally appends --no-modify-path, --no-completions, and --no-agent-skills.packages/cli/src/lib/upgrade.ts uses GITHUB_RELEASES_URL for /latest and /tags/${version}; packages/cli/src/lib/release-notes.ts still hard-codes nightly commits to https://api.github.com/repos/getsentry/cli/commits?...; packages/cli/src/lib/formatters/human.ts still links truncated changelogs to https://github.com/getsentry/cli/releases..github/workflows/cleanup-nightlies.yml sets REPO="ghcr.io/getsentry/cli"; .github/workflows/ci.yml contains GHCR repo: getsentry/cli at lines 471 and 554; .craft.yml uses https://github.com/getsentry/cli/releases/download/{{version}}/... for release assets and Homebrew URLs.packages/cli/package.json:7 still declares repository URL git+https://github.com/getsentry/cli.git, and apps/cli-docs/astro.config.mjs:62 still links to https://github.com/getsentry/cli.packages/cli/test/lib/upgrade.test.ts:980 expects https://github.com/getsentry/cli/releases/download/, while multiple upgrade tests inspect ghcr.io/token; packages/cli/test/lib/binary.test.ts:47 also contains a legacy release-download URL expectation alongside newly added Toolkit-first source tests.