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

推荐订阅源

宝玉的分享
宝玉的分享
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
MyScale Blog
MyScale Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
SegmentFault 最新的问题
Y
Y Combinator Blog
月光博客
月光博客
IT之家
IT之家
T
Tailwind CSS Blog
Last Week in AI
Last Week in AI
L
LangChain Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
博客园 - Franky
WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
V
Visual Studio Blog
小众软件
小众软件
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
N
Netflix TechBlog - Medium

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): bound bundled runtime smoke commands · openclaw...
vincentkoc · 2026-05-27 · via Recent Commits to openclaw:main

@@ -21,6 +21,10 @@ const RPC_READY_TIMEOUT_MS = readPositiveInt(

2121

process.env.OPENCLAW_BUNDLED_PLUGIN_RUNTIME_RPC_READY_MS,

2222

210000,

2323

);

24+

const COMMAND_TIMEOUT_MS = readPositiveInt(

25+

process.env.OPENCLAW_BUNDLED_PLUGIN_RUNTIME_COMMAND_MS,

26+

120000,

27+

);

24282529

function readPositiveInt(raw, fallback) {

2630

const parsed = Number.parseInt(String(raw || ""), 10);

@@ -38,9 +42,7 @@ function writeJson(file, value) {

38423943

function manifestPath(pluginDir, pluginRoot) {

4044

const candidates = [

41-

...(isNonEmptyString(pluginRoot)

42-

? [path.join(pluginRoot, "openclaw.plugin.json")]

43-

: []),

45+

...(isNonEmptyString(pluginRoot) ? [path.join(pluginRoot, "openclaw.plugin.json")] : []),

4446

path.join(process.cwd(), "dist", "extensions", pluginDir, "openclaw.plugin.json"),

4547

path.join(process.cwd(), "dist-runtime", "extensions", pluginDir, "openclaw.plugin.json"),

4648

];

@@ -161,22 +163,47 @@ function formatCapturedOutput(label, buffer) {

161163

return `${prefix}${buffer.text}`;

162164

}

163165164-

function runCommand(command, args, options = {}) {

166+

export function runCommand(command, args, options = {}) {

165167

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

168+

const { timeoutMs = COMMAND_TIMEOUT_MS, ...spawnOptions } = options;

166169

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

167170

stdio: ["ignore", "pipe", "pipe"],

168-

...options,

171+

...spawnOptions,

169172

});

170173

let stdout = { text: "", truncatedChars: 0 };

171174

let stderr = { text: "", truncatedChars: 0 };

175+

let timedOut = false;

176+

let settled = false;

172177

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

173178

stdout = appendBoundedOutput(stdout, chunk);

174179

});

175180

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

176181

stderr = appendBoundedOutput(stderr, chunk);

177182

});

178-

child.on("error", reject);

183+

const clearCommandTimer = timeoutMs

184+

? setTimeout(() => {

185+

timedOut = true;

186+

child.kill("SIGKILL");

187+

}, timeoutMs)

188+

: undefined;

189+

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

190+

if (settled) {

191+

return;

192+

}

193+

settled = true;

194+

if (clearCommandTimer) {

195+

clearTimeout(clearCommandTimer);

196+

}

197+

reject(error);

198+

});

179199

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

200+

if (settled) {

201+

return;

202+

}

203+

settled = true;

204+

if (clearCommandTimer) {

205+

clearTimeout(clearCommandTimer);

206+

}

180207

if (status === 0) {

181208

resolve({

182209

stdout: stdout.text,

@@ -193,11 +220,10 @@ function runCommand(command, args, options = {}) {

193220

.filter(Boolean)

194221

.join("\n")

195222

.trim();

196-

reject(

197-

new Error(

198-

`${command} ${args.join(" ")} failed with ${signal || status}${detail ? `\n${detail}` : ""}`,

199-

),

200-

);

223+

const outcome = timedOut

224+

? `timed out after ${timeoutMs}ms`

225+

: `failed with ${signal || status}`;

226+

reject(new Error(`${command} ${args.join(" ")} ${outcome}${detail ? `\n${detail}` : ""}`));

201227

});

202228

});

203229

}