fix(update): prevent stable upgrade notices on extended-stable (#118518)

* fix(update): keep extended-stable update notices on channel

* fix(update): repair extended-stable CI checks

* fix(update): retain verified extended-stable channel

* fix(update): normalize gateway install surface

* test(update): split effective channel coverage

* fix(update): resolve verified extended-stable status paths

* fix(update): preserve Sparkle fallback on missing channel

* fix(update): restore effective channel after rebase

* fix(update): repair rebased CI coverage
This commit is contained in:
Dallin Romney
2026-08-09 16:01:14 +08:00
committed by GitHub
parent da463bfef4
commit dcdbd7aab6
25 changed files with 715 additions and 148 deletions
+7 -5
View File
@@ -4,12 +4,12 @@ import { theme } from "../../../packages/terminal-core/src/theme.js";
import {
formatUpdateAvailableHint,
formatUpdateOneLiner,
resolveStatusRegistryUpdateChannel,
resolveUpdateAvailability,
} from "../../commands/status.update.js";
import { readSourceConfigBestEffort } from "../../config/config.js";
import {
normalizeUpdateChannel,
resolveRegistryUpdateChannel,
resolveUpdateChannelDisplay,
} from "../../infra/update-channels.js";
import { checkUpdateStatus } from "../../infra/update-check.js";
@@ -49,10 +49,12 @@ export async function updateStatusCommand(opts: UpdateStatusOptions): Promise<vo
timeoutMs: timeoutMs ?? 3500,
fetchGit: true,
includeRegistry: true,
registryChannel: resolveRegistryUpdateChannel({
configChannel,
currentVersion: VERSION,
}),
resolveRegistryChannel: ({ installKind, git }) =>
resolveStatusRegistryUpdateChannel({
configChannel,
installKind,
git,
}),
});
const channelInfo = resolveUpdateChannelDisplay({
+17 -5
View File
@@ -15,9 +15,9 @@ import {
import {
channelToNpmTag,
DEFAULT_GIT_CHANNEL,
DEFAULT_PACKAGE_CHANNEL,
EXTENDED_STABLE_TAG_UNSUPPORTED_REASON,
normalizeUpdateChannel,
resolveEffectiveUpdateChannel,
} from "../../infra/update-channels.js";
import { fetchNpmPackageTargetStatus } from "../../infra/update-check-package-target.js";
import {
@@ -38,6 +38,7 @@ import { cleanupStaleManagedServiceUpdateHandoffs } from "../../infra/update-man
import { loadInstalledPluginIndexInstallRecords } from "../../plugins/installed-plugin-index-records.js";
import { defaultRuntime } from "../../runtime.js";
import type { OpenClawSchemaVersions } from "../../state/openclaw-schema-versions.js";
import { VERSION } from "../../version.js";
import { resolveCliName } from "../cli-name.js";
import { createUpdateProgress } from "./progress.js";
import {
@@ -206,7 +207,12 @@ async function updateCommandInternal(
const selectedChannel =
requestedChannel ??
storedChannel ??
(installKind === "git" ? DEFAULT_GIT_CHANNEL : DEFAULT_PACKAGE_CHANNEL);
(installKind === "git"
? DEFAULT_GIT_CHANNEL
: resolveEffectiveUpdateChannel({
currentVersion: VERSION,
installKind,
}).channel);
if (selectedChannel === "extended-stable" && installKind === "git") {
await reportPreMutationUpdateFailure({
root,
@@ -221,9 +227,15 @@ async function updateCommandInternal(
const switchToPackage =
requestedChannel !== null && requestedChannel !== "dev" && installKind === "git";
const updateInstallKind = switchToGit ? "git" : switchToPackage ? "package" : installKind;
const defaultChannel =
updateInstallKind === "git" ? DEFAULT_GIT_CHANNEL : DEFAULT_PACKAGE_CHANNEL;
const channel = requestedChannel ?? storedChannel ?? defaultChannel;
const channel =
requestedChannel ??
storedChannel ??
(updateInstallKind === "git"
? DEFAULT_GIT_CHANNEL
: resolveEffectiveUpdateChannel({
currentVersion: VERSION,
installKind: updateInstallKind,
}).channel);
const devTargetRef =
channel === "dev" ? process.env.OPENCLAW_UPDATE_DEV_TARGET_REF?.trim() || undefined : undefined;
+2
View File
@@ -13,6 +13,7 @@ import {
import { checkUpdateStatus } from "../../infra/update-check.js";
import { defaultRuntime } from "../../runtime.js";
import { pathExists } from "../../utils.js";
import { VERSION } from "../../version.js";
import {
isEmptyDir,
isGitCheckout,
@@ -54,6 +55,7 @@ export async function updateWizardCommand(opts: UpdateWizardOptions = {}): Promi
: null;
const channelInfo = resolveEffectiveUpdateChannel({
configChannel,
currentVersion: VERSION,
installKind: updateStatus.installKind,
git: updateStatus.git
? { tag: updateStatus.git.tag, branch: updateStatus.git.branch }