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

推荐订阅源

B
Blog RSS Feed
B
Blog
N
Netflix TechBlog - Medium
量子位
月光博客
月光博客
博客园_首页
博客园 - Franky
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
T
The Blog of Author Tim Ferriss
Hugging Face - Blog
Hugging Face - Blog
雷峰网
雷峰网
M
MIT News - Artificial intelligence
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
腾讯CDC
Engineering at Meta
Engineering at Meta
云风的 BLOG
云风的 BLOG
L
LangChain Blog
GbyAI
GbyAI
IT之家
IT之家
Y
Y Combinator 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(agents): stop local service process trees · openclaw/...
vincentkoc · 2026-06-18 · via Recent Commits to openclaw:main

@@ -6,6 +6,7 @@ import path from "node:path";

66

import { MAX_TIMER_TIMEOUT_MS } from "@openclaw/normalization-core/number-coercion";

77

import type { Model } from "openclaw/plugin-sdk/llm";

88

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

9+

import { killPidIfAlive, readPidFile, waitForPidToExit } from "../test-utils/process-tree.js";

910

import {

1011

attachModelProviderLocalService,

1112

ensureModelProviderLocalService,

@@ -301,6 +302,8 @@ describe("provider local service", () => {

301302

const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-local-service-restart-"));

302303

const startsPath = path.join(tempDir, "starts.txt");

303304

const statusPath = path.join(tempDir, "status.txt");

305+

const forkedPidPath = path.join(tempDir, "forked.pid");

306+

let firstForkedPid: number | undefined;

304307

const model = attachModelProviderLocalService(

305308

{

306309

id: "demo",

@@ -312,7 +315,9 @@ describe("provider local service", () => {

312315

command: process.execPath,

313316

args: [

314317

"-e",

315-

`const fs=require("node:fs");const http=require("node:http");fs.appendFileSync(${JSON.stringify(

318+

`const fs=require("node:fs");const http=require("node:http");const {spawn}=require("node:child_process");const fork=spawn(process.execPath,["-e","setInterval(() => {}, 1000)"],{stdio:"ignore"});fs.writeFileSync(${JSON.stringify(

319+

forkedPidPath,

320+

)},String(fork.pid));fs.appendFileSync(${JSON.stringify(

316321

startsPath,

317322

)},"start\\n");fs.writeFileSync(${JSON.stringify(

318323

statusPath,

@@ -330,6 +335,7 @@ describe("provider local service", () => {

330335

const firstLease = await ensureModelProviderLocalService(model);

331336

firstLease?.release();

332337

expect((await fetch(healthUrl)).ok).toBe(true);

338+

firstForkedPid = await readPidFile(forkedPidPath);

333339334340

await fs.writeFile(statusPath, "down", "utf8");

335341

expect((await fetch(healthUrl)).status).toBe(503);

@@ -339,11 +345,13 @@ describe("provider local service", () => {

339345

throw new Error("Expected restarted provider local service lease");

340346

}

341347

expect((await fetch(healthUrl)).ok).toBe(true);

348+

expect(await waitForPidToExit(firstForkedPid)).toBe(true);

342349

secondLease.release();

343350344351

const starts = (await fs.readFile(startsPath, "utf8")).trim().split("\n");

345352

expect(starts).toHaveLength(2);

346353

} finally {

354+

killPidIfAlive(firstForkedPid);

347355

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

348356

}

349357

});