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

推荐订阅源

IT之家
IT之家
A
About on SuperTechFans
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
博客园 - Franky
D
Docker
Martin Fowler
Martin Fowler
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
人人都是产品经理
人人都是产品经理
Last Week in AI
Last Week in AI
U
Unit 42
F
Fortinet All Blogs
H
Help Net Security
Blog — PlanetScale
Blog — PlanetScale
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
P
Proofpoint News Feed
月光博客
月光博客
G
Google Developers Blog

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(telegram): keep polling watchdog active for wedged ru...
vincentkoc · 2026-04-25 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -18,6 +18,7 @@ Docs: https://docs.openclaw.ai

1818
1919

- Heartbeat: clamp oversized scheduler delays through the shared safe timer helper, preventing `every` values over Node's timeout cap from becoming a 1 ms crash loop. Fixes #71414. (#71478) Thanks @hclsys.

2020

- Telegram: remove the startup persisted-offset `getUpdates` preflight so polling restarts do not self-conflict before the runner starts. Fixes #69304. (#69779) Thanks @chinar-amrutkar.

21+

- Telegram: keep the polling stall watchdog active even when grammY reports the runner as not running while its task is still pending, so a rebuilt transport cannot leave `getUpdates` silent until a manual gateway restart. Fixes #69064. Thanks @LDLoeb.

2122

- Browser/Playwright: ignore benign already-handled route races during guarded navigation so browser-page tasks no longer fail when Playwright tears down a route mid-flight. (#68708) Thanks @Steady-ai.

2223

- Browser/downloads: seed managed Chrome profiles with OpenClaw download prefs and capture unmanaged click-triggered downloads under the guarded downloads directory, while explicit download waiters still own their target file. (#64558) Thanks @Pearcekieser.

2324

- Browser/Chrome: stop passing redundant `--disable-setuid-sandbox` when `browser.noSandbox` is enabled; `--no-sandbox` remains the effective sandbox opt-out. (#67939) Thanks @sebykrueger.

Original file line numberDiff line numberDiff line change

@@ -31,7 +31,6 @@ describe("TelegramPollingLivenessTracker", () => {

3131

expect(

3232

tracker.detectStall({

3333

thresholdMs: POLL_STALL_THRESHOLD_MS,

34-

runnerIsRunning: true,

3534

}),

3635

).toBeNull();

3736

@@ -45,7 +44,6 @@ describe("TelegramPollingLivenessTracker", () => {

4544

now = 120_001;

4645

const stall = tracker.detectStall({

4746

thresholdMs: POLL_STALL_THRESHOLD_MS,

48-

runnerIsRunning: true,

4947

});

5048

expect(stall?.message).toContain("Polling stall detected (no completed getUpdates");

5149

expect(stall?.message).toContain("inFlight=0 outcome=not-started");

@@ -54,7 +52,6 @@ describe("TelegramPollingLivenessTracker", () => {

5452

expect(

5553

tracker.detectStall({

5654

thresholdMs: POLL_STALL_THRESHOLD_MS,

57-

runnerIsRunning: true,

5855

}),

5956

).toBeNull();

6057

});

@@ -69,7 +66,6 @@ describe("TelegramPollingLivenessTracker", () => {

6966

now = 120_001;

7067

const stall = tracker.detectStall({

7168

thresholdMs: POLL_STALL_THRESHOLD_MS,

72-

runnerIsRunning: true,

7369

});

7470
7571

expect(stall?.message).toContain("active getUpdates stuck");

Original file line numberDiff line numberDiff line change

@@ -89,14 +89,7 @@ export class TelegramPollingLivenessTracker {

8989

this.#inFlightGetUpdates = Math.max(0, this.#inFlightGetUpdates - 1);

9090

}

9191
92-

detectStall(params: {

93-

thresholdMs: number;

94-

runnerIsRunning: boolean;

95-

now?: number;

96-

}): TelegramPollingStall | null {

97-

if (!params.runnerIsRunning) {

98-

return null;

99-

}

92+

detectStall(params: { thresholdMs: number; now?: number }): TelegramPollingStall | null {

10093

const now = params.now ?? this.#now();

10194

const activeElapsed =

10295

this.#inFlightGetUpdates > 0 && this.#lastGetUpdatesStartedAt != null

Original file line numberDiff line numberDiff line change

@@ -387,6 +387,60 @@ describe("TelegramPollingSession", () => {

387387

}

388388

});

389389
390+

it("forces a restart when the runner task is pending but reports not running", async () => {

391+

const abort = new AbortController();

392+

const firstRunnerStop = vi.fn(async () => undefined);

393+

const secondRunnerStop = vi.fn(async () => undefined);

394+

createTelegramBotMock.mockReturnValue(makeBot());

395+
396+

let firstTaskResolve: (() => void) | undefined;

397+

const firstTask = new Promise<void>((resolve) => {

398+

firstTaskResolve = resolve;

399+

});

400+

let cycle = 0;

401+

runMock.mockImplementation(() => {

402+

cycle += 1;

403+

if (cycle === 1) {

404+

return {

405+

task: () => firstTask,

406+

stop: async () => {

407+

await firstRunnerStop();

408+

firstTaskResolve?.();

409+

},

410+

isRunning: () => false,

411+

};

412+

}

413+

return {

414+

task: async () => {

415+

abort.abort();

416+

},

417+

stop: secondRunnerStop,

418+

isRunning: () => false,

419+

};

420+

});

421+
422+

const watchdogHarness = installPollingStallWatchdogHarness();

423+
424+

const log = vi.fn();

425+

const session = createPollingSession({

426+

abortSignal: abort.signal,

427+

log,

428+

});

429+
430+

try {

431+

const runPromise = session.runUntilAbort();

432+

const watchdog = await watchdogHarness.waitForWatchdog();

433+

watchdog?.();

434+

await runPromise;

435+
436+

expect(runMock).toHaveBeenCalledTimes(2);

437+

expect(firstRunnerStop).toHaveBeenCalledTimes(1);

438+

expect(log).toHaveBeenCalledWith(expect.stringContaining("Polling stall detected"));

439+

} finally {

440+

watchdogHarness.restore();

441+

}

442+

});

443+
390444

it("honors a custom polling stall threshold", async () => {

391445

const abort = new AbortController();

392446

const botStop = vi.fn(async () => undefined);

Original file line numberDiff line numberDiff line change

@@ -295,7 +295,6 @@ export class TelegramPollingSession {

295295
296296

const stall = liveness.detectStall({

297297

thresholdMs: this.#stallThresholdMs,

298-

runnerIsRunning: runner.isRunning(),

299298

});

300299

if (stall) {

301300

this.#transportState.markDirty();