Dashboard › cli › Distillation
44fa4c8a-ebcd-4bbb-9e98-dde8ed82cbf4["lore_tm_v1_0w7fuwrV2olLu5jqIUr1Byu2MjyFLAxGfamPej8izVs","lore_tm_v1_ph7o67jfXOOWMwc3D6rrrhMU7elPQIEdtMQF1Zd6DbE"]
Date: Sep 10, 2026
packages/cli/src/lib/ghcr.ts now imports valid as semverValid from semver, PRIMARY_UPGRADE_SOURCE and type UpgradeSource from ./binary.js, and UpgradeTransportError alongside UpgradeError from ./errors.js.packages/cli/src/lib/ghcr.ts defines NIGHTLY_VERSION_REGEX = /^\d+\.\d+\.\d+-dev\.\d+$/; getNightlyVersion() now rejects annotations when semverValid(version) === null or the value does not match this numeric-build-timestamp nightly format, throwing UpgradeError("network_error", "Nightly manifest has invalid version annotation").packages/cli/src/lib/ghcr.ts adds exported GhcrManifestHttpError extends UpgradeError, retaining the GHCR HTTP status; its message is Failed to fetch manifest for tag "${tag}": HTTP ${status}, error kind is "network_error", and name is "GhcrManifestHttpError".getAnonymousToken() in packages/cli/src/lib/ghcr.ts now accepts either an UpgradeSource or an AbortSignal as its first argument, preserving the prior signal-only API. It defaults to PRIMARY_UPGRADE_SOURCE, requests token scope repository:${source.ghcrRepo}:pull, and passes the correctly resolved external abort signal to fetchWithRetry().downloadNightlyBlob() in packages/cli/src/lib/ghcr.ts now accepts source: UpgradeSource = PRIMARY_UPGRADE_SOURCE after the optional signal and constructs the blob URL from ${GHCR_REGISTRY}/v2/${source.ghcrRepo}/blobs/${digest} instead of the fixed GHCR_REPO.packages/cli/src/lib/delta-upgrade.ts now imports prerelease as semverPrerelease and valid as semverValid from semver; it replaces the fixed GITHUB_RELEASES_URL and GHCR_REPO dependencies with getGitHubReleasesUrl, PRIMARY_UPGRADE_SOURCE, and type UpgradeSource from ./binary.js.packages/cli/src/lib/delta-upgrade.ts introduces NORMALIZED_RELEASE_SOURCE = Symbol("normalizedReleaseSource"), a NormalizedGitHubReleases array type carrying source-normalization metadata, and source-aware filtering/normalization of raw stable GitHub releases; draft and prerelease releases are excluded.packages/cli/src/lib/delta-upgrade.ts adds getPrimaryUpgradeSource() and makes delta resolution source-aware while retaining primary-source defaults.resolveStableChain() in packages/cli/src/lib/delta-upgrade.ts now accepts source: UpgradeSource = getPrimaryUpgradeSource() after signal and calls stableSource(source).resolveChain(currentVersion, targetVersion, signal).resolveNightlyDelta() in packages/cli/src/lib/delta-upgrade.ts now accepts source: UpgradeSource = getPrimaryUpgradeSource() after setMessage and resolves through nightlySource(source).validateChainStep() rather than binpatch’s validator so telemetry retains the 3 detailed reasons version-mismatch, missing-layer, and size-exceeded; binpatch’s alternatives are the coarser malformed and over_budget. Validation failures set the active Sentry span’s telemetry_reason, and final target/SHA mismatch is classified as version-mismatch.