






















@@ -209,7 +209,10 @@ async function runStatusCommand(params: {
209209spawn: (cmd: string, args: string[]) => ReturnType<typeof createExitedProcess>;
210210spawnSync?: (cmd: string, args: string[]) => { status: number; stdout: string };
211211env?: Record<string, string>;
212-runRuntimePostBuild?: (params?: { cwd?: string }) => void | Promise<void>;
212+runRuntimePostBuild?: (params?: {
213+cwd?: string;
214+env?: Record<string, string | undefined>;
215+}) => void | Promise<void>;
213216}) {
214217return await runNodeMain({
215218cwd: params.tmp,
@@ -232,7 +235,10 @@ async function runQaCommand(params: {
232235spawn: (cmd: string, args: string[]) => ReturnType<typeof createExitedProcess>;
233236spawnSync?: (cmd: string, args: string[]) => { status: number; stdout: string };
234237env?: Record<string, string>;
235-runRuntimePostBuild?: (params?: { cwd?: string }) => void | Promise<void>;
238+runRuntimePostBuild?: (params?: {
239+cwd?: string;
240+env?: Record<string, string | undefined>;
241+}) => void | Promise<void>;
236242}) {
237243return await runNodeMain({
238244cwd: params.tmp,
@@ -571,6 +577,37 @@ describe("run-node script", () => {
571577});
572578});
573579580+it("passes the synthesized private QA env into runtime postbuild staging", async () => {
581+await withTempDir({ prefix: "openclaw-run-node-" }, async (tmp) => {
582+await setupTrackedProject(tmp, {
583+files: {
584+[ROOT_SRC]: "export const value = 1;\n",
585+[QA_LAB_PLUGIN_SDK_ENTRY]: "export const qaLab = true;\n",
586+},
587+oldPaths: [ROOT_SRC, ROOT_TSCONFIG, ROOT_PACKAGE, QA_LAB_PLUGIN_SDK_ENTRY],
588+buildPaths: [DIST_ENTRY, BUILD_STAMP],
589+});
590+591+const runRuntimePostBuild = vi.fn();
592+const { spawn, spawnSync } = createSpawnRecorder({
593+gitHead: "abc123\n",
594+gitStatus: "",
595+});
596+const exitCode = await runQaCommand({ tmp, spawn, spawnSync, runRuntimePostBuild });
597+598+expect(exitCode).toBe(0);
599+expect(runRuntimePostBuild).toHaveBeenCalledWith(
600+expect.objectContaining({
601+cwd: tmp,
602+env: expect.objectContaining({
603+OPENCLAW_BUILD_PRIVATE_QA: "1",
604+OPENCLAW_ENABLE_PRIVATE_QA_CLI: "1",
605+}),
606+}),
607+);
608+});
609+});
610+574611it("derives private QA facade checks from distRoot for direct freshness checks", async () => {
575612await withTempDir({ prefix: "openclaw-run-node-" }, async (tmp) => {
576613await setupTrackedProject(tmp, {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。