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

推荐订阅源

MongoDB | Blog
MongoDB | Blog
宝玉的分享
宝玉的分享
博客园 - 三生石上(FineUI控件)
小众软件
小众软件
罗磊的独立博客
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
博客园 - 聂微东
博客园 - 司徒正美
博客园 - 叶小钗
T
Tailwind CSS Blog
博客园 - Franky
V
V2EX
有赞技术团队
有赞技术团队
美团技术团队
雷峰网
雷峰网
爱范儿
爱范儿
Jina AI
Jina AI
D
DataBreaches.Net
H
Help Net Security
酷 壳 – CoolShell
酷 壳 – CoolShell

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): keep telegram proof command groups tracked · op...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main
11

// Telegram User Crabbox Proof tests cover telegram user crabbox proof script behavior.

2-

import { spawnSync } from "node:child_process";

2+

import { spawn, spawnSync } from "node:child_process";

33

import fs from "node:fs";

44

import os from "node:os";

55

import path from "node:path";

66

import { setTimeout as delay } from "node:timers/promises";

7+

import { pathToFileURL } from "node:url";

78

import { afterEach, describe, expect, it, vi } from "vitest";

89

import {

910

COMMAND_TIMEOUT_MS,

@@ -310,6 +311,84 @@ setInterval(() => {}, 1000);

310311

}

311312

});

312313314+

posixIt("keeps closed command groups tracked for parent cleanup", async () => {

315+

const root = makeTempDir();

316+

const commandPath = path.join(root, "closed-command.mjs");

317+

const runnerPath = path.join(root, "closed-command-runner.mjs");

318+

const commandSettledPath = path.join(root, "command-settled");

319+

const descendantPidPath = path.join(root, "closed-command-descendant.pid");

320+

const descendantTermPath = path.join(root, "closed-command-descendant.term");

321+

let descendantPid = 0;

322+323+

fs.writeFileSync(

324+

commandPath,

325+

`

326+

import { spawn } from "node:child_process";

327+

import fs from "node:fs";

328+329+

const descendant = spawn(process.execPath, [

330+

"-e",

331+

${JSON.stringify(

332+

`const fs = require("node:fs");

333+

fs.writeFileSync(${JSON.stringify(descendantPidPath)}, String(process.pid));

334+

process.on("SIGTERM", () => {

335+

fs.writeFileSync(${JSON.stringify(descendantTermPath)}, "terminated");

336+

process.exit(0);

337+

});

338+

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

339+

)},

340+

], { stdio: "ignore" });

341+

descendant.unref();

342+

`,

343+

"utf8",

344+

);

345+

fs.writeFileSync(

346+

runnerPath,

347+

`

348+

import fs from "node:fs";

349+350+

const proof = await import(${JSON.stringify(

351+

pathToFileURL(path.resolve("scripts/e2e/telegram-user-crabbox-proof.ts")).href,

352+

)});

353+

await proof.runCommand({

354+

args: [${JSON.stringify(commandPath)}],

355+

command: process.execPath,

356+

cwd: ${JSON.stringify(root)},

357+

timeoutMs: 30_000,

358+

});

359+

fs.writeFileSync(${JSON.stringify(commandSettledPath)}, "1");

360+

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

361+

`,

362+

"utf8",

363+

);

364+365+

const runner = spawn(process.execPath, ["--import", "tsx", runnerPath], {

366+

cwd: process.cwd(),

367+

stdio: "ignore",

368+

});

369+

try {

370+

await waitFor(() => fs.existsSync(descendantPidPath));

371+

descendantPid = Number.parseInt(fs.readFileSync(descendantPidPath, "utf8"), 10);

372+

expect(isProcessAlive(descendantPid)).toBe(true);

373+

await waitFor(() => fs.existsSync(commandSettledPath));

374+

if (!runner.pid) {

375+

throw new Error("runner did not start");

376+

}

377+378+

process.kill(runner.pid, "SIGTERM");

379+380+

await waitFor(() => fs.existsSync(descendantTermPath));

381+

await waitFor(() => !isProcessAlive(descendantPid));

382+

} finally {

383+

if (runner.pid && isProcessAlive(runner.pid)) {

384+

process.kill(runner.pid, "SIGKILL");

385+

}

386+

if (descendantPid && isProcessAlive(descendantPid)) {

387+

process.kill(descendantPid, "SIGKILL");

388+

}

389+

}

390+

});

391+313392

posixIt("cleans local SUT children when gateway startup fails", async () => {

314393

const root = makeTempDir();

315394

const outputDir = makeTempDir();