diff --git a/CHANGELOG.md b/CHANGELOG.md index 98c6849dc525..e40d8ec72002 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Docs: https://docs.openclaw.ai - Channels/iMessage: advance the startup catchup cursor from live-handled rows after a completed catchup pass, including rows received while catchup is still running, so restarts do not replay them. (#85475) Thanks @TurboTheTurtle. - Tests: mount the shared Windows command helper into bare Docker E2E harness containers so published upgrade-survivor config walks can start on Linux. +- Tests: keep the plugin binding command escape Docker smoke focused on its intended Vitest cases and skip source-only install lifecycle scripts. - Tests: let the generic plugin install E2E assertions use a configurable temp root and Windows home-relative install paths. - Tests: keep kitchen-sink plugin assertion fixtures on a configurable temp root so native Windows runs no longer skip full-surface diagnostic coverage. - Tests: fail Gateway startup benchmarks when a child startup never produces ready probes or process metrics instead of reporting all `n/a` samples as passing. diff --git a/scripts/e2e/plugin-binding-command-escape-docker.sh b/scripts/e2e/plugin-binding-command-escape-docker.sh index dd50af99fd4c..ced9c05b449c 100644 --- a/scripts/e2e/plugin-binding-command-escape-docker.sh +++ b/scripts/e2e/plugin-binding-command-escape-docker.sh @@ -32,7 +32,7 @@ docker run --rm \ -e "FOCUSED_TEST_REGEX=$FOCUSED_TEST_REGEX" \ -e OPENCLAW_VITEST_FS_MODULE_CACHE_PATH=/tmp/openclaw-vitest-cache \ "$IMAGE_NAME" \ - bash -lc 'set -euo pipefail; corepack enable; node scripts/run-vitest.mjs src/auto-reply/reply/dispatch-from-config.test.ts -- --reporter=verbose -t "$FOCUSED_TEST_REGEX"' \ + bash -lc 'set -euo pipefail; corepack enable; node scripts/run-vitest.mjs src/auto-reply/reply/dispatch-from-config.test.ts --reporter=verbose -t "$FOCUSED_TEST_REGEX"' \ >"$RUN_LOG" 2>&1 status=$? set -e @@ -43,4 +43,23 @@ if [ "$status" -ne 0 ]; then exit "$status" fi -echo "OK" +if ! node - "$RUN_LOG" <<'NODE' +const fs = require("node:fs"); +const logPath = process.argv[2]; +const text = fs + .readFileSync(logPath, "utf8") + .replace(/\x1B\[[0-?]*[ -/]*[@-~]/gu, ""); + +if (!/(?:^|\n)\s*Tests\s+3 passed\b/u.test(text)) { + console.error("expected focused Vitest summary for exactly 3 passed tests"); + console.error(text.slice(-4000)); + process.exit(1); +} +NODE +then + echo "Docker plugin binding command escape smoke did not stay focused" + cat "$RUN_LOG" + exit 1 +fi + +echo "OK (3 focused tests)" diff --git a/scripts/e2e/plugin-binding-command-escape.Dockerfile b/scripts/e2e/plugin-binding-command-escape.Dockerfile index 26a95da32fe9..b5641081ea3d 100644 --- a/scripts/e2e/plugin-binding-command-escape.Dockerfile +++ b/scripts/e2e/plugin-binding-command-escape.Dockerfile @@ -9,6 +9,6 @@ RUN corepack enable WORKDIR /workspace/openclaw COPY . . -RUN pnpm install --frozen-lockfile +RUN OPENCLAW_DISABLE_BUNDLED_PLUGIN_POSTINSTALL=1 pnpm install --frozen-lockfile --ignore-scripts --filter openclaw CMD ["bash"] diff --git a/test/scripts/docker-build-helper.test.ts b/test/scripts/docker-build-helper.test.ts index df954d49ed7e..95fd8a2795b0 100644 --- a/test/scripts/docker-build-helper.test.ts +++ b/test/scripts/docker-build-helper.test.ts @@ -18,6 +18,10 @@ const OPENAI_WEB_SEARCH_MINIMAL_SCENARIO_PATH = const OPENAI_WEB_SEARCH_MINIMAL_CLIENT_PATH = "scripts/e2e/lib/openai-web-search-minimal/client.mjs"; const OPENWEBUI_DOCKER_E2E_PATH = "scripts/e2e/openwebui-docker.sh"; +const PLUGIN_BINDING_COMMAND_ESCAPE_DOCKER_E2E_PATH = + "scripts/e2e/plugin-binding-command-escape-docker.sh"; +const PLUGIN_BINDING_COMMAND_ESCAPE_DOCKERFILE_PATH = + "scripts/e2e/plugin-binding-command-escape.Dockerfile"; const BUNDLED_PLUGIN_INSTALL_UNINSTALL_E2E_PATH = "scripts/e2e/bundled-plugin-install-uninstall-docker.sh"; const BUNDLED_PLUGIN_INSTALL_UNINSTALL_SWEEP_PATH = @@ -383,6 +387,17 @@ describe("docker build helper", () => { expect(clawhub).toContain("unset OPENCLAW_CLAWHUB_URL CLAWHUB_URL"); }); + it("keeps the plugin binding command escape Docker smoke focused", () => { + const runner = readFileSync(PLUGIN_BINDING_COMMAND_ESCAPE_DOCKER_E2E_PATH, "utf8"); + const dockerfile = readFileSync(PLUGIN_BINDING_COMMAND_ESCAPE_DOCKERFILE_PATH, "utf8"); + + expect(runner).toContain("--reporter=verbose -t"); + expect(runner).not.toContain("-- --reporter=verbose"); + expect(runner).toContain("expected focused Vitest summary for exactly 3 passed tests"); + expect(dockerfile).toContain("OPENCLAW_DISABLE_BUNDLED_PLUGIN_POSTINSTALL=1"); + expect(dockerfile).toContain("pnpm install --frozen-lockfile --ignore-scripts --filter openclaw"); + }); + it("covers plugin install/update sources in the Docker plugin sweep", () => { const sweep = readFileSync(PLUGINS_DOCKER_SWEEP_PATH, "utf8"); const clawhub = readFileSync(PLUGINS_DOCKER_CLAWHUB_PATH, "utf8");