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

推荐订阅源

N
Netflix TechBlog - Medium
I
InfoQ
Engineering at Meta
Engineering at Meta
Jina AI
Jina AI
Recent Announcements
Recent Announcements
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
D
Docker
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
博客园 - Franky
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 叶小钗
酷 壳 – CoolShell
酷 壳 – CoolShell
B
Blog RSS Feed
WordPress大学
WordPress大学
MyScale Blog
MyScale 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
test: pin Telegram draft stream checks · openclaw/opencla...
shakkernerd · 2026-05-11 · via Recent Commits to openclaw:main

@@ -159,8 +159,12 @@ describe("createTelegramDraftStream", () => {

159159160160

expect(api.sendMessage).toHaveBeenCalledTimes(1);

161161

expect(api.sendMessage).toHaveBeenCalledWith(123, "Hello", { message_thread_id: 42 });

162-

expect(warn).toHaveBeenCalledWith(expect.stringContaining("message thread not found"));

163-

expect(warn).not.toHaveBeenCalledWith(expect.stringContaining("retrying without thread"));

162+

expect(warn).toHaveBeenCalledWith(

163+

"telegram stream preview failed: 400: Bad Request: message thread not found",

164+

);

165+

expect(

166+

warn.mock.calls.some(([message]) => String(message).includes("retrying without thread")),

167+

).toBe(false);

164168

});

165169166170

it("keeps allow_sending_without_reply on message previews that target a reply", async () => {

@@ -318,12 +322,16 @@ describe("createTelegramDraftStream", () => {

318322

resolveFirstSend?.({ message_id: 17 });

319323

await stream.flush();

320324321-

expect(onSupersededPreview).toHaveBeenCalledWith({

325+

expect(onSupersededPreview).toHaveBeenCalledTimes(1);

326+

const [supersededPreview] = onSupersededPreview.mock.calls[0] ?? [];

327+

expect(supersededPreview).toEqual({

322328

messageId: 17,

323329

textSnapshot: "Message A partial",

324330

parseMode: undefined,

325-

visibleSinceMs: expect.any(Number),

331+

visibleSinceMs: supersededPreview.visibleSinceMs,

326332

});

333+

expect(typeof supersededPreview.visibleSinceMs).toBe("number");

334+

expect(Number.isFinite(supersededPreview.visibleSinceMs)).toBe(true);

327335

expect(api.sendMessage).toHaveBeenCalledTimes(2);

328336

expect(api.sendMessage).toHaveBeenNthCalledWith(2, 123, "Message B partial", undefined);

329337

expect(api.editMessageText).not.toHaveBeenCalledWith(123, 17, "Message B partial");

@@ -434,13 +442,17 @@ describe("createTelegramDraftStream", () => {

434442

stream.update("Hello world foo bar baz qux");

435443

await stream.flush();

436444437-

expect(onSupersededPreview).toHaveBeenCalledWith({

445+

expect(onSupersededPreview).toHaveBeenCalledTimes(1);

446+

const [supersededPreview] = onSupersededPreview.mock.calls[0] ?? [];

447+

expect(supersededPreview).toEqual({

438448

messageId: 17,

439449

textSnapshot: "Hello world",

440450

parseMode: undefined,

441-

visibleSinceMs: expect.any(Number),

451+

visibleSinceMs: supersededPreview.visibleSinceMs,

442452

retain: true,

443453

});

454+

expect(typeof supersededPreview.visibleSinceMs).toBe("number");

455+

expect(Number.isFinite(supersededPreview.visibleSinceMs)).toBe(true);

444456

});

445457446458

it("enforces maxChars after renderText expansion", async () => {

@@ -459,9 +471,7 @@ describe("createTelegramDraftStream", () => {

459471460472

expect(api.sendMessage).not.toHaveBeenCalled();

461473

expect(api.editMessageText).not.toHaveBeenCalled();

462-

expect(warn).toHaveBeenCalledWith(

463-

expect.stringContaining("telegram stream preview stopped (text length 127 > 100)"),

464-

);

474+

expect(warn).toHaveBeenCalledWith("telegram stream preview stopped (text length 127 > 100)");

465475

});

466476

});

467477