Dashboard › cli › Distillation
ee331b90-4d93-424d-83f8-9eaf19bcebd4["lore_tm_v1_UBJUyM3zUHNOR1zL7WUL1XOPWo4WU72dKz1llYHIkMk","lore_tm_v1_NqJfWMLpBrDuy2uMViPahnEwqxfaP2pEhXfaCU8s5PY","lore_tm_v1_i16L0gxwnGQdhGnueDUSCR1UqKOekoBsiUbD92Gq1iw","lore_tm_v1_YkF9uUjXHx1z3c5m8E-fXyZ5gBoUgYdfIU3yDODcXms","lore_tm_v1_QXgS8ZczMd1jry97WGmGXSb_9vHbKu32GsWB4OySxRk","lore_tm_v1_uav3HjmyoFqk2zGMpu-HN6KeR_H0-i2B_qQGuOMK4IQ","lore_tm_v1_FN1prQAcRaDEndGjaWhCcShoCksmzlo79GGWUmWqnfU","lore_tm_v1_7hpS5Rk6PTJNT7PHf0sGYcA_JloOgPK5atf8FbNTJgQ","lore_tm_v1_KSLs9O6q7Lf2E-W-FgfmqDyiO-_Ym5OGMEQ2b2Zb2Io"]
Date: Sep 10, 2026
/home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade, exact immutable base ec83887a16f780f32fba4b7d710bad262dba3a22, and exact immutable head 9525f72c70fabbb23ec21d13cf86add58f6287cc.git diff --check, plus inspection of every changed source and test object.signal.reason; body termination must remain UpgradeTransportError; malformed complete JSON must be terminal metadata failure.curl (GitHub) lookup regardless of the current installation method.cli@VERSION, while the legacy source supports vVERSION.PASS, CONCERN, MUST-FIX, or BLOCKED, including exact HEAD file:line evidence and a deterministic regression/fix for defects.BLOCKED with the exact error rather than returning empty; empty output is forbidden.MERGE or DO-NOT-MERGE./home/byk/Code/getsentry/cli/.git/worktrees/toolkit-bridge-upgrade.ec83887a16f780f32fba4b7d710bad262dba3a22, tree 110d6530e57ca4fbfb2a3f98e52013d2668b5b5e, parent e7beceb6ba09b64dc277ae1732df04e65500062b, subject fix(event): Prevent immediate retry of rate-limited org in event view fallback (#1566).9525f72c70fabbb23ec21d13cf86add58f6287cc, tree 22f49363a13e32c36dcd9e1ca95916809c2dc271, parent a84012184c79c2566c7466aa6beda5f767199218, subject fix(cli): harden upgrade metadata validation.ec83887a16f780f32fba4b7d710bad262dba3a22; base ancestry check reported base-is-ancestor=yes.packages/cli/src/commands/cli/upgrade.ts, packages/cli/src/lib/binary.ts, packages/cli/src/lib/delta-upgrade.ts, packages/cli/src/lib/errors.ts, packages/cli/src/lib/ghcr.ts, packages/cli/src/lib/release-notes.ts, packages/cli/src/lib/upgrade.ts, packages/cli/src/lib/version-check.ts, packages/cli/test/commands/cli.test.ts, packages/cli/test/commands/cli/upgrade.test.ts, packages/cli/test/lib/binary.test.ts, packages/cli/test/lib/delta-upgrade.mocked.test.ts, packages/cli/test/lib/delta-upgrade.test.ts, packages/cli/test/lib/ghcr.test.ts, packages/cli/test/lib/release-notes.test.ts, packages/cli/test/lib/upgrade.test.ts, and packages/cli/test/lib/version-check.test.ts.upgrade.ts 180 lines, binary.ts 191, delta-upgrade.ts 170, errors.ts 8, ghcr.ts 213, release-notes.ts 134, version-check.ts 21, commands/cli.test.ts 40, commands/cli/upgrade.test.ts 494, binary.test.ts 188, delta-upgrade.mocked.test.ts 14, delta-upgrade.test.ts 220, ghcr.test.ts 235, release-notes.test.ts 221, upgrade.test.ts 758, and version-check.test.ts 125.git diff --check reported diff-check=clean; patch SHA-256 was 4950719273dc17d5a9e061b8cfe70c62131fe3299dc1799d9c09bb522b112193.packages/cli/src/lib/binary.ts introduced UpgradeSource with exact fields githubRepo, ghcrRepo, and tagPrefix; UPGRADE_SOURCES is ordered as 1. Toolkit { githubRepo: "getsentry/toolkit", ghcrRepo: "getsentry/toolkit", tagPrefix: "cli@" }, then 2. legacy CLI { githubRepo: "getsentry/cli", ghcrRepo: "getsentry/cli", tagPrefix: "" }; PRIMARY_UPGRADE_SOURCE is the first entry.packages/cli/src/lib/binary.ts added source-aware URL helpers getBinaryDownloadUrl(), getGitHubReleasesUrl(), getGitHubReleaseByTagUrl(), getGitHubLatestReleaseUrl(), and getGitHubRepositoryUrl(); prefixed latest discovery uses ?per_page=100, while an unprefixed source uses /latest.Response from resolveUpgradeSource() for reuse.packages/cli/src/lib/binary.ts added resolveUpgradeSource(): probes ordered sources, returns { source, response } on success, advances only when response.status === 404, throws UpgradeError("network_error", ...) for other HTTP statuses, and throws UpgradeSourceNotFoundError when every source returns 404.fetchUpgradeProbe() in packages/cli/src/lib/binary.ts uses getGitHubHeaders() and optional signal; an aborted supplied signal rethrows exact options.signal.reason, an AbortError is rethrown, TLS errors become UpgradeTransportError(buildTlsErrorDetail(error)), and other connection failures become UpgradeTransportError("Failed to connect to GitHub: ...").packages/cli/src/lib/binary.ts changed fetchWithUpgradeError() so exact aborted init.signal.reason is preserved, TLS and generic connection failures use UpgradeTransportError, and ordinary AbortError remains unchanged.packages/cli/src/lib/binary.ts added parseUpgradeJson(response, signal, invalidMessage): exact cancellation reason is rethrown; SyntaxError becomes terminal UpgradeError("network_error", invalidMessage); other body-read failures become UpgradeTransportError with the underlying error string.packages/cli/src/lib/errors.ts added UpgradeTransportError extends UpgradeError; its constructor uses reason "network_error" and sets name = "UpgradeTransportError".packages/cli/src/lib/delta-upgrade.ts added source-bound normalized stable releases using symbol NORMALIZED_RELEASE_SOURCE, upgradeSourceKey(), isNormalizedForSource(), and normalizeStableReleases().normalizeStableReleases() filters runtime-shaped GitHub releases, rejects draft/prerelease entries, requires the selected sourceβs tagPrefix, strips that prefix, and retains only valid non-prerelease SemVer using semverValid() and semverPrerelease().packages/cli/src/lib/delta-upgrade.ts made stable and nightly strategies source-aware: stable uses getGitHubReleasesUrl(source) and nightly uses source.ghcrRepo; fetchRecentReleases(), resolveStableChain(), resolveNightlyChain(), resolveStableDelta(), resolveNightlyDelta(), attemptDeltaUpgrade(), prefetchNightlyPatches(), and prefetchStablePatches() now accept or propagate UpgradeSource.stableSource(source) only normalizes a successful response whose input begins with the selected ${releasesUrl}?; non-array bodies are rewrapped unchanged, while arrays are normalized for the selected source before being returned to binpatch.fetchRecentReleases() requests ${getGitHubReleasesUrl(source)}?per_page=12; HTTP failure, malformed non-array data, or caught failure returns an empty source-normalized release array.packages/cli/src/lib/ghcr.ts defines GHCR_REQUEST_TIMEOUT = 10_000, GHCR_MAX_RETRIES = 1, GHCR_BLOB_TIMEOUT = 30_000, NIGHTLY_VERSION_REGEX = /^\d+\.\d+\.\d+-dev\.\d+$/, and SHA256_DIGEST_REGEX = /^sha256:[0-9a-f]{64}$/.packages/cli/src/lib/ghcr.ts changed retry/cancellation behavior: if the external signal is aborted, it immediately throws exact externalSignal.reason; exhausted transport/network failures become UpgradeTransportError.packages/cli/src/lib/ghcr.ts requires annotation maps to be non-array string records, layer digests to match lowercase SHA-256 format, sizes to be safe integers, schemaVersion === 2, and all manifest layers to pass validation.getAnonymousToken() in packages/cli/src/lib/ghcr.ts became source-aware and builds token scope as repository:${source.ghcrRepo}:pull.GhcrManifestHttpError(tag, response.status) on non-OK HTTP, uses parseUpgradeJson() for body parsing, and throws terminal UpgradeError("network_error", 'Manifest for tag "..." returned invalid metadata') when runtime shape validation fails.getNightlyVersion() now requires both valid SemVer and exact numeric nightly shape X.Y.Z-dev.<digits>; otherwise it throws UpgradeError("network_error", "Nightly manifest has invalid version annotation").listTags() became source-aware and tracks visitedCursors; an absent or repeated next cursor throws UpgradeError("network_error", "GHCR tag pagination returned a repeated cursor").packages/cli/src/lib/release-notes.ts became source-aware through getGitHubReleasesUrl(source), normalizeStableReleases(), and isNormalizedForSource(); prefetched releases are accepted only when normalized for the selected source.${getGitHubReleasesUrl(source)}?per_page=30, normalizes releases for that source, and builds summaries over the exclusive fromVersion to inclusive toVersion range.https://api.github.com/repos/${source.githubRepo}/commits?sha=main&since=${sinceDate}&until=${untilDate}&per_page=100.FetchChangelogOptions now carries optional source?: UpgradeSource and source-normalized prefetchedReleases?: NormalizedGitHubReleases; fetchChangelog() defaults the source to PRIMARY_UPGRADE_SOURCE and propagates it to stable or nightly changelog retrieval.