fix(qa): enable private self-check runtime · openclaw/openclaw@0fb1de5
vincentkoc
·
2026-05-21
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -14,6 +14,7 @@ Docs: https://docs.openclaw.ai
|
14 | 14 | - Mac app: show OpenClaw Foundation as the About settings copyright owner and align the root MIT license notice. |
15 | 15 | - Memory/search: stop recall tracking from writing dreaming side-effect artifacts when `dreaming.enabled=false`, while preserving normal search results. Fixes #84436. (#84444) Thanks @NianJiuZst. |
16 | 16 | - Diffs: render viewer toolbar icons from a closed icon-name map instead of HTML strings, removing the toolbar icon XSS sink. (#83955) Thanks @tanshanshan. |
| 17 | +- QA: keep `pnpm qa:e2e` self-check runs inside the private QA runtime envelope even when inherited shell env disables bundled plugins. |
17 | 18 | - fix(config): validate browser sandbox bind sources [AI]. (#84799) Thanks @pgondhi987. |
18 | 19 | - doctor: constrain legacy plugin cleanup paths [AI]. (#84801) Thanks @pgondhi987. |
19 | 20 | - Update/doctor: prune stale local bundled plugin install records that point at old compiled bundled output so current bundled plugin schemas win after upgrade. (#84863) Thanks @fuller-stack-dev. |
|
| Original file line number | Diff line number | Diff line change |
|---|
|
1 | | -import { runQaE2eSelfCheck } from "../extensions/qa-lab/api.js"; |
| 1 | +import { pathToFileURL } from "node:url"; |
2 | 2 | |
3 | | -const outputPath = process.argv[2]?.trim() || ".artifacts/qa-e2e/self-check.md"; |
| 3 | +export function enablePrivateQaScriptEnv(env: NodeJS.ProcessEnv = process.env) { |
| 4 | +env.OPENCLAW_BUILD_PRIVATE_QA = "1"; |
| 5 | +env.OPENCLAW_ENABLE_PRIVATE_QA_CLI = "1"; |
| 6 | +env.OPENCLAW_DISABLE_BUNDLED_PLUGINS = "0"; |
| 7 | +} |
4 | 8 | |
5 | | -const result = await runQaE2eSelfCheck({ outputPath }); |
6 | | -process.stdout.write(`QA self-check report: ${result.outputPath}\n`); |
| 9 | +export function resolveQaE2eOutputPath(argv: readonly string[] = process.argv.slice(2)) { |
| 10 | +return argv[0]?.trim() || ".artifacts/qa-e2e/self-check.md"; |
| 11 | +} |
| 12 | + |
| 13 | +export async function main(argv: readonly string[] = process.argv.slice(2)) { |
| 14 | +enablePrivateQaScriptEnv(); |
| 15 | +const { runQaE2eSelfCheck } = await import("../extensions/qa-lab/api.js"); |
| 16 | +const result = await runQaE2eSelfCheck({ outputPath: resolveQaE2eOutputPath(argv) }); |
| 17 | +process.stdout.write(`QA self-check report: ${result.outputPath}\n`); |
| 18 | +} |
| 19 | + |
| 20 | +function isMainModule() { |
| 21 | +const entry = process.argv[1]; |
| 22 | +return Boolean(entry) && import.meta.url === pathToFileURL(entry).href; |
| 23 | +} |
| 24 | + |
| 25 | +if (isMainModule()) { |
| 26 | +await main(); |
| 27 | +} |
| Original file line number | Diff line number | Diff line change |
|---|
|
| 1 | +import { describe, expect, it } from "vitest"; |
| 2 | + |
| 3 | +import { enablePrivateQaScriptEnv, resolveQaE2eOutputPath } from "../../scripts/qa-e2e.js"; |
| 4 | + |
| 5 | +describe("qa-e2e script", () => { |
| 6 | +it("enables private QA plugin SDK subpaths before loading QA Lab", () => { |
| 7 | +const env: NodeJS.ProcessEnv = {}; |
| 8 | + |
| 9 | +enablePrivateQaScriptEnv(env); |
| 10 | + |
| 11 | +expect(env.OPENCLAW_BUILD_PRIVATE_QA).toBe("1"); |
| 12 | +expect(env.OPENCLAW_ENABLE_PRIVATE_QA_CLI).toBe("1"); |
| 13 | +expect(env.OPENCLAW_DISABLE_BUNDLED_PLUGINS).toBe("0"); |
| 14 | +}); |
| 15 | + |
| 16 | +it("overrides inherited environment that would break the private QA self-check", () => { |
| 17 | +const env: NodeJS.ProcessEnv = { |
| 18 | +OPENCLAW_BUILD_PRIVATE_QA: "0", |
| 19 | +OPENCLAW_ENABLE_PRIVATE_QA_CLI: "0", |
| 20 | +OPENCLAW_DISABLE_BUNDLED_PLUGINS: "1", |
| 21 | +}; |
| 22 | + |
| 23 | +enablePrivateQaScriptEnv(env); |
| 24 | + |
| 25 | +expect(env.OPENCLAW_BUILD_PRIVATE_QA).toBe("1"); |
| 26 | +expect(env.OPENCLAW_ENABLE_PRIVATE_QA_CLI).toBe("1"); |
| 27 | +expect(env.OPENCLAW_DISABLE_BUNDLED_PLUGINS).toBe("0"); |
| 28 | +}); |
| 29 | + |
| 30 | +it("resolves the default self-check report path", () => { |
| 31 | +expect(resolveQaE2eOutputPath([])).toBe(".artifacts/qa-e2e/self-check.md"); |
| 32 | +expect(resolveQaE2eOutputPath([".artifacts/custom.md"])).toBe(".artifacts/custom.md"); |
| 33 | +}); |
| 34 | +}); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。