
























@@ -376,6 +376,13 @@ function resolveTelegramQaCanaryTimeoutMs(env: NodeJS.ProcessEnv = process.env)
376376);
377377}
378378379+function resolveTelegramQaScenarioTimeoutMs(
380+fallbackMs: number,
381+env: NodeJS.ProcessEnv = process.env,
382+) {
383+return parsePositiveTelegramQaEnvMs(env, "OPENCLAW_QA_TELEGRAM_SCENARIO_TIMEOUT_MS", fallbackMs);
384+}
385+379386function formatTelegramQaTimeoutSeconds(timeoutMs: number) {
380387return `${Math.round(timeoutMs / 1_000)}s`;
381388}
@@ -1308,6 +1315,9 @@ export async function runTelegramQaLive(params: {
13081315);
13091316assertLeaseHealthy();
13101317const scenarioRun = scenario.buildRun(sutUsername);
1318+const scenarioTimeoutMs = scenarioRun.expectReply
1319+ ? resolveTelegramQaScenarioTimeoutMs(scenario.timeoutMs)
1320+ : scenario.timeoutMs;
13111321try {
13121322const requestStartedAtMs = Date.now();
13131323const sent = await sendGroupMessage(
@@ -1322,7 +1332,7 @@ export async function runTelegramQaLive(params: {
13221332const matched = await waitForObservedMessage({
13231333token: runtimeEnv.driverToken,
13241334initialOffset: driverOffset,
1325-timeoutMs: scenario.timeoutMs,
1335+timeoutMs: scenarioTimeoutMs,
13261336 observedMessages,
13271337observationScenarioId: scenario.id,
13281338observationScenarioTitle: scenario.title,
@@ -1368,7 +1378,7 @@ export async function runTelegramQaLive(params: {
13681378if (!scenarioRun.expectReply) {
13691379const details = formatErrorMessage(error);
13701380if (
1371-details === `timed out after ${scenario.timeoutMs}ms waiting for Telegram message`
1381+details === `timed out after ${scenarioTimeoutMs}ms waiting for Telegram message`
13721382) {
13731383const result = {
13741384id: scenario.id,
@@ -1537,6 +1547,7 @@ export const __testing = {
15371547 parseTelegramQaProgressBooleanEnv,
15381548 parseTelegramQaCredentialPayload,
15391549 resolveTelegramQaCanaryTimeoutMs,
1550+ resolveTelegramQaScenarioTimeoutMs,
15401551 resolveTelegramQaRuntimeEnv,
15411552 sanitizeTelegramQaProgressValue,
15421553 shouldLogTelegramQaLiveProgress,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。