Skip to content

Commit 5c30292

Browse files
committed
fix(update): restore next channel compatibility alias
1 parent 11aee1b commit 5c30292

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎services/update/README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ available to roughly half of IPs after three hours and all IPs after six hours.
3434
Eligibility uses the original publication time (`time_created`) and a SHA-256 hash
3535
of the channel and Cloudflare's `CF-Connecting-IP`. Each IP keeps the same rollout
3636
position across releases in that channel. Requests without this header wait for
37-
the full duration. The retired `next` channel is not available or configurable.
37+
the full duration. The retired `next` channel is not configurable; `/api/next`
38+
remains a compatibility alias for `/api/beta`, including its rollout settings.
3839

3940
Until the active release is eligible, callers receive the newest eligible artifact
4041
published before it, for the same name and distribution. This also handles overlapping
@@ -71,7 +72,7 @@ no-store` because responses can depend on the User-Agent.
7172

7273
Version comparison uses semver, normalizing preview run numbers to numeric prerelease
7374
identifiers and historical `next` versions to `beta`. The retired `/api/next`
74-
channel returns 404; use `/api/beta` instead.
75+
channel transparently resolves to `beta` for older clients.
7576

7677
Choose a minimum that older clients can install and that can itself consume the active
7778
release. For the CLI package migration, retain a package-aware release published as

‎services/update/src/index.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ export default {
7777
return new Response("Not found", { status: 404 })
7878
}
7979

80-
if (path[0] === "next") return json({ error: "Channel not found" }, 404)
81-
const resolved = path[0]
80+
const resolved = resolveChannel(path[0])
8281
const agent = request.headers.get("User-Agent")?.match(/^opencode\/(?:([^/]+)\/([^/]+)\/cli|(.*))$/)
8382
const current = url.searchParams.get("current") ?? agent?.[2] ?? agent?.[3]
8483
const source = agent?.[1] ?? current?.match(/^v?0\.0\.0-(.+)-\d+(?:\.\d+)?(?:\+.*)?$/)?.[1]

0 commit comments

Comments
 (0)