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

推荐订阅源

Google DeepMind News
Google DeepMind News
I
InfoQ
Engineering at Meta
Engineering at Meta
D
DataBreaches.Net
L
LangChain Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
GbyAI
GbyAI
爱范儿
爱范儿
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
美团技术团队
罗磊的独立博客
Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
T
The Blog of Author Tim Ferriss
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
雷峰网
雷峰网
M
MIT News - Artificial intelligence
D
Docker
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs
博客园 - 叶小钗

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
perf: remove telegram dispatch polling waits · openclaw/o...
steipete · 2026-04-24 · via Recent Commits to openclaw:main

@@ -322,6 +322,17 @@ describe("dispatchTelegramMessage draft streaming", () => {

322322

};

323323

}

324324325+

function observeDeliveredReply(text: string): Promise<void> {

326+

return new Promise((resolve) => {

327+

deliverReplies.mockImplementation(async (params: { replies?: Array<{ text?: string }> }) => {

328+

if (params.replies?.some((reply) => reply.text === text)) {

329+

resolve();

330+

}

331+

return { delivered: true };

332+

});

333+

});

334+

}

335+325336

function createBot(): Bot {

326337

return {

327338

api: {

@@ -2900,7 +2911,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

29002911

await dispatcherOptions.deliver({ text: "⚙️ Agent was aborted." }, { kind: "final" });

29012912

return { queuedFinal: true };

29022913

});

2903-

deliverReplies.mockResolvedValue({ delivered: true });

2914+

const abortReplyDelivered = observeDeliveredReply("⚙️ Agent was aborted.");

29042915

editMessageTelegram.mockResolvedValue({ ok: true, chatId: "123", messageId: "1001" });

2905291629062917

const firstPromise = dispatchWithContext({

@@ -2927,13 +2938,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

29272938

}),

29282939

});

292929402930-

await vi.waitFor(() => {

2931-

expect(deliverReplies).toHaveBeenCalledWith(

2932-

expect.objectContaining({

2933-

replies: [{ text: "⚙️ Agent was aborted." }],

2934-

}),

2935-

);

2936-

});

2941+

await abortReplyDelivered;

2937294229382943

releaseFirstFinal();

29392944

await Promise.all([firstPromise, abortPromise]);

@@ -2985,7 +2990,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

29852990

await dispatcherOptions.deliver({ text: "⚙️ Agent was aborted." }, { kind: "final" });

29862991

return { queuedFinal: true };

29872992

});

2988-

deliverReplies.mockResolvedValue({ delivered: true });

2993+

const abortReplyDelivered = observeDeliveredReply("⚙️ Agent was aborted.");

2989299429902995

const firstPromise = dispatchWithContext({

29912996

context: createContext({

@@ -3011,13 +3016,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

30113016

}),

30123017

});

301330183014-

await vi.waitFor(() => {

3015-

expect(deliverReplies).toHaveBeenCalledWith(

3016-

expect.objectContaining({

3017-

replies: [{ text: "⚙️ Agent was aborted." }],

3018-

}),

3019-

);

3020-

});

3019+

await abortReplyDelivered;

3021302030223021

releaseFirstCleanup();

30233022

await Promise.all([firstPromise, abortPromise]);

@@ -3051,7 +3050,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

30513050

return { queuedFinal: true };

30523051

},

30533052

);

3054-

deliverReplies.mockResolvedValue({ delivered: true });

3053+

const abortReplyDelivered = observeDeliveredReply("⚙️ Agent was aborted.");

3055305430563055

const firstPromise = dispatchWithContext({

30573056

context: createContext({

@@ -3082,13 +3081,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

30823081

}),

30833082

});

308430833085-

await vi.waitFor(() => {

3086-

expect(deliverReplies).toHaveBeenCalledWith(

3087-

expect.objectContaining({

3088-

replies: [{ text: "⚙️ Agent was aborted." }],

3089-

}),

3090-

);

3091-

});

3084+

await abortReplyDelivered;

3092308530933086

releaseCatalogLoad();

30943087

await Promise.all([firstPromise, abortPromise]);

@@ -3160,7 +3153,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

31603153

await dispatcherOptions.deliver({ text: "⚙️ Agent was aborted." }, { kind: "final" });

31613154

return { queuedFinal: true };

31623155

});

3163-

deliverReplies.mockResolvedValue({ delivered: true });

3156+

const abortReplyDelivered = observeDeliveredReply("⚙️ Agent was aborted.");

31643157

editMessageTelegram.mockResolvedValue({ ok: true, chatId: "123", messageId: "1001" });

3165315831663159

const firstPromise = dispatchWithContext({

@@ -3188,13 +3181,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

31883181

}),

31893182

});

319031833191-

await vi.waitFor(() => {

3192-

expect(deliverReplies).toHaveBeenCalledWith(

3193-

expect.objectContaining({

3194-

replies: [{ text: "⚙️ Agent was aborted." }],

3195-

}),

3196-

);

3197-

});

3184+

await abortReplyDelivered;

3198318531993186

releaseFirstFinal();

32003187

await Promise.all([firstPromise, abortPromise]);

@@ -3246,7 +3233,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

32463233

await dispatcherOptions.deliver({ text: "⚙️ Agent was aborted." }, { kind: "final" });

32473234

return { queuedFinal: true };

32483235

});

3249-

deliverReplies.mockResolvedValue({ delivered: true });

3236+

const abortReplyDelivered = observeDeliveredReply("⚙️ Agent was aborted.");

32503237

editMessageTelegram.mockResolvedValue({ ok: true, chatId: "123", messageId: "1001" });

3251323832523239

const firstPromise = dispatchWithContext({

@@ -3285,13 +3272,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

32853272

}),

32863273

});

328732743288-

await vi.waitFor(() => {

3289-

expect(deliverReplies).toHaveBeenCalledWith(

3290-

expect.objectContaining({

3291-

replies: [{ text: "⚙️ Agent was aborted." }],

3292-

}),

3293-

);

3294-

});

3275+

await abortReplyDelivered;

3295327632963277

vi.useFakeTimers();

32973278

try {

@@ -3359,7 +3340,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

33593340

await dispatcherOptions.deliver({ text: "⚙️ Agent was aborted." }, { kind: "final" });

33603341

return { queuedFinal: true };

33613342

});

3362-

deliverReplies.mockResolvedValue({ delivered: true });

3343+

const abortReplyDelivered = observeDeliveredReply("⚙️ Agent was aborted.");

3363334433643345

const firstPromise = dispatchWithContext({

33653346

context: createContext({

@@ -3388,13 +3369,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

33883369

bot,

33893370

});

339033713391-

await vi.waitFor(() => {

3392-

expect(deliverReplies).toHaveBeenCalledWith(

3393-

expect.objectContaining({

3394-

replies: [{ text: "⚙️ Agent was aborted." }],

3395-

}),

3396-

);

3397-

});

3372+

await abortReplyDelivered;

3398337333993374

releaseMaterialize();

34003375

await Promise.all([firstPromise, abortPromise]);

@@ -3440,7 +3415,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

34403415

await dispatcherOptions.deliver({ text: "⚙️ Agent was aborted." }, { kind: "final" });

34413416

return { queuedFinal: true };

34423417

});

3443-

deliverReplies.mockResolvedValue({ delivered: true });

3418+

const abortReplyDelivered = observeDeliveredReply("⚙️ Agent was aborted.");

34443419

editMessageTelegram.mockResolvedValue({ ok: true, chatId: "123", messageId: "1001" });

3445342034463421

const firstPromise = dispatchWithContext({

@@ -3468,13 +3443,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

34683443

}),

34693444

});

347034453471-

await vi.waitFor(() => {

3472-

expect(deliverReplies).toHaveBeenCalledWith(

3473-

expect.objectContaining({

3474-

replies: [{ text: "⚙️ Agent was aborted." }],

3475-

}),

3476-

);

3477-

});

3446+

await abortReplyDelivered;

3478344734793448

releaseFirstFinal();

34803449

await Promise.all([firstPromise, abortPromise]);

@@ -3641,7 +3610,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

36413610

await dispatcherOptions.deliver({ text: "Unauthorized stop" }, { kind: "final" });

36423611

return { queuedFinal: true };

36433612

});

3644-

deliverReplies.mockResolvedValue({ delivered: true });

3613+

const unauthorizedReplyDelivered = observeDeliveredReply("Unauthorized stop");

36453614

editMessageTelegram.mockResolvedValue({ ok: true, chatId: "123", messageId: "1001" });

3646361536473616

const firstPromise = dispatchWithContext({

@@ -3668,13 +3637,7 @@ describe("dispatchTelegramMessage draft streaming", () => {

36683637

}),

36693638

});

367036393671-

await vi.waitFor(() => {

3672-

expect(deliverReplies).toHaveBeenCalledWith(

3673-

expect.objectContaining({

3674-

replies: [{ text: "Unauthorized stop" }],

3675-

}),

3676-

);

3677-

});

3640+

await unauthorizedReplyDelivered;

3678364136793642

releaseFirstFinal();

36803643

await Promise.all([firstPromise, unauthorizedPromise]);