Dashboard › cli › Distillation
d10add59-aad0-4ce1-afe2-a489320ec81e["lore_tm_v1_YhtLYilXCvrQKTfT0l_u5ZAtmG9Uh6NpZPIMUDvhiko","lore_tm_v1_aSwHkM6TN9QGECqXyPk3qKeNdm0zX4yO8IJ3AzBYr3g","lore_tm_v1_DYau5w3QHnEKNOKYVQUJWp6xQgu3KsY8nGmR-8JUlWk","lore_tm_v1_KcigkzpB2VXGEHkyNdxf3UrJtaAbOKaK8hTYP4sIJYQ","lore_tm_v1_9hf1DukBF6YUY1T7FT02teQp2qX1NUnvSMlea5xld08","lore_tm_v1_pIa197KcST2HkFdO64YSZPwm3pegsDul7yShe67aQ8M","lore_tm_v1_gCM3qBp2KnbcXw_IhHPIMmlR0Lioqm5e-Xyqhd9p7Og","lore_tm_v1_-PbHdSi8Wwv0vFMn570Xxgdee2qDPtlQZxwqj9QhFh8","lore_tm_v1_GG-Jn5MIAr67PsKqg_5D5Hoa2IOVCiskm0OG1AL_KoI","lore_tm_v1_MmVGG0_jtAe4dS_Xa-tVatSaNSNSpFLZMfdQU4NMCTk"]
Uint8Array results in symbolic-wasm must propagate as JsError and must never be silently discarded with .ok()?.getsentry/toolkit before getsentry/cli and fall back only on a genuine HTTP 404. Never fall back on 401/403/429/5xx or transport errors; authentication, rate-limit, server, network, GHCR, cancellation, and abort failures must propagate rather than be treated as source absence.apps/cli-docs and never nest under packages/cli; the history-preserving import uses separate immutable history-filtered refs for packages/cli/** and apps/cli-docs/**.apps/cli-docs, never packages/cli.UPGRADE_SOURCES: 1. getsentry/toolkit, 2. getsentry/cli. The same exact order must be mirrored in a marked installer array and enforced by a parity test.getsentry/cli.getsentry/cli must remain writable and must not be archived until dual publishing ends, at least 2 stable releases and roughly 90 days have passed, and legacy usage is verified finished.getsentry/sentry-mcp with full CLI/MCP CI, workspace release dry-runs, Vercel preview, Cloudflare canary, and exact-head correctness/security reviews; 2. rename to getsentry/toolkit, verify redirects, protections, secrets, environments, GitHub App, webhooks, Vercel, and Cloudflare wiring, then rerun CI, canaries, staging CLI/MCP releases, and the upgrade matrix; 3. dual-publish CLI stable and nightly releases to both repositories; 4. archive getsentry/cli only after the compatibility window.UpgradeSource adoption must preserve retry limits, timeout handling, immediate caller-abort propagation, exact UpgradeError reasons/messages, OCI types and annotations, pagination, and convenience helpers. Token, manifest, blob, and tag URLs must derive from the selected source..cursor/rules/ultracite.mdc before working in getsentry/cli; generic TypeScript conventions can violate repository-specific linting and implementation rules. A lookup in the current worktree found .cursor/rules/ultracite.mdc absent and found no matching files..craft.yml release-download URLs, .github/workflows/ci.yml GHCR publish/tag/cleanup references, .github/workflows/cleanup-nightlies.yml, packages/cli/package.json, codemods/README.md, and packages/cli/README.md.packages/cli/package.json defines package sentry version 0.40.0-dev.0, repository git+https://github.com/getsentry/cli.git, Node runtime >=18.0, development runtime >=22.15, and package manager pnpm@10.11.0.packages/cli/package.json exports ESM through ./dist/index.mjs with types ./dist/index.d.mts, CommonJS through ./dist/index.cjs with types ./dist/index.d.cts, and CLI binary sentry through ./dist/bin.cjs.packages/cli/package.json build/test tooling uses TypeScript ^5.9.3, tsx ^4.22.4, Vitest ^4.1.9, Biome 2.3.8, Ultracite 6.3.10, marked ^15.0.12, and @sentry/symbolic 13.7.0.packages/cli/src/lib/binary.ts, packages/cli/src/lib/upgrade.ts, packages/cli/src/lib/release-notes.ts, packages/cli/src/lib/ghcr.ts, packages/cli/src/lib/delta-upgrade.ts, packages/cli/src/lib/version-check.ts, and packages/cli/src/commands/cli/upgrade.ts.packages/cli/src/lib/ghcr.ts currently hard-codes GHCR_REPO = "getsentry/cli" and derives anonymous-token, manifest, blob, and tag-list URLs from that constant.packages/cli/src/lib/delta-upgrade.ts currently defines stableSource() with githubReleaseSource({ releasesUrl: GITHUB_RELEASES_URL, binaryName: getPlatformBinaryName(), userAgent: \sentry-cli/${CLI_VERSION}`, fetch: customFetch, instrument })andnightlySource()withghcrSource({ registry: "https://ghcr.io", repo: GHCR_REPO, binaryName: getPlatformBinaryName(), targetTag: (version) => `nightly-${version}`, compareVersions, userAgent: `sentry-cli/${CLI_VERSION}`, fetch: customFetch, instrument })`.fetchRecentReleases() in packages/cli/src/lib/delta-upgrade.ts requests ${GITHUB_RELEASES_URL}?per_page=12; it returns [] for non-OK responses, non-array JSON, and caught fetch/parse errors, with debug logging for invalid shape and failures.downloadStablePatch(url, signal) returns patch bytes only for an OK response and otherwise returns null; caught failures are debug-logged as Failed to download stable patch.canAttemptDelta(targetVersion) rejects delta attempts when CLI_VERSION === "0.0.0-dev", when current and target nightly/stable channels differ, or when the target is a downgrade.validateChainStep() preserves 3 detailed failure reasonsβversion-mismatch, missing-layer, and size-exceededβinstead of binpatchβs coarser "malformed" | "over_budget" classification.resolveNightlyChain() uses OciClient with registry https://ghcr.io, repository GHCR_REPO, and user agent sentry-cli/${CLI_VERSION}. It loads tags using PATCH_TAG_PREFIX, rejects an empty chain or one exceeding MAX_NIGHTLY_CHAIN_DEPTH, fetches manifests concurrently, validates each step against remaining budget opts.fullGzSize * SIZE_THRESHOLD_RATIO - totalSize, and records validation failures in span attribute telemetry_reason.opts.targetVersion and provide a target SHA-256 from the final manifest; otherwise it records telemetry_reason = "version-mismatch" and returns null.applyPatchChain() traces apply-patches with operation upgrade.delta.apply, records patches.count and patches.total_bytes, applies patches in memory, and throws SHA-256 mismatch after patching: got ${sha256}, expected ${chain.expectedSha256} when verification fails.telemetry()._source.current: onResolved records the source and delta.source, onOfflineMiss records offline_miss, and onUnavailable records telemetry_reason. This preserves source attribution if applying a successfully resolved chain later throws.attemptDeltaUpgrade() selects nightlySource() or stableSource() by target channel, records delta.from_version, delta.to_version, delta.patch_bytes, and delta.chain_length, emits upgrade.delta.patch_bytes and upgrade.delta.chain_length distributions tagged by channel, and marks unavailable results with delta.result = "unavailable".attemptDeltaUpgrade() captures a warning-level Sentry exception tagged with from-version, to-version, and channel; preserves delta.source when known; logs Delta upgrade failed (${message}), falling back to full download; sets span status code 2, delta.result = "error", and delta.error; then returns null.CLI_VERSION to the target, exits if no steps or cancellation occurs, and otherwise saves the chain and steps to the patch cache. prefetchNightlyPatches() uses nightlySource() and prefetchStablePatches() uses stableSource().