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

推荐订阅源

J
Java Code Geeks
腾讯CDC
Jina AI
Jina AI
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
小众软件
小众软件
M
MIT News - Artificial intelligence
MyScale Blog
MyScale Blog
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
月光博客
月光博客
L
LangChain Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
C
Check Point Blog
U
Unit 42
人人都是产品经理
人人都是产品经理

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
test: tighten telegram fetch fallback assertions · opencl...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -282,6 +282,20 @@ function expectCallerDispatcherPreserved(callIndexes: number[], dispatcher: unkn

282282

}

283283

}

284284285+

function loggerHasMessageContaining(logger: ReturnType<typeof vi.fn>, fragment: string): boolean {

286+

return logger.mock.calls.some(

287+

([message]) => typeof message === "string" && message.includes(fragment),

288+

);

289+

}

290+291+

function expectLoggerMessageContaining(logger: ReturnType<typeof vi.fn>, fragment: string): void {

292+

expect(loggerHasMessageContaining(logger, fragment)).toBe(true);

293+

}

294+295+

function expectNoLoggerMessageContaining(logger: ReturnType<typeof vi.fn>, fragment: string): void {

296+

expect(loggerHasMessageContaining(logger, fragment)).toBe(false);

297+

}

298+285299

async function expectNoStickyRetryWithSameDispatcher(params: {

286300

resolved: ReturnType<typeof resolveTelegramFetchOrThrow>;

287301

expectedAgentCtor: typeof ProxyAgentCtor | typeof EnvHttpProxyAgentCtor;

@@ -765,14 +779,17 @@ describe("resolveTelegramFetch", () => {

765779

expectStickyAutoSelectDispatcher(firstDispatcher);

766780

expect(secondDispatcher?.options?.connect?.family).toBe(4);

767781

expect(secondDispatcher?.options?.connect?.autoSelectFamily).toBe(false);

768-

expect(loggerDebug).toHaveBeenCalledWith(

769-

expect.stringContaining("fetch fallback: enabling sticky IPv4-only dispatcher"),

782+

expectLoggerMessageContaining(

783+

loggerDebug,

784+

"fetch fallback: enabling sticky IPv4-only dispatcher",

770785

);

771-

expect(loggerDebug).toHaveBeenCalledWith(

772-

expect.stringContaining("fetch fallback: recovered from attempt 1 to attempt 0"),

786+

expectLoggerMessageContaining(

787+

loggerDebug,

788+

"fetch fallback: recovered from attempt 1 to attempt 0",

773789

);

774-

expect(loggerWarn).not.toHaveBeenCalledWith(

775-

expect.stringContaining("fetch fallback: enabling sticky IPv4-only dispatcher"),

790+

expectNoLoggerMessageContaining(

791+

loggerWarn,

792+

"fetch fallback: enabling sticky IPv4-only dispatcher",

776793

);

777794

});

778795

@@ -812,11 +829,10 @@ describe("resolveTelegramFetch", () => {

812829

expect(eighthDispatcher).toBe(firstDispatcher);

813830

expect(ninthDispatcher).toBe(firstDispatcher);

814831

expectPinnedFallbackIpDispatcher(3);

815-

expect(loggerWarn).toHaveBeenCalledWith(

816-

expect.stringContaining("fetch fallback: DNS-resolved IP unreachable"),

817-

);

818-

expect(loggerDebug).toHaveBeenCalledWith(

819-

expect.stringContaining("fetch fallback: recovered from attempt 2 to attempt 0"),

832+

expectLoggerMessageContaining(loggerWarn, "fetch fallback: DNS-resolved IP unreachable");

833+

expectLoggerMessageContaining(

834+

loggerDebug,

835+

"fetch fallback: recovered from attempt 2 to attempt 0",

820836

);

821837

});

822838

@@ -855,9 +871,7 @@ describe("resolveTelegramFetch", () => {

855871

expect(getDispatcherFromUndiciCall(7)).toBe(firstDispatcher);

856872

expect(getDispatcherFromUndiciCall(8)).toBe(secondDispatcher);

857873

expect(getDispatcherFromUndiciCall(9)).toBe(secondDispatcher);

858-

expect(loggerDebug).toHaveBeenCalledWith(

859-

expect.stringContaining("fetch fallback: re-probing primary dispatcher"),

860-

);

874+

expectLoggerMessageContaining(loggerDebug, "fetch fallback: re-probing primary dispatcher");

861875

});

862876863877

it("keeps the armed fallback sticky when all attempts fail", async () => {

@@ -933,12 +947,11 @@ describe("resolveTelegramFetch", () => {

933947

expect(getDispatcherFromUndiciCall(7)).toBe(getDispatcherFromUndiciCall(3));

934948

expect(getDispatcherFromUndiciCall(8)).toBe(getDispatcherFromUndiciCall(1));

935949

expect(getDispatcherFromUndiciCall(9)).toBe(getDispatcherFromUndiciCall(2));

936-

expect(loggerWarn).toHaveBeenCalledWith(

937-

expect.stringContaining("telegram transport attempt marked temporarily unhealthy"),

938-

);

939-

expect(loggerDebug).toHaveBeenCalledWith(

940-

expect.stringContaining("fetch fallback: re-probing primary dispatcher"),

950+

expectLoggerMessageContaining(

951+

loggerWarn,

952+

"telegram transport attempt marked temporarily unhealthy",

941953

);

954+

expectLoggerMessageContaining(loggerDebug, "fetch fallback: re-probing primary dispatcher");

942955

});

943956944957

it("preserves caller-provided dispatcher across fallback retry", async () => {