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

推荐订阅源

小众软件
小众软件
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
博客园 - 【当耐特】
博客园_首页
The Cloudflare Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
雷峰网
雷峰网
量子位
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
IT之家
IT之家
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
V
Visual Studio Blog
F
Fortinet All Blogs
Martin Fowler
Martin Fowler

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): route polling diagnostics away from errors...
galiniliev · 2026-05-25 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

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

1111

- Config: keep benign legacy metadata write anomalies out of default doctor and config command output while preserving explicit anomaly logging for diagnostics.

1212

- Codex: log when implicit app-server `never` approvals are promoted for OpenClaw tool policy, including whether the trigger was a `before_tool_call` hook or trusted tool policy.

1313

- Google Vertex: support production ADC modes such as Workload Identity Federation, service-account credentials, and metadata-server ADC for the native Vertex transport. (#83971) Thanks @damianFelixPago.

14+

- Telegram: route normal `[telegram][diag]` polling diagnostics through `runtime.log` while keeping non-diag warnings and persistence failures on `runtime.error`, so healthy polling startup no longer looks like an error. Fixes #82957. (#82958) Thanks @galiniliev.

1415
1516

## 2026.5.25

1617
Original file line numberDiff line numberDiff line change

@@ -472,6 +472,46 @@ describe("monitorTelegramProvider (grammY)", () => {

472472

expect(runOptions?.runner?.retryInterval).toBe("exponential");

473473

});

474474
475+

it("logs polling startup diagnostics without using the error channel", async () => {

476+

const runtime = {

477+

log: vi.fn(),

478+

error: vi.fn(),

479+

exit: vi.fn(),

480+

};

481+
482+

await monitorWithAutoAbort({ runtime });

483+
484+

expect(runtime.log).toHaveBeenCalledWith(expect.stringContaining("polling cycle started"));

485+

expect(runtime.error).not.toHaveBeenCalled();

486+

});

487+
488+

it("keeps polling restart warnings on the error channel", async () => {

489+

const abort = new AbortController();

490+

const runtime = {

491+

log: vi.fn(),

492+

error: vi.fn(),

493+

exit: vi.fn(),

494+

};

495+

const firstCycle = mockRunOnceWithStalledPollingRunner();

496+

const secondCycle = mockRunOnceAndAbort(abort);

497+
498+

const monitor = monitorTelegramProvider(

499+

withLegacyPolling({ token: "tok", abortSignal: abort.signal, runtime }),

500+

);

501+

await firstCycle.waitForTaskStart();

502+
503+

expect(emitUnhandledRejection(await makeTaggedPollingFetchError())).toBe(true);

504+

await secondCycle.waitForRunStart();

505+

await monitor;

506+
507+

expect(runtime.log).toHaveBeenCalledWith(

508+

"[telegram][diag] marking transport dirty after polling network failure",

509+

);

510+

expect(runtime.error).toHaveBeenCalledWith(

511+

expect.stringContaining("Restarting polling after unhandled network error"),

512+

);

513+

});

514+
475515

it("requires mention in groups by default", async () => {

476516

for (const v of Object.values(api)) {

477517

if (typeof v === "function" && "mockReset" in v) {

Original file line numberDiff line numberDiff line change

@@ -108,7 +108,15 @@ async function loadTelegramMonitorWebhookRuntime() {

108108

}

109109
110110

export async function monitorTelegramProvider(opts: MonitorTelegramOpts = {}) {

111-

const log = opts.runtime?.error ?? console.error;

111+

const logInfo = (line: string) => (opts.runtime?.log ?? console.log)(line);

112+

const logError = (line: string) => (opts.runtime?.error ?? console.error)(line);

113+

const log = (line: string) => {

114+

if (line.includes("[telegram][diag]")) {

115+

logInfo(line);

116+

return;

117+

}

118+

logError(line);

119+

};

112120

let pollingSession: TelegramPollingSessionInstance | undefined;

113121
114122

const handlePollingNetworkFailure = (err: unknown, label: string) => {

@@ -231,7 +239,7 @@ export async function monitorTelegramProvider(opts: MonitorTelegramOpts = {}) {

231239

try {

232240

await deleteTelegramUpdateOffset({ accountId: account.accountId });

233241

} catch (err) {

234-

(opts.runtime?.error ?? console.error)(

242+

logError(

235243

`telegram: failed to delete stale update offset after rotation: ${String(err)}`,

236244

);

237245

}

@@ -261,9 +269,7 @@ export async function monitorTelegramProvider(opts: MonitorTelegramOpts = {}) {

261269

botToken: token,

262270

});

263271

} catch (err) {

264-

(opts.runtime?.error ?? console.error)(

265-

`telegram: failed to persist update offset: ${String(err)}`,

266-

);

272+

logError(`telegram: failed to persist update offset: ${String(err)}`);

267273

}

268274

};

269275