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

推荐订阅源

H
Help Net Security
月光博客
月光博客
IT之家
IT之家
B
Blog RSS Feed
T
Tailwind CSS Blog
The GitHub Blog
The GitHub Blog
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
J
Java Code Geeks
Stack Overflow Blog
Stack Overflow Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - Franky
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
U
Unit 42
博客园_首页
B
Blog
V
V2EX
腾讯CDC
Vercel News
Vercel News
量子位
Microsoft Security Blog
Microsoft Security 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: guard support helper assertions · openclaw/openclaw...
steipete · 2026-05-12 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -98,7 +98,9 @@ function createDeferred(): { promise: Promise<void>; resolve: () => void } {

9898

}

9999
100100

function expectRecordFields(record: unknown, expected: Record<string, unknown>) {

101-

expect(record).toBeDefined();

101+

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

102+

throw new Error("Expected record");

103+

}

102104

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

103105

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

104106

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

@@ -136,7 +138,9 @@ function findMockCallFields(mock: ReturnType<typeof vi.fn>, expected: Record<str

136138

}

137139
138140

function expectMockCallFields(mock: ReturnType<typeof vi.fn>, expected: Record<string, unknown>) {

139-

expect(findMockCallFields(mock, expected)).toBeDefined();

141+

if (!findMockCallFields(mock, expected)) {

142+

throw new Error(`Expected mock call ${JSON.stringify(expected)}`);

143+

}

140144

}

141145
142146

function expectNoMockCallFields(mock: ReturnType<typeof vi.fn>, expected: Record<string, unknown>) {

Original file line numberDiff line numberDiff line change

@@ -336,7 +336,6 @@ describe("acp translator stable lifecycle handlers", () => {

336336

const result = await agent.resumeSession(createResumeSessionRequest("agent:main:work"));

337337
338338

expect(result.modes?.currentModeId).toBe("adaptive");

339-

expect(result.configOptions).toBeDefined();

340339

if (!result.configOptions) {

341340

throw new Error("expected resume session config options");

342341

}

Original file line numberDiff line numberDiff line change

@@ -139,9 +139,11 @@ function configOptions(value: unknown) {

139139
140140

function expectConfigOption(options: unknown, id: string, fields: Record<string, unknown>) {

141141

const option = configOptions(options).find((candidate) => candidate.id === id);

142-

expect(option, `config option ${id}`).toBeDefined();

142+

if (!option) {

143+

throw new Error(`Expected config option ${id}`);

144+

}

143145

for (const [field, value] of Object.entries(fields)) {

144-

expect(option?.[field]).toEqual(value);

146+

expect(option[field]).toEqual(value);

145147

}

146148

}

147149
Original file line numberDiff line numberDiff line change

@@ -592,7 +592,6 @@ describe("commands registry args", () => {

592592

};

593593
594594

const args = parseCommandArgs(command, "set foo bar baz");

595-

expect(args).toBeDefined();

596595

if (!args) {

597596

throw new Error("Expected parsed command args");

598597

}

Original file line numberDiff line numberDiff line change

@@ -236,7 +236,6 @@ async function expectNextRunUsesTargetSession(

236236

const runParams = params.runEmbeddedPiAgentMock.mock.calls[0]?.[0] as

237237

| Record<string, unknown>

238238

| undefined;

239-

expect(runParams).toBeDefined();

240239

if (!runParams) {

241240

throw new Error("expected embedded PI agent call params");

242241

}

Original file line numberDiff line numberDiff line change

@@ -43,7 +43,6 @@ function expectAuditRecord(

4343
4444

function requireFirstMockCall(mock: unknown, label: string): unknown[] {

4545

const call = (mock as { mock?: { calls?: unknown[][] } }).mock?.calls?.[0];

46-

expect(call).toBeDefined();

4746

if (!call) {

4847

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

4948

}

Original file line numberDiff line numberDiff line change

@@ -80,8 +80,10 @@ function makePluginRegistry(overrides: Partial<PluginRegistry> = {}): PluginRegi

8080
8181

function callArg<T>(mock: { mock: { calls: unknown[][] } }, index = 0, _type?: (value: T) => T): T {

8282

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

83-

expect(call).toBeDefined();

84-

return call?.[0] as T;

83+

if (!call) {

84+

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

85+

}

86+

return call[0] as T;

8587

}

8688
8789

function expectExternalCatalogInstallCall(index = 0) {

Original file line numberDiff line numberDiff line change

@@ -24,7 +24,9 @@ vi.mock("./channel-resolution.js", () => ({

2424
2525

function mockCallArg(mock: { mock: { calls: unknown[][] } }, index = 0): unknown {

2626

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

27-

expect(call).toBeDefined();

27+

if (!call) {

28+

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

29+

}

2830

return call[0];

2931

}

3032
Original file line numberDiff line numberDiff line change

@@ -94,7 +94,6 @@ function requireMatchingRecord(

9494

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

9595

return Object.entries(fields).every(([key, value]) => Object.is(record[key], value));

9696

});

97-

expect(found).toBeDefined();

9897

if (!found) {

9998

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

10099

}

@@ -104,7 +103,6 @@ function requireMatchingRecord(

104103

function requireFirstMockCallArg(mock: unknown, label: string) {

105104

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

106105

const call = calls?.[0];

107-

expect(call).toBeDefined();

108106

if (!call) {

109107

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

110108

}

Original file line numberDiff line numberDiff line change

@@ -553,7 +553,9 @@ describe("handleSystemRunInvoke mac app exec host routing", () => {

553553

});

554554
555555

const shellWrapperCall = requireMacExecHostCall(shellWrapperInvoke.runViaMacAppExecHost);

556-

expect(shellWrapperCall.approvals).toBeDefined();

556+

if (shellWrapperCall.approvals === undefined) {

557+

throw new Error("Expected shell-wrapper approvals");

558+

}

557559

expect(shellWrapperCall.request?.command).toEqual([

558560

"/bin/sh",

559561

"-lc",

@@ -621,7 +623,9 @@ describe("handleSystemRunInvoke mac app exec host routing", () => {

621623

const canonicalCwd = fs.realpathSync(tmp);

622624

expect(invoke.runCommand).not.toHaveBeenCalled();

623625

const macHostCall = requireMacExecHostCall(invoke.runViaMacAppExecHost);

624-

expect(macHostCall.approvals).toBeDefined();

626+

if (macHostCall.approvals === undefined) {

627+

throw new Error("Expected Mac host approvals");

628+

}

625629

expect(macHostCall.request?.command).toEqual(["env", "sh", "-c", "echo SAFE"]);

626630

expect(macHostCall.request?.rawCommand).toBe('env sh -c "echo SAFE"');

627631

expect(macHostCall.request?.cwd).toBe(canonicalCwd);