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

推荐订阅源

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
test: guard plugin object helpers · openclaw/openclaw@860...
steipete · 2026-05-12 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -103,8 +103,9 @@ function createAutoEnabledCliFixture() {

103103
104104

function getMockCallObject(mock: ReturnType<typeof vi.fn>, callIndex = 0, argIndex = 0) {

105105

const value = mock.mock.calls[callIndex]?.[argIndex];

106-

expect(typeof value).toBe("object");

107-

expect(value).not.toBeNull();

106+

if (!value || typeof value !== "object") {

107+

throw new Error(`expected mock call ${callIndex} arg ${argIndex} object`);

108+

}

108109

return value as Record<string, unknown>;

109110

}

110111
Original file line numberDiff line numberDiff line change

@@ -53,8 +53,9 @@ function collectSchemaPaths(schema: unknown, prefix = ""): string[] {

5353

}

5454
5555

function asRecord(value: unknown): Record<string, unknown> {

56-

expect(value).not.toBeNull();

57-

expect(typeof value).toBe("object");

56+

if (!value || typeof value !== "object") {

57+

throw new Error("expected record");

58+

}

5859

expect(Array.isArray(value)).toBe(false);

5960

return value as Record<string, unknown>;

6061

}

Original file line numberDiff line numberDiff line change

@@ -18,8 +18,9 @@ import { createPluginRecord } from "../status.test-helpers.js";

1818

import { runTrustedToolPolicies } from "../trusted-tool-policy.js";

1919
2020

function requireRecord(value: unknown, label: string): Record<string, unknown> {

21-

expect(value, label).toBeTypeOf("object");

22-

expect(value, label).not.toBeNull();

21+

if (!value || typeof value !== "object") {

22+

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

23+

}

2324

return value as Record<string, unknown>;

2425

}

2526
Original file line numberDiff line numberDiff line change

@@ -35,7 +35,6 @@ function expectedGitRepoDir(params: { gitDir: string; normalizedSpec: string }):

3535
3636

function expectParsedGitSpec(spec: string) {

3737

const parsed = parseGitPluginSpec(spec);

38-

expect(parsed).not.toBeNull();

3938

if (!parsed) {

4039

throw new Error(`Expected ${spec} to parse as a git plugin spec`);

4140

}

Original file line numberDiff line numberDiff line change

@@ -80,7 +80,6 @@ function createCandidate(rootDir: string, options: { id?: string } = {}): Plugin

8080

}

8181
8282

function requirePersisted(index: InstalledPluginIndex | null): InstalledPluginIndex {

83-

expect(index).not.toBeNull();

8483

if (!index) {

8584

throw new Error("Expected persisted installed plugin index");

8685

}

Original file line numberDiff line numberDiff line change

@@ -156,15 +156,17 @@ async function expectRemoteMarketplaceError(params: { manifest: unknown; expecte

156156
157157

function installPluginInput(callIndex = 0): Record<string, unknown> {

158158

const input = installPluginFromPathMock.mock.calls[callIndex]?.[0];

159-

expect(typeof input).toBe("object");

160-

expect(input).not.toBeNull();

159+

if (!input || typeof input !== "object") {

160+

throw new Error(`expected install plugin input ${callIndex}`);

161+

}

161162

return input as Record<string, unknown>;

162163

}

163164
164165

function fetchGuardInput(callIndex = 0): Record<string, unknown> {

165166

const input = fetchWithSsrFGuardMock.mock.calls[callIndex]?.[0];

166-

expect(typeof input).toBe("object");

167-

expect(input).not.toBeNull();

167+

if (!input || typeof input !== "object") {

168+

throw new Error(`expected fetch guard input ${callIndex}`);

169+

}

168170

return input as Record<string, unknown>;

169171

}

170172

@@ -176,8 +178,9 @@ function expectMarketplaceInstallSuccess(

176178

marketplaceSource?: string;

177179

},

178180

) {

179-

expect(typeof result).toBe("object");

180-

expect(result).not.toBeNull();

181+

if (!result || typeof result !== "object") {

182+

throw new Error("expected marketplace install result");

183+

}

181184

const record = result as Record<string, unknown>;

182185

expect(record.ok).toBe(true);

183186

expect(record.pluginId).toBe(params.pluginId ?? "frontend-design");

Original file line numberDiff line numberDiff line change

@@ -35,8 +35,9 @@ function asPluginModuleLoaderFactory(factory: unknown): PluginModuleLoaderFactor

3535

}

3636
3737

function requireRecord(value: unknown, label: string): Record<string, unknown> {

38-

expect(value, label).toBeTypeOf("object");

39-

expect(value, label).not.toBeNull();

38+

if (!value || typeof value !== "object") {

39+

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

40+

}

4041

return value as Record<string, unknown>;

4142

}

4243
Original file line numberDiff line numberDiff line change

@@ -150,8 +150,9 @@ function createIndex(

150150

}

151151
152152

function requireRecord(value: unknown, label: string): Record<string, unknown> {

153-

expect(typeof value, label).toBe("object");

154-

expect(value, label).not.toBeNull();

153+

if (!value || typeof value !== "object") {

154+

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

155+

}

155156

return value as Record<string, unknown>;

156157

}

157158

@@ -838,7 +839,6 @@ describe("plugin registry facade", () => {

838839

});

839840
840841

const persisted = await readPersistedInstalledPluginIndex({ stateDir });

841-

expect(persisted).not.toBeNull();

842842

if (!persisted) {

843843

throw new Error("Expected persisted plugin index");

844844

}

Original file line numberDiff line numberDiff line change

@@ -65,8 +65,9 @@ function createCodexCredentials(extra: Record<string, unknown> = {}) {

6565

}

6666
6767

function expectFields(value: unknown, expected: Record<string, unknown>): void {

68-

expect(value).toBeTypeOf("object");

69-

expect(value).not.toBeNull();

68+

if (!value || typeof value !== "object") {

69+

throw new Error("expected fields object");

70+

}

7071

const record = value as Record<string, unknown>;

7172

for (const [key, expectedValue] of Object.entries(expected)) {

7273

expect(record[key], key).toEqual(expectedValue);

Original file line numberDiff line numberDiff line change

@@ -65,8 +65,9 @@ type MockCalls = {

6565

};

6666
6767

function requireRecord(value: unknown, label: string): Record<string, unknown> {

68-

expect(typeof value, label).toBe("object");

69-

expect(value, label).not.toBeNull();

68+

if (!value || typeof value !== "object") {

69+

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

70+

}

7071

return value as Record<string, unknown>;

7172

}

7273