From 09a635a28b2b0029ef01cb7224eb16e75c3a9a1e Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 27 Apr 2026 00:02:29 +0100 Subject: [PATCH] test: fix main release validation forward-port --- scripts/e2e/npm-telegram-live-runner.ts | 5 ++++- scripts/test-docker-all.mjs | 15 --------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/scripts/e2e/npm-telegram-live-runner.ts b/scripts/e2e/npm-telegram-live-runner.ts index 51ca2930bf7..d7b26995aa5 100644 --- a/scripts/e2e/npm-telegram-live-runner.ts +++ b/scripts/e2e/npm-telegram-live-runner.ts @@ -5,7 +5,6 @@ import fs from "node:fs/promises"; import path from "node:path"; import { pathToFileURL } from "node:url"; -import { formatErrorMessage } from "../../dist/infra/errors.js"; import { runTelegramQaLive } from "../../extensions/qa-lab/src/live-transports/telegram/telegram-live.runtime.ts"; function parseBoolean(value: string | undefined) { @@ -28,6 +27,10 @@ function resolveCredentialRole(env: NodeJS.ProcessEnv) { return env.OPENCLAW_NPM_TELEGRAM_CREDENTIAL_ROLE ?? env.OPENCLAW_QA_CREDENTIAL_ROLE; } +function formatErrorMessage(error: unknown) { + return error instanceof Error ? error.message : String(error); +} + async function resolveTrustedOpenClawCommand(rawCommand: string) { if (!path.isAbsolute(rawCommand)) { throw new Error("OPENCLAW_NPM_TELEGRAM_SUT_COMMAND must be an absolute path."); diff --git a/scripts/test-docker-all.mjs b/scripts/test-docker-all.mjs index c4870924bba..fb3dcafe23e 100644 --- a/scripts/test-docker-all.mjs +++ b/scripts/test-docker-all.mjs @@ -214,21 +214,6 @@ function withResolvedPnpmCommand(command, env) { return command.replace(/(^|\s)pnpm(?=\s)/g, `$1${shellQuote(pnpmCommand)}`); } -function timingSeconds(timingStore, poolLane) { - const fromStore = timingStore?.lanes?.[poolLane.name]?.durationSeconds; - if (typeof fromStore === "number" && Number.isFinite(fromStore) && fromStore > 0) { - return fromStore; - } - return poolLane.estimateSeconds ?? 0; -} - -function orderLanes(poolLanes, timingStore) { - return poolLanes - .map((poolLane, index) => ({ index, poolLane, seconds: timingSeconds(timingStore, poolLane) })) - .toSorted((a, b) => b.seconds - a.seconds || a.index - b.index) - .map(({ poolLane }) => poolLane); -} - async function loadTimingStore(file, enabled) { if (!enabled) { return { enabled: false, file, lanes: {}, version: 1 };