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

推荐订阅源

爱范儿
爱范儿
H
Help Net Security
Jina AI
Jina AI
T
The Blog of Author Tim Ferriss
宝玉的分享
宝玉的分享
博客园 - 叶小钗
Y
Y Combinator Blog
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
WordPress大学
WordPress大学
C
Check Point Blog
Recent Announcements
Recent Announcements
IT之家
IT之家
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
美团技术团队
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
SegmentFault 最新的问题
MyScale Blog
MyScale Blog
Apple Machine Learning Research
Apple Machine Learning Research
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
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(e2e): clean secret proof timeouts · openclaw/openclaw...
vincentkoc · 2026-06-01 · via Recent Commits to openclaw:main

@@ -223,31 +223,66 @@ function runCommand(command, args, options = {}) {

223223

return new Promise((resolve, reject) => {

224224

const child = childProcess.spawn(command, args, {

225225

cwd: options.cwd ?? process.cwd(),

226+

detached: options.detached ?? process.platform !== "win32",

226227

env: options.env ?? process.env,

227228

shell: options.shell,

228229

stdio: options.stdio ?? ["pipe", "pipe", "pipe"],

229230

windowsVerbatimArguments: options.windowsVerbatimArguments,

230231

});

231232

const stdout = createOutputCapture("stdout");

232233

const stderr = createOutputCapture("stderr");

234+

let timedOut = false;

235+

let killTimer;

233236

const timer = setTimeout(() => {

234-

child.kill("SIGTERM");

235-

setTimeout(() => child.kill("SIGKILL"), 1000).unref();

236-

reject(new Error(scrub(`command timed out: ${command} ${args.join(" ")}`)));

237+

timedOut = true;

238+

terminateProcessTree(child, "SIGTERM");

239+

killTimer = setTimeout(() => terminateProcessTree(child, "SIGKILL"), 1000);

240+

killTimer.unref();

237241

}, timeoutMs);

238-

child.stdout.on("data", (chunk) => {

242+

child.stdout?.on("data", (chunk) => {

239243

stdout.append(chunk);

240244

});

241-

child.stderr.on("data", (chunk) => {

245+

child.stderr?.on("data", (chunk) => {

242246

stderr.append(chunk);

243247

});

248+

const parentSignalHandlers = new Map();

249+

const removeParentSignalHandlers = () => {

250+

for (const [signal, handler] of parentSignalHandlers) {

251+

process.off(signal, handler);

252+

}

253+

parentSignalHandlers.clear();

254+

};

255+

if (process.platform !== "win32" && child.pid) {

256+

for (const signal of ["SIGHUP", "SIGINT", "SIGTERM"]) {

257+

const handler = () => {

258+

terminateProcessTree(child, signal);

259+

removeParentSignalHandlers();

260+

process.kill(process.pid, signal);

261+

};

262+

parentSignalHandlers.set(signal, handler);

263+

process.once(signal, handler);

264+

}

265+

}

244266

child.on("error", (error) => {

245267

clearTimeout(timer);

268+

if (killTimer) {

269+

clearTimeout(killTimer);

270+

}

271+

removeParentSignalHandlers();

246272

reject(error instanceof Error ? error : new Error(formatErrorMessage(error)));

247273

});

248274

child.on("close", (code, signal) => {

249275

clearTimeout(timer);

276+

if (killTimer) {

277+

clearTimeout(killTimer);

278+

}

279+

removeParentSignalHandlers();

250280

const result = { code: code ?? 0, signal, stdout: stdout.text(), stderr: stderr.text() };

281+

if (timedOut) {

282+

terminateProcessTree(child, "SIGKILL");

283+

reject(new Error(scrub(`command timed out: ${command} ${args.join(" ")}`)));

284+

return;

285+

}

251286

if (result.code !== 0 && options.allowFailure !== true) {

252287

reject(

253288

new Error(