Skip to content

Commit 8e6289c

Browse files
committed
fix(updater): exclude alpha/rc/canary/preview tags from stable channel resolution
Introduce isPrereleaseTag covering alpha, beta, rc, canary, dev, nightly, and preview suffixes. Change isStableTag to use !isPrereleaseTag so the git updater no longer checks out prerelease tags on the stable channel. Closes #86218
1 parent 9afbfc1 commit 8e6289c

3 files changed

Lines changed: 40 additions & 9 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Docs: https://docs.openclaw.ai
1313

1414
### Fixes
1515

16+
- Updater: exclude alpha/rc/canary/preview tags from stable channel resolution so `openclaw update` on git installs no longer checks out prerelease versions. (#86218)
1617
- Agents/media: preserve async-started media tool metadata so background generation starts no longer surface generic incomplete-turn warnings while replay stays unsafe. (#85933) Thanks @fuller-stack-dev.
1718
- xAI/LM Studio: avoid buffering ordinary bracketed or `final` prose until stream completion while watching for plain-text tool-call fallbacks.
1819
- Discord: suppress a bot's previous reply body and referenced media from prompt context when a user replies to that bot message, while keeping reply metadata for routing. (#86238) Thanks @fuller-stack-dev.

‎src/infra/update-channels.test.ts‎

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
channelToNpmTag,
44
formatUpdateChannelLabel,
55
isBetaTag,
6+
isPrereleaseTag,
67
isStableTag,
78
normalizeUpdateChannel,
89
resolveEffectiveUpdateChannel,
@@ -14,15 +15,40 @@ import {
1415

1516
describe("update-channels tag detection", () => {
1617
it.each([
17-
{ tag: "v2026.2.24-beta.1", beta: true },
18-
{ tag: "v2026.2.24.beta.1", beta: true },
19-
{ tag: "v2026.2.24-BETA-1", beta: true },
20-
{ tag: "v2026.2.24-1", beta: false },
21-
{ tag: "v2026.2.24-alphabeta.1", beta: false },
22-
{ tag: "v2026.2.24", beta: false },
23-
])("classifies $tag", ({ tag, beta }) => {
18+
{ tag: "v2026.2.24-beta.1", beta: true, stable: false },
19+
{ tag: "v2026.2.24.beta.1", beta: true, stable: false },
20+
{ tag: "v2026.2.24-BETA-1", beta: true, stable: false },
21+
{ tag: "v2026.2.24-alpha.1", beta: false, stable: false },
22+
{ tag: "v2026.2.24-rc.1", beta: false, stable: false },
23+
{ tag: "v2026.2.24-canary.1", beta: false, stable: false },
24+
{ tag: "v2026.2.24-preview.1", beta: false, stable: false },
25+
{ tag: "v2026.5.24-alpha.1", beta: false, stable: false },
26+
{ tag: "v2026.2.24-1", beta: false, stable: true },
27+
{ tag: "v2026.2.24", beta: false, stable: true },
28+
])("classifies $tag", ({ tag, beta, stable }) => {
2429
expect(isBetaTag(tag)).toBe(beta);
25-
expect(isStableTag(tag)).toBe(!beta);
30+
expect(isStableTag(tag)).toBe(stable);
31+
});
32+
it("excludes prerelease tags from stable", () => {
33+
const prereleaseTags = [
34+
"v2026.5.24-alpha.1",
35+
"v2026.5.24-beta.1",
36+
"v2026.5.24-rc.1",
37+
"v2026.5.24-canary.3",
38+
"v2026.5.24.dev.2",
39+
"v2026.5.24-nightly.1",
40+
"v2026.5.24-preview.1",
41+
];
42+
for (const tag of prereleaseTags) {
43+
expect(isPrereleaseTag(tag)).toBe(true);
44+
expect(isStableTag(tag)).toBe(false);
45+
}
46+
47+
const stableTags = ["v2026.5.22", "v2026.5.24-1", "v2026.5.24"];
48+
for (const tag of stableTags) {
49+
expect(isPrereleaseTag(tag)).toBe(false);
50+
expect(isStableTag(tag)).toBe(true);
51+
}
2652
});
2753
});
2854

‎src/infra/update-channels.ts‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ export function isBetaTag(tag: string): boolean {
3737
return /(?:^|[.-])beta(?:[.-]|$)/i.test(tag);
3838
}
3939

40+
export function isPrereleaseTag(tag: string): boolean {
41+
return /(?:^|[.-])(?:alpha|beta|rc|canary|dev|nightly|preview)(?:[.-]|$)/i.test(tag);
42+
}
43+
4044
export function isStableTag(tag: string): boolean {
41-
return !isBetaTag(tag);
45+
return !isPrereleaseTag(tag);
4246
}
4347

4448
export function resolveRegistryUpdateChannel(params: {

0 commit comments

Comments
 (0)