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

推荐订阅源

大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
M
MIT News - Artificial intelligence
量子位
N
Netflix TechBlog - Medium
The Cloudflare Blog
The GitHub Blog
The GitHub Blog
P
Proofpoint News Feed
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
B
Blog
博客园_首页
博客园 - Franky
MyScale Blog
MyScale Blog
有赞技术团队
有赞技术团队
Apple Machine Learning Research
Apple Machine Learning Research
MongoDB | Blog
MongoDB | Blog
云风的 BLOG
云风的 BLOG
爱范儿
爱范儿
H
Help Net Security
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell

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

@@ -25,17 +25,19 @@ function requireFallbackSeed(

2525

}

2626
2727

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

28-

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

29-

expect(value).not.toBeNull();

28+

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

29+

throw new Error("expected fields object");

30+

}

3031

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

3132

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

3233

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

3334

}

3435

}

3536
3637

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

37-

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

38-

expect(value).not.toBeNull();

38+

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

39+

throw new Error("expected record");

40+

}

3941

return value as Record<string, unknown>;

4042

}

4143
Original file line numberDiff line numberDiff line change

@@ -109,8 +109,9 @@ function createCronConfig(name: string): OpenClawConfig {

109109

}

110110
111111

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

112-

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

113-

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

112+

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

113+

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

114+

}

114115

return value as Record<string, unknown>;

115116

}

116117
Original file line numberDiff line numberDiff line change

@@ -49,8 +49,9 @@ function requireNonEmptyString(value: unknown, message: string): string {

4949

}

5050
5151

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

52-

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

53-

expect(value).not.toBeNull();

52+

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

53+

throw new Error("expected fields object");

54+

}

5455

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

5556

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

5657

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

Original file line numberDiff line numberDiff line change

@@ -90,8 +90,9 @@ function findMessageWithIdempotencyKey(

9090

}

9191
9292

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

93-

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

94-

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

93+

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

94+

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

95+

}

9596

return value as Record<string, unknown>;

9697

}

9798
Original file line numberDiff line numberDiff line change

@@ -47,8 +47,9 @@ type MockCallSource = {

4747

};

4848
4949

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

50-

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

51-

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

50+

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

51+

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

52+

}

5253

return value as Record<string, unknown>;

5354

}

5455
Original file line numberDiff line numberDiff line change

@@ -183,8 +183,9 @@ function buildCtx(): NodeEventContext {

183183

}

184184
185185

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

186-

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

187-

expect(value).not.toBeNull();

186+

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

187+

throw new Error("expected fields object");

188+

}

188189

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

189190

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

190191

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

Original file line numberDiff line numberDiff line change

@@ -20,8 +20,9 @@ import {

2020

const { createSessionStoreDir, openClient } = setupGatewaySessionsTestHarness();

2121
2222

function expectObject(value: unknown) {

23-

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

24-

expect(value).not.toBeNull();

23+

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

24+

throw new Error("expected object");

25+

}

2526

}

2627
2728

test("sessions.delete rejects main and aborts active runs", async () => {

Original file line numberDiff line numberDiff line change

@@ -79,8 +79,9 @@ function createMonitorHarness(params?: { cpuMsPerWallMs?: number; utilization?:

7979

}

8080
8181

function expectSnapshotFields(snapshot: unknown, expected: Record<string, unknown>) {

82-

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

83-

expect(snapshot).not.toBeNull();

82+

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

83+

throw new Error("expected event loop health snapshot");

84+

}

8485

const actual = snapshot as Record<string, unknown>;

8586

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

8687

expect(actual[key]).toEqual(value);

Original file line numberDiff line numberDiff line change

@@ -84,8 +84,9 @@ function requireString(value: string | undefined, label: string): string {

8484

}

8585
8686

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

87-

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

88-

expect(value).not.toBeNull();

87+

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

88+

throw new Error("expected fields object");

89+

}

8990

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

9091

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

9192

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