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

推荐订阅源

雷峰网
雷峰网
IT之家
IT之家
Last Week in AI
Last Week in AI
J
Java Code Geeks
L
LangChain Blog
Recent Announcements
Recent Announcements
Martin Fowler
Martin Fowler
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
博客园 - Franky
博客园 - 司徒正美
月光博客
月光博客
博客园 - 叶小钗
Vercel News
Vercel News
腾讯CDC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
小众软件
小众软件
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
GbyAI
GbyAI
B
Blog RSS Feed
人人都是产品经理
人人都是产品经理
H
Help Net Security
G
Google Developers Blog
D
DataBreaches.Net

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): match git channel + decouple finalize proces...
masatohoshin · 2026-06-18 · via Recent Commits to openclaw:main

@@ -21,10 +21,18 @@ 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 { DEFAULT_GIT_CHANNEL, type UpdateChannel } from "./update-channels.js";

2525

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

262627-

const DEFAULT_FINALIZE_TIMEOUT_MS = 30 * 60_000;

27+

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

28+

// steps (doctor + plugin update/convergence), each bounded by its own per-step

29+

// `--timeout`. The outer process kill must therefore be larger than a single

30+

// per-step bound, or a valid multi-step run would be killed and falsely reported

31+

// as `post-core-plugin-finalize-failed` (blocking the restart). We use a generous

32+

// floor and, when a larger per-step timeout is requested, scale the outer bound

33+

// above it rather than reusing the per-step value as the whole-process kill.

34+

const FINALIZE_PROCESS_TIMEOUT_FLOOR_MS = 30 * 60_000;

35+

const FINALIZE_PROCESS_STEP_BUDGET_MULTIPLIER = 6;

28362937

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

3038

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

@@ -146,27 +154,37 @@ export async function runPostCoreFinalizeAfterGatewayUpdate(params: {

146154

}

147155148156

const spawnFinalize = params.spawnFinalize ?? defaultFinalizeSpawner;

149-

const timeoutMs =

157+

const perStepTimeoutMs =

150158

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

151159

? params.timeoutMs

152160

: undefined;

161+

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

162+

// defaults the core update to the git/dev channel (`opts.channel ?? "dev"`).

163+

// Match it so the finalizer converges official plugins on the same channel as

164+

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

165+

const channel = params.channel ?? DEFAULT_GIT_CHANNEL;

153166

const nodePath = await resolveStableNodePath(process.execPath);

154167

const argv = buildFinalizeArgv({

155168

nodePath,

156169

entrypoint,

157-

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

158-

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

170+

channel,

171+

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

159172

});

160173

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

161174

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

162175

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

163176

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

177+

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

178+

const processTimeoutMs = Math.max(

179+

FINALIZE_PROCESS_TIMEOUT_FLOOR_MS,

180+

(perStepTimeoutMs ?? 0) * FINALIZE_PROCESS_STEP_BUDGET_MULTIPLIER,

181+

);

164182165183

try {

166184

const spawnResult = await spawnFinalize({

167185

argv,

168186

cwd: path.dirname(entrypoint),

169-

timeoutMs: timeoutMs ?? DEFAULT_FINALIZE_TIMEOUT_MS,

187+

timeoutMs: processTimeoutMs,

170188

env,

171189

});

172190

if (spawnResult.code === 0) {