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

推荐订阅源

T
The Blog of Author Tim Ferriss
WordPress大学
WordPress大学
博客园 - Franky
The Cloudflare Blog
T
Tailwind CSS Blog
宝玉的分享
宝玉的分享
小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Apple Machine Learning Research
Apple Machine Learning Research
月光博客
月光博客
B
Blog
Y
Y Combinator Blog
V
V2EX
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
博客园 - 司徒正美
IT之家
IT之家
G
Google Developers Blog
C
Check Point Blog
Engineering at Meta
Engineering at Meta
Microsoft Security Blog
Microsoft Security Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

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(qa): pass Mantis desktop runtime env · openclaw/openc...
vincentkoc · 2026-05-04 · via Recent Commits to openclaw:main

@@ -18,43 +18,51 @@ describe("mantis desktop browser smoke runtime", () => {

1818

it("leases a desktop box, runs a visible browser, copies artifacts, and stops on pass", async () => {

1919

await fs.mkdir(path.join(repoRoot, "qa-artifacts"), { recursive: true });

2020

await fs.writeFile(path.join(repoRoot, "qa-artifacts", "timeline.html"), "<h1>Mantis</h1>");

21-

const commands: { args: readonly string[]; command: string }[] = [];

22-

const runner = vi.fn(async (command: string, args: readonly string[]) => {

23-

commands.push({ command, args });

24-

if (command === "/tmp/crabbox" && args[0] === "warmup") {

25-

return { stdout: "ready lease cbx_abc123\n", stderr: "" };

26-

}

27-

if (command === "/tmp/crabbox" && args[0] === "inspect") {

28-

return {

29-

stdout: `${JSON.stringify({

30-

host: "203.0.113.10",

31-

id: "cbx_abc123",

32-

provider: "hetzner",

33-

slug: "brisk-mantis",

34-

sshKey: "/tmp/key",

35-

sshPort: "2222",

36-

sshUser: "crabbox",

37-

state: "active",

38-

})}\n`,

39-

stderr: "",

40-

};

41-

}

42-

if (command === "rsync") {

43-

const outputDir = args.at(-1);

44-

expect(outputDir).toBeTypeOf("string");

45-

await fs.mkdir(outputDir as string, { recursive: true });

46-

await fs.writeFile(path.join(outputDir as string, "desktop-browser-smoke.png"), "png");

47-

await fs.writeFile(path.join(outputDir as string, "remote-metadata.json"), "{}\n");

48-

await fs.writeFile(path.join(outputDir as string, "chrome.log"), "chrome\n");

21+

const commands: { args: readonly string[]; command: string; env?: NodeJS.ProcessEnv }[] = [];

22+

const runtimeEnv = {

23+

PATH: process.env.PATH,

24+

CRABBOX_COORDINATOR_TOKEN: "runtime-token",

25+

OPENCLAW_MANTIS_CRABBOX_PROVIDER: "hetzner",

26+

};

27+

const runner = vi.fn(

28+

async (command: string, args: readonly string[], options: { env?: NodeJS.ProcessEnv }) => {

29+

commands.push({ command, args, env: options.env });

30+

if (command === "/tmp/crabbox" && args[0] === "warmup") {

31+

return { stdout: "ready lease cbx_abc123\n", stderr: "" };

32+

}

33+

if (command === "/tmp/crabbox" && args[0] === "inspect") {

34+

return {

35+

stdout: `${JSON.stringify({

36+

host: "203.0.113.10",

37+

id: "cbx_abc123",

38+

provider: "hetzner",

39+

slug: "brisk-mantis",

40+

sshKey: "/tmp/key",

41+

sshPort: "2222",

42+

sshUser: "crabbox",

43+

state: "active",

44+

})}\n`,

45+

stderr: "",

46+

};

47+

}

48+

if (command === "rsync") {

49+

const outputDir = args.at(-1);

50+

expect(outputDir).toBeTypeOf("string");

51+

await fs.mkdir(outputDir as string, { recursive: true });

52+

await fs.writeFile(path.join(outputDir as string, "desktop-browser-smoke.png"), "png");

53+

await fs.writeFile(path.join(outputDir as string, "remote-metadata.json"), "{}\n");

54+

await fs.writeFile(path.join(outputDir as string, "chrome.log"), "chrome\n");

55+

return { stdout: "", stderr: "" };

56+

}

4957

return { stdout: "", stderr: "" };

50-

}

51-

return { stdout: "", stderr: "" };

52-

});

58+

},

59+

);

53605461

const result = await runMantisDesktopBrowserSmoke({

5562

browserUrl: "https://openclaw.ai/docs",

5663

commandRunner: runner,

5764

crabboxBin: "/tmp/crabbox",

65+

env: runtimeEnv,

5866

htmlFile: "qa-artifacts/timeline.html",

5967

now: () => new Date("2026-05-04T12:00:00.000Z"),

6068

outputDir: ".artifacts/qa-e2e/mantis/desktop-browser-test",

@@ -69,6 +77,7 @@ describe("mantis desktop browser smoke runtime", () => {

6977

["rsync", "-az"],

7078

["/tmp/crabbox", "stop"],

7179

]);

80+

expect(commands.every((entry) => entry.env === runtimeEnv)).toBe(true);

7281

const rsyncArgs = commands.find((entry) => entry.command === "rsync")?.args ?? [];

7382

expect(rsyncArgs).not.toContain("--delete");

7483

expect(rsyncArgs).toEqual(