惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
IT之家
IT之家
V
Visual Studio Blog
The Cloudflare Blog
博客园 - 司徒正美
Jina AI
Jina AI
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
S
SegmentFault 最新的问题
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
T
Tailwind CSS Blog
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell
量子位
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿
博客园 - Franky
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(qa): honor telegram live ready timeout · openclaw/ope...
vincentkoc · 2026-06-19 · via Recent Commits to openclaw:main

@@ -126,6 +126,7 @@ type TelegramObservedMessage = {

126126

};

127127128128

const DEFAULT_TELEGRAM_QA_CANARY_TIMEOUT_MS = 30_000;

129+

const TELEGRAM_QA_DEFAULT_READY_TIMEOUT_MS = 45_000;

129130130131

type TelegramQaScenarioResult = LiveTransportCheckResult;

131132

@@ -157,6 +158,15 @@ type TelegramQaRunResult = {

157158

scenarios: TelegramQaScenarioResult[];

158159

};

159160161+

type TelegramChannelStatus = {

162+

connected?: boolean;

163+

lastConnectedAt?: number;

164+

lastDisconnect?: unknown;

165+

lastError?: string | null;

166+

restartPending?: boolean;

167+

running?: boolean;

168+

};

169+160170

class TelegramQaCanaryError extends Error {

161171

phase: TelegramQaCanaryPhase;

162172

context: Record<string, string | number | undefined>;

@@ -617,6 +627,14 @@ function resolveTelegramQaScenarioTimeoutMs(

617627

return parsePositiveTelegramQaEnvMs(env, "OPENCLAW_QA_TELEGRAM_SCENARIO_TIMEOUT_MS", fallbackMs);

618628

}

619629630+

function resolveTelegramQaReadyTimeoutMs(env: NodeJS.ProcessEnv = process.env) {

631+

const raw = env.OPENCLAW_QA_TRANSPORT_READY_TIMEOUT_MS;

632+

if (!raw) {

633+

return TELEGRAM_QA_DEFAULT_READY_TIMEOUT_MS;

634+

}

635+

return parseStrictPositiveInteger(raw) ?? TELEGRAM_QA_DEFAULT_READY_TIMEOUT_MS;

636+

}

637+620638

function normalizeTelegramQaRttOptions(params: {

621639

count?: number;

622640

checkIds?: readonly string[];

@@ -1230,13 +1248,16 @@ async function waitForTelegramChannelRunning(

12301248

gateway: Awaited<ReturnType<typeof startQaGatewayChild>>,

12311249

accountId: string,

12321250

options?: {

1251+

env?: NodeJS.ProcessEnv;

12331252

pollMs?: number;

12341253

timeoutMs?: number;

12351254

},

12361255

) {

12371256

const startedAt = Date.now();

1238-

const timeoutMs = options?.timeoutMs ?? 45_000;

1257+

const timeoutMs = options?.timeoutMs ?? resolveTelegramQaReadyTimeoutMs(options?.env);

12391258

const pollMs = options?.pollMs ?? 500;

1259+

let lastProbeError: string | undefined;

1260+

let lastStatus: TelegramChannelStatus | undefined;

12401261

while (Date.now() - startedAt < timeoutMs) {

12411262

try {

12421263

const payload = (await gateway.call(

@@ -1249,28 +1270,49 @@ async function waitForTelegramChannelRunning(

12491270

Array<{

12501271

accountId?: string;

12511272

connected?: boolean;

1273+

lastConnectedAt?: number;

1274+

lastDisconnect?: unknown;

1275+

lastError?: string | null;

12521276

running?: boolean;

12531277

restartPending?: boolean;

12541278

}>

12551279

>;

12561280

};

12571281

const accounts = payload.channelAccounts?.telegram ?? [];

12581282

const match = accounts.find((entry) => entry.accountId === accountId);

1283+

lastProbeError = undefined;

1284+

lastStatus = match

1285+

? {

1286+

connected: match.connected,

1287+

lastConnectedAt: match.lastConnectedAt,

1288+

lastDisconnect: match.lastDisconnect,

1289+

lastError: match.lastError,

1290+

restartPending: match.restartPending,

1291+

running: match.running,

1292+

}

1293+

: undefined;

12591294

if (match?.running && match.connected === true && match.restartPending !== true) {

12601295

return;

12611296

}

1262-

} catch {

1297+

} catch (error) {

1298+

lastProbeError = formatErrorMessage(error);

12631299

// retry

12641300

}

12651301

await new Promise((resolve) => {

12661302

setTimeout(resolve, pollMs);

12671303

});

12681304

}

1269-

throw new Error(`telegram account "${accountId}" did not become ready`);

1305+

const details = lastStatus

1306+

? `; last status: ${JSON.stringify(lastStatus)}`

1307+

: lastProbeError

1308+

? `; last probe error: ${lastProbeError}`

1309+

: "";

1310+

throw new Error(`telegram account "${accountId}" did not become ready${details}`);

12701311

}

1271131212721313

async function setTelegramQaDriverGroupAuthorization(params: {

12731314

driverBotId: number;

1315+

env: NodeJS.ProcessEnv;

12741316

gateway: Awaited<ReturnType<typeof startQaGatewayChild>>;

12751317

groupId: string;

12761318

sutAccountId: string;

@@ -1293,7 +1335,7 @@ async function setTelegramQaDriverGroupAuthorization(params: {

12931335

mode: 0o600,

12941336

});

12951337

});

1296-

await waitForTelegramChannelRunning(params.gateway, params.sutAccountId);

1338+

await waitForTelegramChannelRunning(params.gateway, params.sutAccountId, { env: params.env });

12971339

}

1298134012991341

function renderTelegramQaMarkdown(params: {

@@ -1903,7 +1945,7 @@ export async function runTelegramQaLive(params: {

19031945

}),

19041946

});

19051947

try {

1906-

await waitForTelegramChannelRunning(gatewayHarness.gateway, sutAccountId);

1948+

await waitForTelegramChannelRunning(gatewayHarness.gateway, sutAccountId, { env });

19071949

assertLeaseHealthy();

19081950

let latestSutMessageId: number | undefined;

19091951

try {

@@ -1982,6 +2024,7 @@ export async function runTelegramQaLive(params: {

19822024

if (step.driverGroupAuthorization) {

19832025

await setTelegramQaDriverGroupAuthorization({

19842026

driverBotId: driverIdentity.id,

2027+

env,

19852028

gateway: gatewayHarness.gateway,

19862029

groupId: runtimeEnv.groupId,

19872030

sutAccountId,

@@ -2259,6 +2302,7 @@ export const testing = {

22592302

parseTelegramQaCredentialPayload,

22602303

normalizeTelegramQaRttOptions,

22612304

resolveTelegramQaCanaryTimeoutMs,

2305+

resolveTelegramQaReadyTimeoutMs,

22622306

resolveTelegramQaScenarioTimeoutMs,

22632307

resolveTelegramQaRuntimeEnv,

22642308

sanitizeTelegramQaProgressValue,