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

推荐订阅源

U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
博客园 - 【当耐特】
人人都是产品经理
人人都是产品经理
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
Blog — PlanetScale
Blog — PlanetScale
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
Jina AI
Jina AI
小众软件
小众软件
博客园 - 叶小钗
MongoDB | Blog
MongoDB | Blog
大猫的无限游戏
大猫的无限游戏
博客园 - 聂微东
Y
Y Combinator Blog
云风的 BLOG
云风的 BLOG
I
InfoQ
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Martin Fowler
Martin Fowler
P
Proofpoint News Feed
MyScale Blog
MyScale 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
test: clarify sandbox fs bridge shell assertions · opencl...
steipete · 2026-05-08 · via Recent Commits to openclaw:main

@@ -12,6 +12,14 @@ import {

1212

withTempDir,

1313

} from "./fs-bridge.test-helpers.js";

141415+

function expectNoScriptsContaining(scripts: string[], needle: string) {

16+

expect(scripts.filter((script) => script.includes(needle))).toEqual([]);

17+

}

18+19+

function expectSomeScriptContaining(scripts: string[], needle: string) {

20+

expect(scripts.filter((script) => script.includes(needle)).length).toBeGreaterThan(0);

21+

}

22+1523

describe("sandbox fs bridge shell compatibility", () => {

1624

installFsBridgeTestHarness();

1725

@@ -41,9 +49,9 @@ describe("sandbox fs bridge shell compatibility", () => {

4149

const scripts = getScriptsFromCalls();

4250

const executables = mockedExecDockerRaw.mock.calls.map(([args]) => args[3] ?? "");

435144-

expect(executables.every((shell) => shell === "sh")).toBe(true);

45-

expect(scripts.every((script) => /set -eu[;\n]/.test(script))).toBe(true);

46-

expect(scripts.some((script) => script.includes("pipefail"))).toBe(false);

52+

expect(executables.filter((shell) => shell !== "sh")).toEqual([]);

53+

expect(scripts.filter((script) => !/set -eu[;\n]/.test(script))).toEqual([]);

54+

expectNoScriptsContaining(scripts, "pipefail");

4755

});

4856

});

4957

@@ -131,13 +139,11 @@ describe("sandbox fs bridge shell compatibility", () => {

131139

await bridge.writeFile({ filePath: "b.txt", data: "hello" });

132140133141

const scripts = getScriptsFromCalls();

134-

expect(scripts.some((script) => script.includes("python3 - \"$@\" <<'PY'"))).toBe(false);

135-

expect(

136-

scripts.some((script) => script.includes('exec "$python_cmd" -c "$python_script" "$@"')),

137-

).toBe(true);

138-

expect(scripts.some((script) => script.includes('cat >"$1"'))).toBe(false);

139-

expect(scripts.some((script) => script.includes('cat >"$tmp"'))).toBe(false);

140-

expect(scripts.some((script) => script.includes("os.replace("))).toBe(true);

142+

expectNoScriptsContaining(scripts, "python3 - \"$@\" <<'PY'");

143+

expectSomeScriptContaining(scripts, 'exec "$python_cmd" -c "$python_script" "$@"');

144+

expectNoScriptsContaining(scripts, 'cat >"$1"');

145+

expectNoScriptsContaining(scripts, 'cat >"$tmp"');

146+

expectSomeScriptContaining(scripts, "os.replace(");

141147

});

142148143149

it("routes mkdirp, remove, and rename through the pinned mutation helper", async () => {

@@ -152,9 +158,9 @@ describe("sandbox fs bridge shell compatibility", () => {

152158153159

const scripts = getScriptsFromCalls();

154160

expect(scripts.filter((script) => script.includes("operation = sys.argv[1]")).length).toBe(3);

155-

expect(scripts.some((script) => script.includes('mkdir -p -- "$2"'))).toBe(false);

156-

expect(scripts.some((script) => script.includes('rm -f -- "$2"'))).toBe(false);

157-

expect(scripts.some((script) => script.includes('mv -- "$3" "$2/$4"'))).toBe(false);

161+

expectNoScriptsContaining(scripts, 'mkdir -p -- "$2"');

162+

expectNoScriptsContaining(scripts, 'rm -f -- "$2"');

163+

expectNoScriptsContaining(scripts, 'mv -- "$3" "$2/$4"');

158164

});

159165

});

160166

@@ -173,6 +179,6 @@ describe("sandbox fs bridge shell compatibility", () => {

173179

);

174180175181

const scripts = getScriptsFromCalls();

176-

expect(scripts.some((script) => script.includes("os.replace("))).toBe(false);

182+

expectNoScriptsContaining(scripts, "os.replace(");

177183

});

178184

});