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

推荐订阅源

Vercel News
Vercel News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
雷峰网
雷峰网
有赞技术团队
有赞技术团队
罗磊的独立博客
博客园 - 叶小钗
Jina AI
Jina AI
博客园 - 司徒正美
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
Apple Machine Learning Research
Apple Machine Learning Research
阮一峰的网络日志
阮一峰的网络日志
Microsoft Security Blog
Microsoft Security Blog
大猫的无限游戏
大猫的无限游戏
量子位
MyScale Blog
MyScale Blog
V
Visual Studio Blog
博客园 - 聂微东
The Cloudflare Blog
Engineering at Meta
Engineering at Meta
小众软件
小众软件
宝玉的分享
宝玉的分享

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(scripts): finalize cross-os commands on signal · open...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main

@@ -1370,6 +1370,77 @@ describe("scripts/openclaw-cross-os-release-checks", () => {

13701370

}

13711371

});

137213721373+

it("exits promptly after externally signaled commands close", async () => {

1374+

if (process.platform === "win32") {

1375+

return;

1376+

}

1377+1378+

const dir = mkdtempSync(join(tmpdir(), "openclaw-cross-os-run-command-signal-exit-"));

1379+

const childPidPath = join(dir, "child.pid");

1380+

const logPath = join(dir, "signal.log");

1381+

const scriptUrl = pathToFileURL(

1382+

resolvePath("scripts/openclaw-cross-os-release-checks.ts"),

1383+

).href;

1384+

let childPid: number | undefined;

1385+

let runnerPid: number | undefined;

1386+1387+

try {

1388+

const childScript = "setInterval(() => {}, 1000);";

1389+

const parentScript = [

1390+

"const { spawn } = require('node:child_process');",

1391+

"const fs = require('node:fs');",

1392+

`const child = spawn(process.execPath, ['-e', ${JSON.stringify(childScript)}], { stdio: 'ignore' });`,

1393+

"process.stdout.write('signal cleanup log sentinel\\n', () => {",

1394+

" fs.writeFileSync(process.env.OPENCLAW_TEST_CHILD_PID, String(child.pid));",

1395+

"});",

1396+

"setInterval(() => {}, 1000);",

1397+

].join("");

1398+

const runnerScript = [

1399+

`import { runCommand } from ${JSON.stringify(scriptUrl)};`,

1400+

`await runCommand(process.execPath, ['-e', ${JSON.stringify(parentScript)}], {`,

1401+

` cwd: ${JSON.stringify(dir)},`,

1402+

` env: process.env,`,

1403+

` logPath: ${JSON.stringify(logPath)},`,

1404+

` timeoutMs: 60000,`,

1405+

`});`,

1406+

].join("\n");

1407+

const runner = spawn(

1408+

process.execPath,

1409+

["--import", "tsx", "--input-type=module", "-e", runnerScript],

1410+

{

1411+

cwd: process.cwd(),

1412+

env: {

1413+

...process.env,

1414+

OPENCLAW_CROSS_OS_PROCESS_TREE_KILL_AFTER_MS: "3000",

1415+

OPENCLAW_TEST_CHILD_PID: childPidPath,

1416+

},

1417+

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

1418+

},

1419+

);

1420+

runnerPid = runner.pid;

1421+1422+

await waitForFile(childPidPath, 2_000);

1423+

childPid = Number.parseInt(readFileSync(childPidPath, "utf8"), 10);

1424+

const signaledAt = Date.now();

1425+

runner.kill("SIGTERM");

1426+

const result = await waitForExit(runner, 5_000);

1427+

const elapsedMs = Date.now() - signaledAt;

1428+1429+

expect(result).toEqual({ signal: null, status: 143 });

1430+

expect(elapsedMs).toBeLessThan(2_000);

1431+

expect(readFileSync(logPath, "utf8")).toContain("signal cleanup log sentinel");

1432+

await waitForDead(childPid, 2_000);

1433+

} finally {

1434+

if (runnerPid !== undefined && isProcessAlive(runnerPid)) {

1435+

process.kill(runnerPid, "SIGKILL");

1436+

}

1437+

if (childPid !== undefined && isProcessAlive(childPid)) {

1438+

process.kill(childPid, "SIGKILL");

1439+

}

1440+

rmSync(dir, { recursive: true, force: true });

1441+

}

1442+

});

1443+13731444

it("derives the installed prefix from resolved CLI paths", () => {

13741445

expect(

13751446

resolveInstalledPrefixDirFromCliPath(