




























@@ -1369,6 +1369,67 @@ describe.concurrent("scripts/crabbox-wrapper", () => {
13691369);
13701370});
137113711372+it("bootstraps Corepack for AWS macOS node option changed-gate commands", () => {
1373+const result = runWrapper(
1374+"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",
1375+[
1376+"run",
1377+"--provider",
1378+"aws",
1379+"--target",
1380+"macos",
1381+"--",
1382+"node",
1383+"--max-old-space-size",
1384+"4096",
1385+"--env-file-if-exists",
1386+".env",
1387+"--unhandled-rejections",
1388+"strict",
1389+"--trace-warnings",
1390+"--import=tsx",
1391+"scripts/check-changed.mjs",
1392+],
1393+);
1394+1395+const output = parseFakeCrabboxOutput(result);
1396+const remoteCommand = normalizeShellLineEndings(output.args.at(-1) ?? "");
1397+expect(result.status).toBe(0);
1398+expect(remoteCommand).toContain("openclaw_crabbox_bootstrap_macos_js");
1399+expectGroupedShellCommand(
1400+remoteCommand,
1401+`openclaw_crabbox_env ${remoteChangedGateEnvPrefix} node --max-old-space-size 4096 --env-file-if-exists .env --unhandled-rejections strict --trace-warnings --import=tsx scripts/check-changed.mjs`,
1402+);
1403+});
1404+1405+it("does not treat node script arguments as changed-gate commands", () => {
1406+const result = runWrapper(
1407+"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",
1408+[
1409+"run",
1410+"--provider",
1411+"aws",
1412+"--target",
1413+"macos",
1414+"--",
1415+"node",
1416+"--trace-warnings",
1417+"scripts/other.mjs",
1418+"scripts/check-changed.mjs",
1419+],
1420+);
1421+1422+const output = parseFakeCrabboxOutput(result);
1423+const remoteCommand = normalizeShellLineEndings(output.args.at(-1) ?? "");
1424+expect(result.status).toBe(0);
1425+expect(remoteCommand).toContain("openclaw_crabbox_bootstrap_macos_js");
1426+expect(remoteCommand).not.toContain("OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1");
1427+expectGroupedShellCommand(
1428+remoteCommand,
1429+"node --trace-warnings scripts/other.mjs scripts/check-changed.mjs",
1430+);
1431+});
1432+13721433it("preserves shell commands when bootstrapping raw AWS macOS JavaScript commands", () => {
13731434const result = runWrapper(
13741435"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",
@@ -1485,10 +1546,7 @@ describe.concurrent("scripts/crabbox-wrapper", () => {
14851546});
1486154714871548it("bootstraps Corepack for AWS macOS script-stdin env shebangs with option values", () => {
1488-const script = [
1489-"#!/usr/bin/env -C /tmp -u OPENCLAW_FAKE_VAR pnpm",
1490-"--version",
1491-].join("\n");
1549+const script = ["#!/usr/bin/env -C /tmp -u OPENCLAW_FAKE_VAR pnpm", "--version"].join("\n");
14921550const result = runWrapper(
14931551"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",
14941552["run", "--provider", "aws", "--target", "macos", "--script-stdin"],
@@ -2626,7 +2684,7 @@ describe.concurrent("scripts/crabbox-wrapper", () => {
2626268426272685it("preserves sparse changed-gate Git bootstrap for timeout-wrapped shell commands", () => {
26282686const shellScript =
2629-"/usr/bin/time -v timeout 1200s node scripts/check-changed.mjs --base origin/main --head HEAD";
2687+"/usr/bin/time -v timeout 1200s node --max-old-space-size=4096 scripts/check-changed.mjs --base origin/main --head HEAD";
26302688const result = runWrapper(
26312689"provider: hetzner, aws, local-container, blacksmith-testbox, or cloudflare\n",
26322690["run", "--provider", "aws", "--shell", "--", shellScript],
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。