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

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Troy Hunt's Blog
P
Proofpoint News Feed
V
Vulnerabilities – Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
Cyberwarzone
Cyberwarzone
T
Tor Project blog
Cisco Talos Blog
Cisco Talos Blog
S
Securelist
L
Lohrmann on Cybersecurity
Security Latest
Security Latest
T
Threatpost
H
Heimdal Security Blog
W
WeLiveSecurity
A
Arctic Wolf
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
G
GRAHAM CLULEY
IT之家
IT之家
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
TaoSecurity Blog
TaoSecurity Blog
A
About on SuperTechFans
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Last Week in AI
Last Week in AI
T
The Blog of Author Tim Ferriss
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Microsoft Azure Blog
Microsoft Azure Blog
Hugging Face - Blog
Hugging Face - Blog
Google DeepMind News
Google DeepMind News
量子位
Stack Overflow Blog
Stack Overflow Blog
Know Your Adversary
Know Your Adversary
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
WordPress大学
WordPress大学
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
AI
AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
Vercel News
Vercel News
C
Cyber Attacks, Cyber Crime and Cyber Security
Latest news
Latest news
D
Darknet – Hacking Tools, Hacker News & Cyber Security
大猫的无限游戏
大猫的无限游戏
Forbes - Security
Forbes - Security

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
test: speed up crabbox wrapper tests · openclaw/openclaw@5aaad5f
steipete · 2026-05-27 · via Recent Commits to openclaw:main

@@ -6,35 +6,24 @@ import { afterAll, beforeAll, describe, expect, it } from "vitest";

6677

const tempDirs: string[] = [];

88

const repoRoot = process.cwd();

9+

const fakeCrabboxBinDirs = new Map<string, string>();

9101011

function makeFakeCrabbox(helpText: string): string {

12+

const cached = fakeCrabboxBinDirs.get(helpText);

13+

if (cached) {

14+

return cached;

15+

}

1116

const binDir = mkdtempSync(path.join(tmpdir(), "openclaw-fake-crabbox-"));

1217

tempDirs.push(binDir);

1318

writeFakeCrabbox(binDir, helpText);

19+

fakeCrabboxBinDirs.set(helpText, binDir);

1420

return binDir;

1521

}

16221723

function writeFakeCrabbox(binDir: string, helpText: string): string {

1824

mkdirSync(binDir, { recursive: true });

1925

const crabboxPath = path.join(binDir, "crabbox");

2026

const helperPath = path.join(binDir, "fake-crabbox-json.cjs");

21-

const helperScript = [

22-

"const args = process.argv.slice(2);",

23-

'if (args[0] === "config" && args[1] === "show" && args.includes("--json")) {',

24-

" const status = Number.parseInt(process.env.OPENCLAW_FAKE_CRABBOX_CONFIG_STATUS || '0', 10);",

25-

" if (status !== 0) {",

26-

" process.stderr.write('config unavailable\\n');",

27-

" process.exit(status);",

28-

" }",

29-

' process.stdout.write(process.env.OPENCLAW_FAKE_CRABBOX_CONFIG_JSON || \'{"coordinator":"configured-broker","brokerAuth":"configured"}\');',

30-

" process.exit(0);",

31-

"}",

32-

"const scriptIndex = args.findIndex((arg) => arg === '--script' || arg === '-script');",

33-

"const scriptPath = scriptIndex >= 0 ? args[scriptIndex + 1] : '';",

34-

"const scriptContent = scriptPath ? require('node:fs').readFileSync(scriptPath, 'utf8') : '';",

35-

"console.log(JSON.stringify({ args, cwd: process.cwd(), scriptContent }));",

36-

].join("\n");

37-

writeFileSync(helperPath, `${helperScript}\n`, "utf8");

38273928

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

4029

const script = [

@@ -64,13 +53,48 @@ function writeFakeCrabbox(binDir: string, helpText: string): string {

6453

" fi",

6554

" done",

6655

"fi",

67-

`exec ${shellSingleQuote(process.execPath)} ${shellSingleQuote(helperPath)} "$@"`,

56+

'script_path=""',

57+

'previous_arg=""',

58+

'for arg in "$@"; do',

59+

' if [ "$previous_arg" = "--script" ] || [ "$previous_arg" = "-script" ]; then',

60+

' script_path="$arg"',

61+

" break",

62+

" fi",

63+

' previous_arg="$arg"',

64+

"done",

65+

'printf "%s\\0" "__OPENCLAW_FAKE_CRABBOX_V1__"',

66+

'printf "%s\\0" "$PWD"',

67+

'printf "%s\\0" "$#"',

68+

'for arg in "$@"; do',

69+

' printf "%s\\0" "$arg"',

70+

"done",

71+

'if [ -n "$script_path" ] && [ -f "$script_path" ]; then',

72+

' cat "$script_path"',

73+

"fi",

6874

].join("\n");

6975

writeFileSync(crabboxPath, `${script}\n`, "utf8");

7076

chmodSync(crabboxPath, 0o755);

7177

return crabboxPath;

7278

}

737980+

const helperScript = [

81+

"const args = process.argv.slice(2);",

82+

'if (args[0] === "config" && args[1] === "show" && args.includes("--json")) {',

83+

" const status = Number.parseInt(process.env.OPENCLAW_FAKE_CRABBOX_CONFIG_STATUS || '0', 10);",

84+

" if (status !== 0) {",

85+

" process.stderr.write('config unavailable\\n');",

86+

" process.exit(status);",

87+

" }",

88+

' process.stdout.write(process.env.OPENCLAW_FAKE_CRABBOX_CONFIG_JSON || \'{"coordinator":"configured-broker","brokerAuth":"configured"}\');',

89+

" process.exit(0);",

90+

"}",

91+

"const scriptIndex = args.findIndex((arg) => arg === '--script' || arg === '-script');",

92+

"const scriptPath = scriptIndex >= 0 ? args[scriptIndex + 1] : '';",

93+

"const scriptContent = scriptPath ? require('node:fs').readFileSync(scriptPath, 'utf8') : '';",

94+

"console.log(JSON.stringify({ args, cwd: process.cwd(), scriptContent }));",

95+

].join("\n");

96+

writeFileSync(helperPath, `${helperScript}\n`, "utf8");

97+7498

const script = [

7599

"#!/usr/bin/env node",

76100

"const args = process.argv.slice(2);",

@@ -104,6 +128,39 @@ function makeFakeGit(

104128

const binDir = mkdtempSync(path.join(tmpdir(), "openclaw-fake-git-"));

105129

tempDirs.push(binDir);

106130

const gitPath = path.join(binDir, "git");

131+

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

132+

const script = [

133+

"#!/bin/sh",

134+

'if [ "$1" = "worktree" ] && [ "$2" = "add" ]; then',

135+

' mkdir -p "$4"',

136+

" exit 0",

137+

"fi",

138+

'if [ "$1" = "-C" ] && [ "$3" = "sparse-checkout" ] && [ "$4" = "disable" ]; then',

139+

" exit 0",

140+

"fi",

141+

'if [ "$1" = "-C" ] && [ "$3" = "reset" ] && [ "$4" = "--mixed" ]; then',

142+

" exit 0",

143+

"fi",

144+

'if [ "$1" = "worktree" ] && [ "$2" = "remove" ]; then',

145+

" exit 0",

146+

"fi",

147+

...Object.entries(responses).flatMap(([key, response]) => {

148+

const args = key.split("\u0000");

149+

return [

150+

`if ${shellArgListCondition(args)}; then`,

151+

response.stdout ? ` printf "%s" ${shellSingleQuote(response.stdout)}` : "",

152+

response.stderr ? ` printf "%s" ${shellSingleQuote(response.stderr)} >&2` : "",

153+

` exit ${response.status ?? 0}`,

154+

"fi",

155+

].filter(Boolean);

156+

}),

157+

"exit 1",

158+

].join("\n");

159+

writeFileSync(gitPath, `${script}\n`, "utf8");

160+

chmodSync(gitPath, 0o755);

161+

return binDir;

162+

}

163+107164

const script = [

108165

"#!/usr/bin/env node",

109166

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

@@ -126,6 +183,14 @@ function makeFakeGit(

126183

return binDir;

127184

}

128185186+

function shellArgListCondition(args: string[]): string {

187+

const checks = [`[ "$#" -eq ${args.length} ]`];

188+

for (const [index, arg] of args.entries()) {

189+

checks.push(`[ "$${index + 1}" = ${shellSingleQuote(arg)} ]`);

190+

}

191+

return checks.join(" && ");

192+

}

193+129194

function runWrapper(

130195

helpText: string,

131196

args: string[],

@@ -170,6 +235,24 @@ function parseFakeCrabboxOutput(result: ReturnType<typeof runWrapper>): {

170235

cwd: string;

171236

scriptContent?: string;

172237

} {

238+

const marker = "__OPENCLAW_FAKE_CRABBOX_V1__\0";

239+

if (result.stdout.startsWith(marker)) {

240+

let offset = marker.length;

241+

const readField = () => {

242+

const end = result.stdout.indexOf("\0", offset);

243+

if (end < 0) {

244+

throw new Error("missing fake Crabbox output field terminator");

245+

}

246+

const value = result.stdout.slice(offset, end);

247+

offset = end + 1;

248+

return value;

249+

};

250+

const cwd = readField();

251+

const argCount = Number.parseInt(readField(), 10);

252+

const args = Array.from({ length: argCount }, () => readField());

253+

const scriptContent = result.stdout.slice(offset);

254+

return { args, cwd, scriptContent };

255+

}

173256

return JSON.parse(result.stdout.trim()) as {

174257

args: string[];

175258

cwd: string;

@@ -231,7 +314,7 @@ describe.concurrent("scripts/crabbox-wrapper", () => {

231314

);

232315233316

expect(result.status).toBe(0);

234-

expect(result.stdout).toContain('"local-container"');

317+

expect(parseFakeCrabboxOutput(result).args).toContain("local-container");

235318

});

236319237320

it("defaults AWS macOS runs to on-demand capacity", () => {

@@ -1238,7 +1321,7 @@ describe.concurrent("scripts/crabbox-wrapper", () => {

12381321

);

1239132212401323

expect(result.status).toBe(0);

1241-

expect(result.stdout).toContain('"docker"');

1324+

expect(parseFakeCrabboxOutput(result).args).toContain("docker");

12421325

expect(result.stderr).toContain(

12431326

"providers=hetzner,aws,local-container,blacksmith-testbox,docker,cloudflare",

12441327

);

@@ -1297,7 +1380,7 @@ describe.concurrent("scripts/crabbox-wrapper", () => {

12971380

]);

1298138112991382

expect(result.status, alias).toBe(0);

1300-

expect(result.stdout).toContain(`"${alias}"`);

1383+

expect(parseFakeCrabboxOutput(result).args).toContain(alias);

13011384

},

13021385

);

13031386

@@ -1312,7 +1395,7 @@ describe.concurrent("scripts/crabbox-wrapper", () => {

13121395

const result = runWrapper(helpText, ["run", "--provider", provider, "--", "echo ok"]);

1313139613141397

expect(result.status, provider).toBe(0);

1315-

expect(result.stdout).toContain(`"${provider}"`);

1398+

expect(parseFakeCrabboxOutput(result).args).toContain(provider);

13161399

}

13171400

});

13181401

@@ -1361,7 +1444,7 @@ describe.concurrent("scripts/crabbox-wrapper", () => {

13611444

);

1362144513631446

expect(result.status).toBe(0);

1364-

expect(result.stdout).not.toContain('"--no-sync"');

1447+

expect(parseFakeCrabboxOutput(result).args).not.toContain("--no-sync");

13651448

expect(result.stderr).toContain("syncing from temporary full checkout");

13661449

expect(parseFakeCrabboxOutput(result).cwd).toContain("openclaw-crabbox-sync-");

13671450

});

@@ -1971,7 +2054,7 @@ describe.concurrent("scripts/crabbox-wrapper", () => {

19712054

);

1972205519732056

expect(result.status).toBe(0);

1974-

expect(result.stdout).not.toContain('"--no-sync"');

2057+

expect(parseFakeCrabboxOutput(result).args).not.toContain("--no-sync");

19752058

expect(result.stderr).toContain("syncing from temporary full checkout");

19762059

expect(parseFakeCrabboxOutput(result).cwd).toContain("openclaw-crabbox-sync-");

19772060

});