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

推荐订阅源

F
Fortinet All Blogs
爱范儿
爱范儿
P
Proofpoint News Feed
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
J
Java Code Geeks
宝玉的分享
宝玉的分享
Jina AI
Jina AI
B
Blog
N
Netflix TechBlog - Medium
Recent Announcements
Recent Announcements
aimingoo的专栏
aimingoo的专栏
腾讯CDC
C
Check Point Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - Franky
罗磊的独立博客
B
Blog RSS Feed
WordPress大学
WordPress大学
小众软件
小众软件
博客园 - 叶小钗
M
MIT News - Artificial intelligence
GbyAI
GbyAI

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: dedupe feishu comment mock reads · openclaw/opencla...
steipete · 2026-05-13 · via Recent Commits to openclaw:main

@@ -212,6 +212,18 @@ async function setupCommentMonitorHandler(): Promise<(data: unknown) => Promise<

212212

});

213213

}

214214215+

function mockCallAt(

216+

mock: { mock: { calls: Array<readonly unknown[]> } },

217+

index: number,

218+

label: string,

219+

): readonly unknown[] {

220+

const call = mock.mock.calls[index];

221+

if (!call) {

222+

throw new Error(`expected ${label} call`);

223+

}

224+

return call;

225+

}

226+215227

describe("resolveDriveCommentEventTurn", () => {

216228

it("builds a real comment-turn prompt for add_comment notices", async () => {

217229

const client = makeOpenApiClient({ includeTargetReplyInBatch: true });

@@ -828,7 +840,7 @@ describe("drive.notice.comment_add_v1 monitor handler", () => {

828840

await onComment(makeDriveCommentEvent());

829841830842

expect(handleFeishuCommentEventMock).toHaveBeenCalledTimes(1);

831-

const handleArgs = handleFeishuCommentEventMock.mock.calls.at(0)?.[0] as

843+

const handleArgs = mockCallAt(handleFeishuCommentEventMock, 0, "Feishu comment handler")[0] as

832844

| {

833845

accountId?: string;

834846

botOpenId?: string;

@@ -880,12 +892,16 @@ describe("drive.notice.comment_add_v1 monitor handler", () => {

880892

await vi.waitFor(() => {

881893

expect(handleFeishuCommentEventMock).toHaveBeenCalledTimes(2);

882894

});

883-

const firstCallArgs = handleFeishuCommentEventMock.mock.calls.at(0) as

884-

| [{ event?: { event_id?: string } }]

885-

| undefined;

886-

const secondCallArgs = handleFeishuCommentEventMock.mock.calls.at(1) as

887-

| [{ event?: { event_id?: string } }]

888-

| undefined;

895+

const firstCallArgs = mockCallAt(

896+

handleFeishuCommentEventMock,

897+

0,

898+

"first Feishu comment handler",

899+

) as [{ event?: { event_id?: string } }] | undefined;

900+

const secondCallArgs = mockCallAt(

901+

handleFeishuCommentEventMock,

902+

1,

903+

"second Feishu comment handler",

904+

) as [{ event?: { event_id?: string } }] | undefined;

889905

const firstCall = firstCallArgs?.[0];

890906

const secondCall = secondCallArgs?.[0];

891907

expect(firstCall?.event?.event_id).toBe("evt_1");

@@ -917,8 +933,11 @@ describe("drive.notice.comment_add_v1 monitor handler", () => {

917933

"feishu[default]: error handling drive comment notice: Error: post-send failure",

918934

);

919935

});

920-

const [recordedMessageId, recordedNamespace, recordedLogger] =

921-

(dedup.recordProcessedFeishuMessage as ReturnType<typeof vi.fn>).mock.calls.at(0) ?? [];

936+

const [recordedMessageId, recordedNamespace, recordedLogger] = mockCallAt(

937+

dedup.recordProcessedFeishuMessage as ReturnType<typeof vi.fn>,

938+

0,

939+

"Feishu processed-message record",

940+

);

922941

expect(recordedMessageId).toBe("drive-comment:10d9d60b990db39f96a4c2fd357fb877");

923942

expect(recordedNamespace).toBe("default");

924943

expect(typeof recordedLogger).toBe("function");