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

推荐订阅源

GbyAI
GbyAI
B
Blog
Stack Overflow Blog
Stack Overflow Blog
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
Recent Announcements
Recent Announcements
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
D
DataBreaches.Net
Microsoft Azure Blog
Microsoft Azure Blog
G
Google Developers Blog
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
罗磊的独立博客
L
LangChain Blog
V
Visual Studio Blog
雷峰网
雷峰网
aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享

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: avoid infra count filter allocations · openclaw/ope...
steipete · 2026-05-09 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -305,7 +305,7 @@ describe("bonjour-discovery", () => {

305305

run: run as unknown as typeof runCommandWithTimeout,

306306

});

307307
308-

expect(calls.filter((c) => c[1] === "-B")).toHaveLength(1);

308+

expect(calls.reduce((count, c) => count + (c[1] === "-B" ? 1 : 0), 0)).toBe(1);

309309

expect(calls.find((c) => c[1] === "-B")?.[3]).toBe("local.");

310310

});

311311

});

Original file line numberDiff line numberDiff line change

@@ -58,6 +58,16 @@ function withoutSigusr1Listeners(fn: () => void): void {

5858

}

5959

}

6060
61+

function countSigusr1Emits(calls: readonly unknown[][]): number {

62+

let count = 0;

63+

for (const args of calls) {

64+

if (args[0] === "SIGUSR1") {

65+

count += 1;

66+

}

67+

}

68+

return count;

69+

}

70+
6171

function withRestartSupervisorEnabled(fn: () => void): void {

6272

const originalVitest = process.env.VITEST;

6373

const originalNodeEnv = process.env.NODE_ENV;

@@ -417,10 +427,10 @@ describe("infra runtime", () => {

417427

expect(second.cooldownMsApplied).toBe(30_000);

418428
419429

await vi.advanceTimersByTimeAsync(29_999);

420-

expect(emitSpy.mock.calls.filter((args) => args[0] === "SIGUSR1").length).toBe(1);

430+

expect(countSigusr1Emits(emitSpy.mock.calls)).toBe(1);

421431
422432

await vi.advanceTimersByTimeAsync(1);

423-

expect(emitSpy.mock.calls.filter((args) => args[0] === "SIGUSR1").length).toBe(2);

433+

expect(countSigusr1Emits(emitSpy.mock.calls)).toBe(2);

424434

} finally {

425435

process.removeListener("SIGUSR1", handler);

426436

}

@@ -447,7 +457,7 @@ describe("infra runtime", () => {

447457

expect(forced.cooldownMsApplied).toBe(0);

448458
449459

await vi.advanceTimersByTimeAsync(0);

450-

expect(emitSpy.mock.calls.filter((args) => args[0] === "SIGUSR1").length).toBe(2);

460+

expect(countSigusr1Emits(emitSpy.mock.calls)).toBe(2);

451461

expect(peekGatewaySigusr1RestartReason()).toBe("update.run");

452462

} finally {

453463

process.removeListener("SIGUSR1", handler);

Original file line numberDiff line numberDiff line change

@@ -25,6 +25,16 @@ function normalizeReconnectAccountIdForTest(accountId?: string | null): string {

2525

return (accountId ?? "").trim() || "default";

2626

}

2727
28+

function countMatching<T>(items: readonly T[], predicate: (item: T) => boolean): number {

29+

let count = 0;

30+

for (const item of items) {

31+

if (predicate(item)) {

32+

count += 1;

33+

}

34+

}

35+

return count;

36+

}

37+
2838

async function drainDirectChatReconnectPending(opts: {

2939

accountId: string;

3040

deliver: DeliverFn;

@@ -347,7 +357,7 @@ describe("drainPendingDeliveries for reconnect", () => {

347357

await startupRecovery;

348358
349359

expect(deliver).toHaveBeenCalledTimes(2);

350-

expect(deliveredTargets.filter((target) => target === "+1555")).toHaveLength(1);

360+

expect(countMatching(deliveredTargets, (target) => target === "+1555")).toBe(1);

351361

expect(startupLog.info).toHaveBeenCalledWith(

352362

expect.stringContaining("Recovery skipped for delivery"),

353363

);

Original file line numberDiff line numberDiff line change

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

149149

expect(requireStoreEntry(store, "agent:main:work").sessionId).toBe("main-session");

150150

expect(requireStoreEntry(store, "agent:ops:work").sessionId).toBe("ops-session");

151151

// The key must NOT have been merged into ops namespace

152-

expect(Object.keys(store).filter((k) => k.startsWith("agent:ops:")).length).toBe(1);

152+

expect(

153+

Object.keys(store).reduce((count, k) => count + (k.startsWith("agent:ops:") ? 1 : 0), 0),

154+

).toBe(1);

153155

});

154156

});

155157
Original file line numberDiff line numberDiff line change

@@ -72,6 +72,16 @@ const hoisted = vi.hoisted(() => {

7272

};

7373

});

7474
75+

function countMatching<T>(items: readonly T[], predicate: (item: T) => boolean): number {

76+

let count = 0;

77+

for (const item of items) {

78+

if (predicate(item)) {

79+

count += 1;

80+

}

81+

}

82+

return count;

83+

}

84+
7585

vi.mock("../acp/control-plane/manager.js", () => ({

7686

getAcpSessionManager: () => ({

7787

cancelSession: hoisted.cancelSessionMock,

@@ -1120,7 +1130,7 @@ describe("task-registry", () => {

11201130

deliveryStatus: "pending",

11211131

});

11221132
1123-

expect(listTaskRecords().filter((task) => task.runId === "run-shared")).toHaveLength(2);

1133+

expect(countMatching(listTaskRecords(), (task) => task.runId === "run-shared")).toBe(2);

11241134

expect(findTaskByRunId("run-shared")).toMatchObject({

11251135

runtime: "acp",

11261136

task: "Spawn ACP child",

@@ -1367,7 +1377,7 @@ describe("task-registry", () => {

13671377

});

13681378
13691379

expect(directTask.taskId).toBe(spawnedTask.taskId);

1370-

expect(listTaskRecords().filter((task) => task.runId === "run-collapse")).toHaveLength(1);

1380+

expect(countMatching(listTaskRecords(), (task) => task.runId === "run-collapse")).toBe(1);

13711381

expect(findTaskByRunId("run-collapse")).toMatchObject({

13721382

task: "Spawn ACP child",

13731383

});