improve: validate built CLI with Bun 1.4 (#129192)

* ci: validate built CLI with Bun 1.4

Amp-Thread-ID: https://ampcode.com/threads/T-01a037b7-66db-71f0-91e7-1578b383afb2

* test: align Bun Docker image assertion

Amp-Thread-ID: https://ampcode.com/threads/T-01a037b7-66db-71f0-91e7-1578b383afb2

* test: tolerate cold CLI startup in CI

Amp-Thread-ID: https://ampcode.com/threads/T-01a037b7-66db-71f0-91e7-1578b383afb2

---------

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Peter Steinberger
2026-08-25 03:44:57 -07:00
committed by GitHub
parent 97cd06b946
commit 5af05ab1a2
14 changed files with 43 additions and 17 deletions
+18 -1
View File
@@ -7405,13 +7405,26 @@ printf '%s\n' "\${CURL_SUCCESS_IP:-203.0.113.7}"
expect(realGatewayRunContract).not.toContain("--testTimeout");
});
it("does not rebuild Control UI after build:ci-artifacts", () => {
it("builds artifacts once and smoke-tests the built CLI with Node and Bun", () => {
const workflow = readCiWorkflow();
const buildArtifactSteps = workflow.jobs["build-artifacts"].steps;
const setupStep = buildArtifactSteps.find(
(step: WorkflowStep) => step.name === "Setup Node environment",
);
const buildDistStep = buildArtifactSteps.find(
(step: WorkflowStep) => step.name === "Build dist",
);
const nodeHelpSmoke = buildArtifactSteps.find(
(step: WorkflowStep) => step.name === "Smoke test CLI launcher help",
);
const nodeStatusSmoke = buildArtifactSteps.find(
(step: WorkflowStep) => step.name === "Smoke test CLI launcher status json",
);
const bunSmoke = buildArtifactSteps.find(
(step: WorkflowStep) => step.name === "Smoke test built CLI with Bun",
);
expect(setupStep.with["install-bun"]).toBe("true");
expect(buildDistStep.run).toBe("pnpm build:ci-artifacts");
expect(buildArtifactSteps.map((step: WorkflowStep) => step.name)).not.toContain(
"Build Control UI",
@@ -7419,6 +7432,10 @@ printf '%s\n' "\${CURL_SUCCESS_IP:-203.0.113.7}"
expect(buildArtifactSteps.some((step: WorkflowStep) => step.run === "pnpm ui:build")).toBe(
false,
);
expect(nodeHelpSmoke.run).toBe("node openclaw.mjs --help");
expect(nodeStatusSmoke.run).toBe("node openclaw.mjs status --json --timeout 1");
expect(bunSmoke.run).toContain("bun openclaw.mjs --help");
expect(bunSmoke.run).toContain("bun openclaw.mjs status --json --timeout 1");
});
it("keeps source-only Control UI locale drift advisory", () => {
+2 -2
View File
@@ -2575,7 +2575,7 @@ describe("scripts/crabbox-wrapper", () => {
expect(output.args).toContain("--shell");
expect(result.stderr).toContain("Node/Corepack/pnpm/Bun");
expect(remoteCommand).toContain("openclaw_crabbox_bootstrap_macos_js");
expect(remoteCommand).toContain("bun_version=1.3.14");
expect(remoteCommand).toContain("bun_version=1.4.0");
expect(remoteCommand).toContain('bun_root="$tool_root/bun-v${bun_version}"');
expect(remoteCommand).toContain(
'npm install --global --prefix "$bun_root" --fetch-timeout=120000 --fetch-retries=2 --fetch-retry-mintimeout=2000 --fetch-retry-maxtimeout=15000 "bun@${bun_version}"',
@@ -2871,7 +2871,7 @@ describe("scripts/crabbox-wrapper", () => {
it("bootstraps Bun for AWS macOS script-stdin bun shebangs", () => {
const script = ["#!/usr/bin/env bun", "console.log(Bun.version);"].join("\n");
const { output } = runSuccessfulMacosScript(script);
expect(output.scriptContent).toContain("bun_version=1.3.14");
expect(output.scriptContent).toContain("bun_version=1.4.0");
expect(output.scriptContent).toContain(
'npm install --global --prefix "$bun_root" --fetch-timeout=120000 --fetch-retries=2 --fetch-retry-mintimeout=2000 --fetch-retry-maxtimeout=15000 "bun@${bun_version}"',
);
+1 -1
View File
@@ -4520,7 +4520,7 @@ source "$ROOT_DIR/scripts/lib/docker-e2e-logs.sh"
"npm install -g --prefix /tmp/openclaw-proof",
"corepack prepare pnpm@11.22.0 --activate",
"pnpm add --global --allow-build=openclaw",
"bun@1.3.14",
"bun@1.4.0",
'test "$(command -v openclaw)" = "/tmp/openclaw-proof/bin/openclaw"',
'test "$(command -v openclaw)" = "$PNPM_HOME/openclaw"',
"OPENCLAW_BUN_GLOBAL_SMOKE_PROOF_PATH",
@@ -543,7 +543,7 @@ describe("install smoke no-push root image transport", () => {
expect(bunVerify.run).toContain("install-smoke-candidate-payload.mts verify");
expect(bunVerify.run).toContain('--run-id "$PRODUCER_RUN_ID"');
expect(bunVerify.run).toContain('--run-attempt "$PRODUCER_RUN_ATTEMPT"');
expect(step(bunConsumer, "Install Bun for global smoke").run).toBe("npm install -g bun@1.3.14");
expect(step(bunConsumer, "Install Bun for global smoke").run).toBe("npm install -g bun@1.4.0");
expect(step(bunConsumer, "Run Bun global install candidate-payload smoke")).toMatchObject({
"working-directory": ".release-harness",
env: {
+1 -1
View File
@@ -2171,7 +2171,7 @@ chmod +x "$BUN_INSTALL/bin/openclaw"
expect(workflow).toContain("bun_global_install_smoke:");
expect(workflow).toContain("Setup trusted release harness for Bun smoke");
expect(workflow).toContain("uses: ./.release-harness/.github/actions/setup-release-harness");
expect(workflow).toContain("npm install -g bun@1.3.14");
expect(workflow).toContain("npm install -g bun@1.4.0");
expect(workflow).toContain('install-bun: "false"');
expect(workflow).toContain("Run Bun global install candidate-payload smoke");
expect(workflow).toContain("working-directory: .release-harness");