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

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
小众软件
小众软件
GbyAI
GbyAI
酷 壳 – CoolShell
酷 壳 – CoolShell
F
Fortinet All Blogs
博客园 - 三生石上(FineUI控件)
B
Blog
量子位
B
Blog RSS Feed
Vercel News
Vercel News
Blog — PlanetScale
Blog — PlanetScale
Last Week in AI
Last Week in AI
博客园 - 叶小钗
MongoDB | Blog
MongoDB | Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
爱范儿
爱范儿
Jina AI
Jina AI
C
Check Point Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
IT之家
IT之家
H
Hackread – Cybersecurity News, Data Breaches, AI and More
云风的 BLOG
云风的 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(qa): parse qa e2e wrapper flags · openclaw/openclaw@a...
vincentkoc · 2026-06-21 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -12,6 +12,11 @@ type QaE2eDeps = {

1212

writeStdout?: (text: string) => void;

1313

};

1414
15+

type QaE2eArgs = {

16+

help: boolean;

17+

outputPath: string;

18+

};

19+
1520

async function loadQaE2eRuntime(): Promise<QaE2eRuntime> {

1621

return await import("../extensions/qa-lab/api.js");

1722

}

@@ -23,18 +28,80 @@ export function enablePrivateQaScriptEnv(env: NodeJS.ProcessEnv = process.env) {

2328

}

2429
2530

export function resolveQaE2eOutputPath(argv: readonly string[] = process.argv.slice(2)) {

26-

return argv[0]?.trim() || ".artifacts/qa-e2e/self-check.md";

31+

return parseQaE2eArgs(argv).outputPath;

32+

}

33+
34+

export function usage(): string {

35+

return `Usage: pnpm qa:e2e [--output <path>]

36+
37+

Options:

38+

--output <path> Markdown report output path

39+

-h, --help Display help

40+

`;

41+

}

42+
43+

export function parseQaE2eArgs(argv: readonly string[]): QaE2eArgs {

44+

const args = argv[0] === "--" ? argv.slice(1) : argv;

45+

let outputPath = "";

46+

let positionalMode = false;

47+

for (let index = 0; index < args.length; index += 1) {

48+

const arg = args[index] ?? "";

49+

if (positionalMode) {

50+

if (!outputPath && arg.trim()) {

51+

outputPath = arg.trim();

52+

continue;

53+

}

54+

throw new Error(`Unexpected qa:e2e argument: ${arg}`);

55+

}

56+

if (arg === "--") {

57+

positionalMode = true;

58+

continue;

59+

}

60+

if (arg === "--help" || arg === "-h") {

61+

return { help: true, outputPath: ".artifacts/qa-e2e/self-check.md" };

62+

}

63+

const inlineOutput = arg.startsWith("--output=") ? arg.slice("--output=".length).trim() : null;

64+

if (inlineOutput !== null) {

65+

if (!inlineOutput) {

66+

throw new Error("--output requires a value");

67+

}

68+

outputPath = inlineOutput;

69+

continue;

70+

}

71+

if (arg === "--output") {

72+

const value = args[index + 1]?.trim();

73+

if (!value || value.startsWith("-")) {

74+

throw new Error("--output requires a value");

75+

}

76+

outputPath = value;

77+

index += 1;

78+

continue;

79+

}

80+

if (arg.startsWith("-")) {

81+

throw new Error(`Unknown qa:e2e option: ${arg}`);

82+

}

83+

if (outputPath) {

84+

throw new Error(`Unexpected qa:e2e argument: ${arg}`);

85+

}

86+

outputPath = arg.trim();

87+

}

88+

return { help: false, outputPath: outputPath || ".artifacts/qa-e2e/self-check.md" };

2789

}

2890
2991

export async function main(

3092

argv: readonly string[] = process.argv.slice(2),

3193

deps: QaE2eDeps = {},

3294

): Promise<number> {

95+

const args = parseQaE2eArgs(argv);

96+

if (args.help) {

97+

(deps.writeStdout ?? ((text: string) => process.stdout.write(text)))(usage());

98+

return 0;

99+

}

33100

enablePrivateQaScriptEnv(deps.env ?? process.env);

34101

const { isQaSelfCheckSuccessful, runQaE2eSelfCheck } = await (

35102

deps.loadRuntime ?? loadQaE2eRuntime

36103

)();

37-

const result = await runQaE2eSelfCheck({ outputPath: resolveQaE2eOutputPath(argv) });

104+

const result = await runQaE2eSelfCheck({ outputPath: args.outputPath });

38105

(deps.writeStdout ?? ((text: string) => process.stdout.write(text)))(

39106

`QA self-check report: ${result.outputPath}\n`,

40107

);

@@ -47,5 +114,10 @@ function isMainModule() {

47114

}

48115
49116

if (isMainModule()) {

50-

process.exitCode = await main();

117+

try {

118+

process.exitCode = await main();

119+

} catch (error) {

120+

process.stderr.write(`${error instanceof Error ? error.message : String(error)}\n`);

121+

process.exitCode = 1;

122+

}

51123

}

Original file line numberDiff line numberDiff line change

@@ -1,7 +1,12 @@

11

// Qa E2E tests cover qa e2e script behavior.

22

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

33

import type { QaSelfCheckResult } from "../../extensions/qa-lab/api.js";

4-

import { enablePrivateQaScriptEnv, main, resolveQaE2eOutputPath } from "../../scripts/qa-e2e.js";

4+

import {

5+

enablePrivateQaScriptEnv,

6+

main,

7+

parseQaE2eArgs,

8+

resolveQaE2eOutputPath,

9+

} from "../../scripts/qa-e2e.js";

510
611

function makeSelfCheckResult(status: "pass" | "fail"): QaSelfCheckResult {

712

return {

@@ -44,6 +49,50 @@ describe("qa-e2e script", () => {

4449

it("resolves the default self-check report path", () => {

4550

expect(resolveQaE2eOutputPath([])).toBe(".artifacts/qa-e2e/self-check.md");

4651

expect(resolveQaE2eOutputPath([".artifacts/custom.md"])).toBe(".artifacts/custom.md");

52+

expect(resolveQaE2eOutputPath(["--output", ".artifacts/custom.md"])).toBe(

53+

".artifacts/custom.md",

54+

);

55+

expect(resolveQaE2eOutputPath(["--", ".artifacts/custom.md"])).toBe(".artifacts/custom.md");

56+

});

57+
58+

it("prints help before enabling private QA or loading QA Lab", async () => {

59+

const env: NodeJS.ProcessEnv = {};

60+

const loadRuntime = vi.fn(async () => {

61+

throw new Error("runtime loaded");

62+

});

63+

const writeStdout = vi.fn();

64+
65+

await expect(main(["--help"], { env, loadRuntime, writeStdout })).resolves.toBe(0);

66+
67+

expect(loadRuntime).not.toHaveBeenCalled();

68+

expect(writeStdout).toHaveBeenCalledWith(expect.stringContaining("Usage: pnpm qa:e2e"));

69+

expect(env.OPENCLAW_BUILD_PRIVATE_QA).toBeUndefined();

70+

});

71+
72+

it("rejects unknown options before enabling private QA or loading QA Lab", async () => {

73+

const env: NodeJS.ProcessEnv = {};

74+

const loadRuntime = vi.fn(async () => {

75+

throw new Error("runtime loaded");

76+

});

77+
78+

await expect(main(["--wat"], { env, loadRuntime })).rejects.toThrow(

79+

"Unknown qa:e2e option: --wat",

80+

);

81+
82+

expect(loadRuntime).not.toHaveBeenCalled();

83+

expect(env.OPENCLAW_BUILD_PRIVATE_QA).toBeUndefined();

84+

});

85+
86+

it("parses explicit output flags and package-manager separators", () => {

87+

expect(parseQaE2eArgs(["--output=.artifacts/custom.md"])).toEqual({

88+

help: false,

89+

outputPath: ".artifacts/custom.md",

90+

});

91+

expect(parseQaE2eArgs(["--", ".artifacts/from-separator.md"])).toEqual({

92+

help: false,

93+

outputPath: ".artifacts/from-separator.md",

94+

});

95+

expect(() => parseQaE2eArgs(["--output", "--help"])).toThrow("--output requires a value");

4796

});

4897
4998

it.each([