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

推荐订阅源

V
V2EX
IT之家
IT之家
博客园 - 叶小钗
雷峰网
雷峰网
T
Tailwind CSS Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
SegmentFault 最新的问题
Apple Machine Learning Research
Apple Machine Learning Research
爱范儿
爱范儿
博客园 - 【当耐特】
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
大猫的无限游戏
大猫的无限游戏
Last Week in AI
Last Week in AI
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
Jina AI
Jina AI
博客园 - Franky
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
宝玉的分享
宝玉的分享
阮一峰的网络日志
阮一峰的网络日志
Hugging Face - Blog
Hugging Face - 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: avoid extension count filter allocations · openclaw...
steipete · 2026-05-09 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -127,7 +127,9 @@ describe("Feishu monitor startup preflight", () => {

127127

try {

128128

await waitForStartedAccount(started, "beta");

129129

expect(started).toEqual(["alpha", "beta"]);

130-

expect(started.filter((accountId) => accountId === "alpha")).toHaveLength(1);

130+

expect(started.reduce((count, accountId) => count + (accountId === "alpha" ? 1 : 0), 0)).toBe(

131+

1,

132+

);

131133

} finally {

132134

releaseStartedBetaProbe();

133135

abortController.abort();

Original file line numberDiff line numberDiff line change

@@ -507,6 +507,6 @@ describe("persistAllowAlways", () => {

507507

};

508508

};

509509

const list = root.plugins.entries["file-transfer"].config.nodes.n1.allowReadPaths;

510-

expect(list.filter((p) => p === "/tmp/x").length).toBe(1);

510+

expect(list.reduce((count, p) => count + (p === "/tmp/x" ? 1 : 0), 0)).toBe(1);

511511

});

512512

});

Original file line numberDiff line numberDiff line change

@@ -6,6 +6,16 @@ import {

66

WebSocketClosedBeforeOpenError,

77

} from "./monitor-websocket.js";

88
9+

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

10+

let count = 0;

11+

for (const item of items) {

12+

if (predicate(item)) {

13+

count += 1;

14+

}

15+

}

16+

return count;

17+

}

18+
919

class FakeWebSocket implements MattermostWebSocketLike {

1020

public readonly sent: string[] = [];

1121

public pingCalls = 0;

@@ -172,8 +182,8 @@ describe("mattermost websocket monitor", () => {

172182

data: { token: "token" },

173183

seq: 1,

174184

});

175-

expect(patches.filter((patch) => patch.connected === true)).toHaveLength(1);

176-

expect(patches.filter((patch) => patch.connected === false)).toHaveLength(2);

185+

expect(countMatching(patches, (patch) => patch.connected === true)).toBe(1);

186+

expect(countMatching(patches, (patch) => patch.connected === false)).toBe(2);

177187

});

178188
179189

it("dispatches reaction events to the reaction handler", async () => {

Original file line numberDiff line numberDiff line change

@@ -25,13 +25,15 @@ describe("Ollama provider", () => {

2525

const fetchCallUrls = (fetchMock: ReturnType<typeof vi.fn>): string[] =>

2626

fetchMock.mock.calls.map(([input]) => String(input));

2727
28+

const countFetchCallUrls = (fetchMock: ReturnType<typeof vi.fn>, suffix: string): number =>

29+

fetchCallUrls(fetchMock).reduce((count, url) => count + (url.endsWith(suffix) ? 1 : 0), 0);

30+
2831

const expectDiscoveryCallCounts = (

2932

fetchMock: ReturnType<typeof vi.fn>,

3033

params: { tags: number; show: number },

3134

) => {

32-

const urls = fetchCallUrls(fetchMock);

33-

expect(urls.filter((url) => url.endsWith("/api/tags"))).toHaveLength(params.tags);

34-

expect(urls.filter((url) => url.endsWith("/api/show"))).toHaveLength(params.show);

35+

expect(countFetchCallUrls(fetchMock, "/api/tags")).toBe(params.tags);

36+

expect(countFetchCallUrls(fetchMock, "/api/show")).toBe(params.show);

3537

};

3638
3739

async function withOllamaApiKey<T>(run: () => Promise<T>): Promise<T> {

@@ -148,7 +150,7 @@ describe("Ollama provider", () => {

148150

env: { OLLAMA_API_KEY: "test-key" },

149151

});

150152
151-

expect(fetchCallUrls(fetchMock).filter((url) => url.endsWith("/api/tags"))).toHaveLength(1);

153+

expect(countFetchCallUrls(fetchMock, "/api/tags")).toBe(1);

152154
153155

// Native API strips /v1 suffix via resolveOllamaApiBase()

154156

expect(provider?.baseUrl).toBe("http://192.168.20.14:11434");