惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Hugging Face - Blog
Hugging Face - Blog
GbyAI
GbyAI
Engineering at Meta
Engineering at Meta
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
H
Hackread – Cybersecurity News, Data Breaches, AI and More
WordPress大学
WordPress大学
博客园_首页
美团技术团队
H
Help Net Security
MongoDB | Blog
MongoDB | Blog
宝玉的分享
宝玉的分享
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
J
Java Code Geeks
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
IT之家
IT之家
T
The Blog of Author Tim Ferriss
Microsoft Azure Blog
Microsoft Azure Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog
雷峰网
雷峰网
爱范儿
爱范儿

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(update): carry effective git channel into post-core f...
masatohoshin · 2026-06-18 · via Recent Commits to openclaw:main

@@ -21,7 +21,11 @@ import { GATEWAY_SERVICE_RUNTIME_PID_ENV } from "../daemon/constants.js";

2121

import { resolveGatewayInstallEntrypoint } from "../daemon/gateway-entrypoint.js";

2222

import { runCommandWithTimeout } from "../process/exec.js";

2323

import { resolveStableNodePath } from "./stable-node-path.js";

24-

import type { UpdateChannel } from "./update-channels.js";

24+

import {

25+

DEFAULT_GIT_CHANNEL,

26+

type UpdateChannel,

27+

UPDATE_EFFECTIVE_CHANNEL_ENV,

28+

} from "./update-channels.js";

2529

import type { UpdateRunResult } from "./update-runner.js";

26302731

// Whole-process backstop for the finalizer. `update finalize` runs several timed

@@ -36,14 +40,20 @@ const FINALIZE_PROCESS_STEP_BUDGET_MULTIPLIER = 6;

36403741

// Strip the running gateway's service identity from the finalizer child so it is

3842

// not mistaken for the managed service process (matches the CLI post-core spawn).

43+

// Also carry the effective update channel so convergence runs on the channel the

44+

// core update actually used (git/dev for an unconfigured source update) — passed

45+

// as the *effective* channel, never a *requested* one, so `update finalize` does

46+

// not persist `update.channel`.

3947

function buildFinalizeEnv(

4048

baseEnv: NodeJS.ProcessEnv,

49+

effectiveChannel: UpdateChannel,

4150

compatHostVersion?: string,

4251

): NodeJS.ProcessEnv {

4352

const env: NodeJS.ProcessEnv = { ...baseEnv };

4453

delete env.OPENCLAW_SERVICE_MARKER;

4554

delete env.OPENCLAW_SERVICE_KIND;

4655

delete env[GATEWAY_SERVICE_RUNTIME_PID_ENV];

56+

env[UPDATE_EFFECTIVE_CHANNEL_ENV] = effectiveChannel;

4757

if (compatHostVersion) {

4858

env.OPENCLAW_COMPATIBILITY_HOST_VERSION = compatHostVersion;

4959

}

@@ -113,9 +123,10 @@ function isGitUpdateNeedingFinalize(

113123

function buildFinalizeArgv(params: {

114124

nodePath: string;

115125

entrypoint: string;

116-

channel?: UpdateChannel;

117126

timeoutMs?: number;

118127

}): string[] {

128+

// No `--channel`: the effective channel is passed via env (convergence-only,

129+

// not persisted). `update finalize` would persist any `--channel` it sees.

119130

const argv = [

120131

params.nodePath,

121132

params.entrypoint,

@@ -125,9 +136,6 @@ function buildFinalizeArgv(params: {

125136

"--yes",

126137

"--no-restart",

127138

];

128-

if (params.channel) {

129-

argv.push("--channel", params.channel);

130-

}

131139

if (typeof params.timeoutMs === "number" && Number.isFinite(params.timeoutMs)) {

132140

// `update finalize --timeout` is per-step seconds.

133141

argv.push("--timeout", String(Math.max(1, Math.ceil(params.timeoutMs / 1000))));

@@ -158,23 +166,23 @@ export async function runPostCoreFinalizeAfterGatewayUpdate(params: {

158166

typeof params.timeoutMs === "number" && Number.isFinite(params.timeoutMs)

159167

? params.timeoutMs

160168

: undefined;

161-

// Only forward `--channel` when the caller actually has a configured channel.

162-

// `update finalize` treats any `--channel` as an explicit request and persists

163-

// it to `openclaw.json` (`persistRequestedUpdateChannel`); emitting a defaulted

164-

// channel here would write a channel the user never requested. When omitted,

165-

// the finalizer converges on the stored/default channel — the reconcile still

166-

// resolves a host-compatible version, it just does not mutate config.

169+

// This helper only runs for git/source updates, where `runGatewayUpdate` ran

170+

// the core update on `configChannel ?? DEFAULT_GIT_CHANNEL` (dev). Carry that

171+

// same effective channel into the finalizer so plugin convergence matches the

172+

// core update instead of falling back to the package (stable) channel. It is

173+

// passed via env as the *effective* (not requested) channel, so the finalizer

174+

// does not persist `update.channel` when the user never configured one.

175+

const effectiveChannel: UpdateChannel = params.channel ?? DEFAULT_GIT_CHANNEL;

167176

const nodePath = await resolveStableNodePath(process.execPath);

168177

const argv = buildFinalizeArgv({

169178

nodePath,

170179

entrypoint,

171-

...(params.channel ? { channel: params.channel } : {}),

172180

...(perStepTimeoutMs === undefined ? {} : { timeoutMs: perStepTimeoutMs }),

173181

});

174182

// Pin the finalizer's host-compat resolution to the just-installed core

175183

// version so plugins reconcile against the new core, not the running process.

176184

const compatHostVersion = result.after?.version ?? undefined;

177-

const env = buildFinalizeEnv(params.env ?? process.env, compatHostVersion);

185+

const env = buildFinalizeEnv(params.env ?? process.env, effectiveChannel, compatHostVersion);

178186

// Outer whole-process backstop, decoupled from the per-step `--timeout` above.

179187

const processTimeoutMs = Math.max(

180188

FINALIZE_PROCESS_TIMEOUT_FLOOR_MS,