Dashboard › cli › Distillation
f9fecc49-8b3e-4c68-93c7-7f41496fe607["lore_tm_v1_UEt8f6tpC-99m7yfHf_qVZuKtAay8_znxQRm3dOvn7A","lore_tm_v1_j6NtUqb7Gq7enFJ_w9pBwcmWBnDAN2o573K7mJkQLEE","lore_tm_v1_OMBqHrPhH8BnjhBAKLUp0YZVd-CZpeNtQQlvaWoYOf4","lore_tm_v1_BaZcWZVmu3TNQk4hbmROmXPGxt7j8pDnz8bZvXz_EEM","lore_tm_v1_aUP_cmpul_UEzoEU3KV-TlIHbe6rtaflrSLGAmx8bNA","lore_tm_v1_mFweSBGMv7UcxxdJT-5ffPEsjHAL88ubC0kbIYcufnM"]
c6030fbf4d0c190f037c86d832edb6680d3e54ab (fix(cli): bind nightly manifests to versions) by Burak Yigit Kaya <byk@sentry.io> changed packages/cli/src/lib/upgrade.ts and packages/cli/test/lib/upgrade.test.ts, with 95 insertions and 2 deletions.c6030fbf4d0c190f037c86d832edb6680d3e54ab changed downloadNightlyToPath() in packages/cli/src/lib/upgrade.ts so a pinned version fetches nightly-${version} and then calls validateNightlyManifestVersion(manifest, version) before locating and downloading the platform .gz layer; an omitted version still uses the rolling nightly manifest.parseInstallationMethod() tests in packages/cli/test/lib/upgrade.test.ts accept curl, brew, npm, pnpm, bun, and yarn; parsing is case-insensitive; pip, apt, and the empty string throw Invalid method: ....extractReleaseVersions() filters out drafts and releases marked prerelease, requires tags beginning with source.tagPrefix, strips the tag prefix and VERSION_PREFIX_REGEX, keeps valid SemVer values, and sorts descending with compareVersions(b, a).fetchLatestFromGitHub() tests verify that Toolkit release discovery uses https://api.github.com/repos/getsentry/toolkit/releases?per_page=100, ignores unrelated mcp@... and invalid cli@... tags, and selects the highest valid CLI SemVer across pagination.Link rel="next" URL, rejecting an external https://example.com/releases?page=2 URL with GitHub returned an invalid release pagination URL, classifying malformed pagination as reason: "network_error", and rejecting cyclic pagination with GitHub returned cyclic release pagination.fetchLatestFromGitHub() falls back from Toolkit releases to https://api.github.com/repos/getsentry/cli/releases/latest only when the Toolkit request returns HTTP 404; a successful Toolkit response containing only an MCP release throws No version found in GitHub release without legacy fallback.fetchLatestFromGitHub() strips an optional v from CLI versions, maps all-source HTTP 404 failure to No CLI upgrade source was found: every source returned HTTP 404, maps a thrown TypeError("fetch failed") to Failed to connect to GitHub: fetch failed, and rejects a response with no usable tag_name.4a1d5bad105c006193c68459175f5eb3c7f78e08 developed uncommitted modifications in four files: packages/cli/src/commands/cli/upgrade.ts, packages/cli/src/lib/upgrade.ts, packages/cli/test/commands/cli/upgrade.test.ts, and packages/cli/test/lib/upgrade.test.ts.packages/cli/src/lib/upgrade.ts was modified to import prerelease as semverPrerelease from semver and make extractReleaseVersions() require both semverValid(tag) !== null and semverPrerelease(tag) === null; this excludes SemVer prereleases even when GitHub metadata incorrectly says prerelease: false.resolveExistingUpgradeVersion() in packages/cli/src/lib/upgrade.ts was modified to parse the selected pinned Toolkit response as JSON, require an object whose tag_name exactly equals ${selected.source.tagPrefix}${version}, and throw UpgradeError("network_error", ...) for malformed JSON, missing tags, or mismatched tags.packages/cli/test/lib/upgrade.test.ts for pinned Toolkit metadata failures: 1. empty body "", 2. invalid JSON "{", 3. missing tag {}, and 4. mismatched tag {"tag_name":"mcp@1.0.0"}. Each must reject resolveExistingUpgradeVersion("1.0.0") with reason: "network_error" and must make only the Toolkit request https://api.github.com/repos/getsentry/toolkit/releases/tags/cli%401.0.0, without legacy fallback.nightlyVersionExists() in packages/cli/src/lib/upgrade.ts was modified to retain the fetched nightly-${version} manifest and call validateNightlyManifestVersion(manifest, version) before returning true.versionExists() test where requested nightly 0.14.0-dev.123 returns manifest annotation version 0.14.0-dev.124; the expected error is Nightly manifest version 0.14.0-dev.124 does not match requested version 0.14.0-dev.123.packages/cli/src/commands/cli/upgrade.ts was changed from channel === "nightly" && method !== "curl" to isNightlyVersion(target) && method !== "curl", making standalone migration depend on the resolved target being nightly rather than solely on the configured channel.packages/cli/test/commands/cli/upgrade.test.ts was renamed from “migrates npm install to standalone binary for nightly channel” to “migrates npm install to standalone binary for a pinned nightly”; it removed setReleaseChannel("nightly") and now runs ["cli", "upgrade", "--method", "npm", "0.99.0-dev.1234567890"].BLOCKED because the initially clean exact-head worktree changed during read-only inspection. Initial verification had HEAD 4a1d5bad105c006193c68459175f5eb3c7f78e08, merge base ec83887a16f780f32fba4b7d710bad262dba3a22, and patch SHA-256 bd98f2d9f7e5ce09a4d1271fb230d763348e59068ac12de292898fb8697b7fc5./home/byk/.local/share/opencode/worktree/0e8c2f3bbe145a3280d6fb6ed900a5121f382cf0/toolkit-bridge-upgrade/ in: 1. packages/cli/src/commands/cli/upgrade.ts:25,1067; 2. packages/cli/src/lib/upgrade.ts:24,134-136,713-733,761-767; 3. packages/cli/test/commands/cli/upgrade.test.ts:1124-1186; and 4. packages/cli/test/lib/upgrade.test.ts:201,746-765,978-1001.DO-NOT-MERGE.