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

推荐订阅源

V
Visual Studio Blog
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
V
V2EX
博客园_首页
Engineering at Meta
Engineering at Meta
博客园 - 聂微东
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
H
Help Net Security
A
About on SuperTechFans
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Blog — PlanetScale
Blog — PlanetScale
W
WeLiveSecurity
云风的 BLOG
云风的 BLOG
D
Docker
Security Archives - TechRepublic
Security Archives - TechRepublic
Help Net Security
Help Net Security
N
News and Events Feed by Topic
Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
A
Arctic Wolf
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
aimingoo的专栏
aimingoo的专栏
Hacker News: Ask HN
Hacker News: Ask HN
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy International News Feed
T
Troy Hunt's Blog
T
Tenable Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Recorded Future
Recorded Future
F
Fortinet All Blogs
D
DataBreaches.Net
B
Blog
T
Threat Research - Cisco Blogs
MyScale Blog
MyScale Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
The GitHub Blog
The GitHub Blog
Security Latest
Security Latest
M
MIT News - Artificial intelligence

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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
fix(test): escalate e2e watchdog termination · openclaw/openclaw@beb25d6
vincentkoc · 2026-05-28 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -53,6 +53,17 @@ const child = spawn(command, args, {

5353

stdio: "inherit",

5454

});

5555

let timedOut = false;

56+

let parentSignal = null;

57+

let parentSignalTimer = null;

58+

const signalExitCodes = new Map([

59+

["SIGHUP", 129],

60+

["SIGINT", 130],

61+

["SIGTERM", 143],

62+

]);

63+

const killGraceMs = Number.parseInt(

64+

process.env.OPENCLAW_DOCKER_TIMEOUT_KILL_GRACE_MS || "30000",

65+

10,

66+

);

5667

const killTarget = process.platform === "win32" ? child.pid : -child.pid;

5768

const killChild = (signal) => {

5869

if (!child.pid) {

@@ -70,18 +81,35 @@ const timer = setTimeout(() => {

7081

timedOut = true;

7182

console.error(`Docker command timed out after ${timeoutValue}`);

7283

killChild("SIGTERM");

73-

setTimeout(() => killChild("SIGKILL"), 30_000).unref();

84+

setTimeout(() => killChild("SIGKILL"), killGraceMs).unref();

7485

}, timeoutMs);

7586

const forwardSignal = (signal) => {

87+

if (parentSignal) {

88+

killChild("SIGKILL");

89+

process.exit(signalExitCodes.get(signal) ?? 1);

90+

}

91+

parentSignal = signal;

92+

clearTimeout(timer);

7693

killChild(signal);

94+

parentSignalTimer = setTimeout(() => {

95+

killChild("SIGKILL");

96+

process.exit(signalExitCodes.get(signal) ?? 1);

97+

}, killGraceMs);

98+

parentSignalTimer.unref();

7799

};

78100

process.once("SIGINT", forwardSignal);

79101

process.once("SIGTERM", forwardSignal);

80102

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

81103

clearTimeout(timer);

104+

if (parentSignalTimer) {

105+

clearTimeout(parentSignalTimer);

106+

}

82107

if (timedOut) {

83108

process.exit(124);

84109

}

110+

if (parentSignal) {

111+

process.exit(signalExitCodes.get(parentSignal) ?? 1);

112+

}

85113

if (code !== null) {

86114

process.exit(code);

87115

}

Original file line numberDiff line numberDiff line change

@@ -91,6 +91,17 @@ const child = spawn(command, args, {

9191

stdio: "inherit",

9292

});

9393

let timedOut = false;

94+

let parentSignal = null;

95+

let parentSignalTimer = null;

96+

const signalExitCodes = new Map([

97+

["SIGHUP", 129],

98+

["SIGINT", 130],

99+

["SIGTERM", 143],

100+

]);

101+

const killGraceMs = Number.parseInt(

102+

process.env.OPENCLAW_E2E_TIMEOUT_KILL_GRACE_MS || "30000",

103+

10,

104+

);

94105

const killTarget = process.platform === "win32" ? child.pid : -child.pid;

95106

const killChild = (signal) => {

96107

if (!child.pid) {

@@ -108,18 +119,35 @@ const timer = setTimeout(() => {

108119

timedOut = true;

109120

console.error(`OpenClaw E2E command timed out after ${timeoutValue}`);

110121

killChild("SIGTERM");

111-

setTimeout(() => killChild("SIGKILL"), 30_000).unref();

122+

setTimeout(() => killChild("SIGKILL"), killGraceMs).unref();

112123

}, timeoutMs);

113124

const forwardSignal = (signal) => {

125+

if (parentSignal) {

126+

killChild("SIGKILL");

127+

process.exit(signalExitCodes.get(signal) ?? 1);

128+

}

129+

parentSignal = signal;

130+

clearTimeout(timer);

114131

killChild(signal);

132+

parentSignalTimer = setTimeout(() => {

133+

killChild("SIGKILL");

134+

process.exit(signalExitCodes.get(signal) ?? 1);

135+

}, killGraceMs);

136+

parentSignalTimer.unref();

115137

};

116138

process.once("SIGINT", forwardSignal);

117139

process.once("SIGTERM", forwardSignal);

118140

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

119141

clearTimeout(timer);

142+

if (parentSignalTimer) {

143+

clearTimeout(parentSignalTimer);

144+

}

120145

if (timedOut) {

121146

process.exit(124);

122147

}

148+

if (parentSignal) {

149+

process.exit(signalExitCodes.get(parentSignal) ?? 1);

150+

}

123151

if (code !== null) {

124152

process.exit(code);

125153

}

Original file line numberDiff line numberDiff line change

@@ -516,6 +516,68 @@ stderr="$(<"$TMPDIR/stderr")"

516516

}

517517

});

518518
519+

it("escalates Docker watchdog children that ignore parent termination", () => {

520+

const workDir = mkdtempSync(join(tmpdir(), "openclaw-docker-node-signal-"));

521+
522+

try {

523+

const binDir = join(workDir, "bin");

524+

mkdirSync(binDir);

525+

writeFileSync(

526+

join(binDir, "node"),

527+

`#!/bin/bash\nexec ${shellQuote(process.execPath)} "$@"\n`,

528+

);

529+

writeFileSync(

530+

join(binDir, "docker"),

531+

`#!/bin/bash

532+

printf "%s\\n" "$$" >"$TMPDIR/docker-pid"

533+

printf "%s\\n" "$PPID" >"$TMPDIR/watchdog-pid"

534+

trap "" TERM

535+

while true; do /bin/sleep 1; done

536+

`,

537+

);

538+

chmodSync(join(binDir, "node"), 0o755);

539+

chmodSync(join(binDir, "docker"), 0o755);

540+

const rootDir = process.cwd();

541+

const script = `

542+

set -euo pipefail

543+

ROOT_DIR=${shellQuote(rootDir)}

544+

TMPDIR=${shellQuote(workDir)}

545+

export ROOT_DIR TMPDIR

546+

export PATH="$TMPDIR/bin"

547+

export DOCKER_COMMAND_TIMEOUT=30s

548+

export OPENCLAW_DOCKER_TIMEOUT_KILL_GRACE_MS=100

549+
550+

source "$ROOT_DIR/scripts/lib/docker-e2e-container.sh"

551+
552+

docker_e2e_docker_cmd run demo &

553+

watchdog_pid="$!"

554+

for ((i = 0; i < 100; i += 1)); do

555+

[ -s "$TMPDIR/docker-pid" ] && [ -s "$TMPDIR/watchdog-pid" ] && break

556+

/bin/sleep 0.02

557+

done

558+

[ -s "$TMPDIR/docker-pid" ]

559+

[ -s "$TMPDIR/watchdog-pid" ]

560+

kill -TERM "$(/bin/cat "$TMPDIR/watchdog-pid")"

561+

set +e

562+

wait "$watchdog_pid"

563+

status="$?"

564+

set -e

565+

[ "$status" = "143" ]

566+

docker_pid="$(/bin/cat "$TMPDIR/docker-pid")"

567+

for ((i = 0; i < 100; i += 1)); do

568+

kill -0 "$docker_pid" 2>/dev/null || exit 0

569+

/bin/sleep 0.02

570+

done

571+

echo "docker child still alive after watchdog termination" >&2

572+

exit 1

573+

`;

574+
575+

execFileSync("bash", ["-lc", script], { encoding: "utf8" });

576+

} finally {

577+

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

578+

}

579+

});

580+
519581

it("uses plain timeout when kill-after is unsupported", () => {

520582

const workDir = mkdtempSync(join(tmpdir(), "openclaw-docker-plain-timeout-"));

521583
Original file line numberDiff line numberDiff line change

@@ -378,6 +378,72 @@ describe("scripts/lib/openclaw-e2e-instance.sh", () => {

378378

}

379379

});

380380
381+

it("escalates Node watchdog children that ignore parent termination", () => {

382+

const tempDir = fs.mkdtempSync(

383+

path.join(os.tmpdir(), "openclaw-e2e-instance-node-watchdog-signal-"),

384+

);

385+

try {

386+

writeNodeShim(tempDir);

387+

const childPath = path.join(tempDir, "ignore-term.cjs");

388+

const pidPath = path.join(tempDir, "child.pid");

389+

const watchdogPidPath = path.join(tempDir, "watchdog.pid");

390+

fs.writeFileSync(

391+

childPath,

392+

[

393+

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

394+

"fs.writeFileSync(process.argv[2], String(process.pid));",

395+

"fs.writeFileSync(process.argv[3], String(process.ppid));",

396+

"process.on('SIGTERM', () => {});",

397+

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

398+

"",

399+

].join("\n"),

400+

);

401+
402+

const script = `

403+

set -euo pipefail

404+

source ${shellQuote(helperPath)}

405+

export OPENCLAW_E2E_TIMEOUT_KILL_GRACE_MS=100

406+

openclaw_e2e_maybe_timeout 30s node ${shellQuote(childPath)} ${shellQuote(pidPath)} ${shellQuote(watchdogPidPath)} &

407+

wrapper_pid="$!"

408+

for ((i = 0; i < 100; i += 1)); do

409+

[ -s ${shellQuote(pidPath)} ] && [ -s ${shellQuote(watchdogPidPath)} ] && break

410+

/bin/sleep 0.02

411+

done

412+

[ -s ${shellQuote(pidPath)} ]

413+

[ -s ${shellQuote(watchdogPidPath)} ]

414+

kill -TERM "$(/bin/cat ${shellQuote(watchdogPidPath)})"

415+

set +e

416+

wait "$wrapper_pid"

417+

status="$?"

418+

set -e

419+

[ "$status" = "143" ]

420+

child_pid="$(/bin/cat ${shellQuote(pidPath)})"

421+

for ((i = 0; i < 100; i += 1)); do

422+

kill -0 "$child_pid" 2>/dev/null || exit 0

423+

/bin/sleep 0.02

424+

done

425+

echo "child still alive after watchdog termination" >&2

426+

exit 1

427+

`;

428+
429+

const result = spawnSync(

430+

"/bin/bash",

431+

["-c", script],

432+

{

433+

encoding: "utf8",

434+

env: shellTestEnv({

435+

PATH: tempDir,

436+

}),

437+

timeout: 5_000,

438+

},

439+

);

440+
441+

expectShellSuccess(result);

442+

} finally {

443+

fs.rmSync(tempDir, { force: true, recursive: true });

444+

}

445+

});

446+
381447

it("bounds HTTP readiness probes when a server accepts connections but never responds", () => {

382448

const tempDir = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-e2e-http-probe-"));

383449

try {