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

推荐订阅源

IT之家
IT之家
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
B
Blog RSS Feed
U
Unit 42
Stack Overflow Blog
Stack Overflow Blog
Recent Announcements
Recent Announcements
雷峰网
雷峰网
罗磊的独立博客
Microsoft Security Blog
Microsoft Security Blog
Hugging Face - Blog
Hugging Face - Blog
L
LangChain Blog
人人都是产品经理
人人都是产品经理
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Help Net Security
P
Proofpoint News Feed
The Cloudflare Blog
D
Docker
大猫的无限游戏
大猫的无限游戏

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: guard feishu mock helpers · openclaw/openclaw@2caa0d6
steipete · 2026-05-12 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -241,8 +241,10 @@ function mockCallArg<T>(

241241

_type?: (value: unknown) => value is T,

242242

): T {

243243

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

244-

expect(call).toBeDefined();

245-

return call?.[argIndex] as T;

244+

if (!call) {

245+

throw new Error(`Expected mock call at index ${callIndex}`);

246+

}

247+

return call[argIndex] as T;

246248

}

247249
248250

type FeishuRoutePeer = { id: string; kind: "direct" | "group" };

Original file line numberDiff line numberDiff line change

@@ -149,7 +149,9 @@ describe("createFeishuCommentReplyDispatcher", () => {

149149
150150

expect(status).toBe("done");

151151

const client = createFeishuClientMock.mock.results[0]?.value;

152-

expect(client).toBeDefined();

152+

if (!client) {

153+

throw new Error("Expected Feishu client");

154+

}

153155

expect(deliverCommentThreadTextMock).toHaveBeenCalledWith(client, {

154156

file_token: "doc_token_1",

155157

file_type: "docx",

Original file line numberDiff line numberDiff line change

@@ -72,8 +72,10 @@ function requireRecord(value: unknown, label: string): Record<string, unknown> {

7272

function callArg(mock: unknown, callIndex: number, argIndex: number, label: string) {

7373

const calls = (mock as { mock?: { calls?: Array<Array<unknown>> } }).mock?.calls ?? [];

7474

const call = calls.at(callIndex);

75-

expect(call, label).toBeDefined();

76-

return call?.[argIndex];

75+

if (!call) {

76+

throw new Error(`Expected ${label}`);

77+

}

78+

return call[argIndex];

7779

}

7880
7981

function expectLoadWebMediaCall(fileName: string, localRoots: unknown[] | undefined) {

Original file line numberDiff line numberDiff line change

@@ -52,8 +52,10 @@ function mockCallArg<T>(

5252

_type?: (value: unknown) => value is T,

5353

): T {

5454

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

55-

expect(call).toBeDefined();

56-

return call?.[argIndex] as T;

55+

if (!call) {

56+

throw new Error(`Expected mock call at index ${callIndex}`);

57+

}

58+

return call[argIndex] as T;

5759

}

5860
5961

type FeishuDriveRequest = {

@@ -633,7 +635,9 @@ describe("registerFeishuDriveTools", () => {

633635

client?: unknown;

634636

deliveryContext?: { channel?: string; threadId?: string; to?: string };

635637

}>(cleanupAmbientCommentTypingReactionMock, 0, 0);

636-

expect(cleanupRequest.client).toBeDefined();

638+

if (!cleanupRequest.client) {

639+

throw new Error("Expected cleanup request client");

640+

}

637641

expect(cleanupRequest.deliveryContext).toEqual({

638642

channel: "feishu",

639643

to: "comment:docx:doc_1:c1",

@@ -707,7 +711,9 @@ describe("registerFeishuDriveTools", () => {

707711

client?: unknown;

708712

deliveryContext?: { channel?: string; threadId?: string; to?: string };

709713

}>(cleanupAmbientCommentTypingReactionMock, 0, 0);

710-

expect(cleanupRequest.client).toBeDefined();

714+

if (!cleanupRequest.client) {

715+

throw new Error("Expected cleanup request client");

716+

}

711717

expect(cleanupRequest.deliveryContext).toEqual({

712718

channel: "feishu",

713719

to: "comment:docx:doc_1:c1",

Original file line numberDiff line numberDiff line change

@@ -91,8 +91,10 @@ function mockCallArg<T>(

9191

_type?: (value: unknown) => value is T,

9292

): T {

9393

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

94-

expect(call).toBeDefined();

95-

return call?.[argIndex] as T;

94+

if (!call) {

95+

throw new Error(`Expected mock call at index ${callIndex}`);

96+

}

97+

return call[argIndex] as T;

9698

}

9799
98100

function callData<T>(

@@ -101,7 +103,9 @@ function callData<T>(

101103

_type?: (value: unknown) => value is T,

102104

): T {

103105

const arg = mockCallArg<{ data?: unknown }>(mock, callIndex, 0);

104-

expect(arg.data).toBeDefined();

106+

if (arg.data === undefined) {

107+

throw new Error(`Expected mock call data at index ${callIndex}`);

108+

}

105109

return arg.data as T;

106110

}

107111
Original file line numberDiff line numberDiff line change

@@ -801,8 +801,11 @@ describe("feishuOutbound comment-thread routing", () => {

801801
802802

expect(status).toBe("done");

803803

expect(deliverCommentThreadTextMock).toHaveBeenCalled();

804-

expect(cleanupReactionCall()?.client).toBeDefined();

805-

expect(cleanupReactionCall()?.deliveryContext).toEqual({

804+

const cleanupCall = cleanupReactionCall();

805+

if (!cleanupCall?.client) {

806+

throw new Error("Expected cleanup reaction client");

807+

}

808+

expect(cleanupCall.deliveryContext).toEqual({

806809

channel: "feishu",

807810

to: "comment:docx:doxcn123:7623358762119646411",

808811

threadId: "reply_ambient_1",

Original file line numberDiff line numberDiff line change

@@ -245,7 +245,9 @@ describe("createFeishuReplyDispatcher streaming behavior", () => {

245245

expected: Record<string, unknown>,

246246

): Record<string, unknown> {

247247

const start = streamingInstances[instanceIndex]?.start;

248-

expect(start, "streaming instance must exist").toBeDefined();

248+

if (!start) {

249+

throw new Error(`Expected streaming instance ${instanceIndex}`);

250+

}

249251

expect(start.mock.calls[0]?.[0]).toBe("oc_chat");

250252

expect(start.mock.calls[0]?.[1]).toBe("chat_id");

251253

return expectRecordFields(start.mock.calls[0]?.[2], "streaming start options", expected);