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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
人人都是产品经理
人人都是产品经理
V
Visual Studio Blog
罗磊的独立博客
Last Week in AI
Last Week in AI
爱范儿
爱范儿
The Cloudflare Blog
有赞技术团队
有赞技术团队
博客园 - 三生石上(FineUI控件)
美团技术团队
Apple Machine Learning Research
Apple Machine Learning Research
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
IT之家
IT之家
博客园 - 【当耐特】
雷峰网
雷峰网
博客园_首页
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
量子位
V
V2EX

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 test: merge chat context notice checks · openclaw/openclaw@5c2f4af 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: trim hotspot wait overhead · openclaw/openclaw@12a59b0
steipete · 2026-04-17 · via Recent Commits to openclaw:main

@@ -2,7 +2,17 @@ import crypto from "node:crypto";

22

import fs from "node:fs";

33

import os from "node:os";

44

import path from "node:path";

5-

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

5+

import {

6+

afterAll,

7+

afterEach,

8+

beforeAll,

9+

beforeEach,

10+

describe,

11+

expect,

12+

it,

13+

type Mock,

14+

vi,

15+

} from "vitest";

616

import { clearRuntimeConfigSnapshot, setRuntimeConfigSnapshot } from "../config/config.js";

717

import type { SystemRunApprovalPlan } from "../infra/exec-approvals.js";

818

import { loadExecApprovals, saveExecApprovals } from "../infra/exec-approvals.js";

@@ -32,12 +42,30 @@ describe("formatSystemRunAllowlistMissMessage", () => {

3242

});

33433444

describe("handleSystemRunInvoke mac app exec host routing", () => {

45+

let sharedFixtureRoot = "";

46+

let sharedFixtureId = 0;

3547

let testOpenClawHome = "";

3648

let previousOpenClawHome: string | undefined;

374950+

beforeAll(() => {

51+

sharedFixtureRoot = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-node-host-fixtures-"));

52+

});

53+54+

afterAll(() => {

55+

if (sharedFixtureRoot) {

56+

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

57+

}

58+

});

59+60+

function createFixtureDir(prefix: string): string {

61+

const dir = path.join(sharedFixtureRoot, `${prefix}${sharedFixtureId++}`);

62+

fs.mkdirSync(dir, { recursive: true });

63+

return dir;

64+

}

65+3866

beforeEach(() => {

3967

previousOpenClawHome = process.env.OPENCLAW_HOME;

40-

testOpenClawHome = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-node-host-home-"));

68+

testOpenClawHome = createFixtureDir("openclaw-node-host-home-");

4169

process.env.OPENCLAW_HOME = testOpenClawHome;

4270

clearRuntimeConfigSnapshot();

4371

});

@@ -49,10 +77,7 @@ describe("handleSystemRunInvoke mac app exec host routing", () => {

4977

} else {

5078

process.env.OPENCLAW_HOME = previousOpenClawHome;

5179

}

52-

if (testOpenClawHome) {

53-

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

54-

testOpenClawHome = "";

55-

}

80+

testOpenClawHome = "";

5681

});

57825883

function createLocalRunResult(stdout = "local-ok") {

@@ -238,7 +263,7 @@ describe("handleSystemRunInvoke mac app exec host routing", () => {

238263

approvals: Parameters<typeof saveExecApprovals>[0];

239264

run: (ctx: { tempHome: string }) => Promise<T>;

240265

}): Promise<T> {

241-

const tempHome = fs.mkdtempSync(path.join(os.tmpdir(), "openclaw-exec-approvals-"));

266+

const tempHome = createFixtureDir("openclaw-exec-approvals-");

242267

const previousOpenClawHome = process.env.OPENCLAW_HOME;

243268

process.env.OPENCLAW_HOME = tempHome;

244269

saveExecApprovals(params.approvals);

@@ -250,15 +275,14 @@ describe("handleSystemRunInvoke mac app exec host routing", () => {

250275

} else {

251276

process.env.OPENCLAW_HOME = previousOpenClawHome;

252277

}

253-

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

254278

}

255279

}

256280257281

async function withPathTokenCommand<T>(params: {

258282

tmpPrefix: string;

259283

run: (ctx: { link: string; expected: string }) => Promise<T>;

260284

}): Promise<T> {

261-

const tmp = fs.mkdtempSync(path.join(os.tmpdir(), params.tmpPrefix));

285+

const tmp = createFixtureDir(params.tmpPrefix);

262286

const binDir = path.join(tmp, "bin");

263287

fs.mkdirSync(binDir, { recursive: true });

264288

const link = path.join(binDir, "poccmd");

@@ -274,15 +298,14 @@ describe("handleSystemRunInvoke mac app exec host routing", () => {

274298

} else {

275299

process.env.PATH = oldPath;

276300

}

277-

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

278301

}

279302

}

280303281304

async function withFakeRuntimeOnPath<T>(params: {

282305

runtime: "bun" | "deno" | "jiti" | "tsx";

283306

run: () => Promise<T>;

284307

}): Promise<T> {

285-

const tmp = fs.mkdtempSync(path.join(os.tmpdir(), `openclaw-${params.runtime}-path-`));

308+

const tmp = createFixtureDir(`openclaw-${params.runtime}-path-`);

286309

const binDir = path.join(tmp, "bin");

287310

fs.mkdirSync(binDir, { recursive: true });

288311

const runtimePath =

@@ -305,7 +328,6 @@ describe("handleSystemRunInvoke mac app exec host routing", () => {

305328

} else {

306329

process.env.PATH = oldPath;

307330

}

308-

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

309331

}

310332

}

311333