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

推荐订阅源

Jina AI
Jina AI
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
Hugging Face - Blog
Hugging Face - Blog
阮一峰的网络日志
阮一峰的网络日志
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
人人都是产品经理
人人都是产品经理
V
V2EX
博客园 - 叶小钗
雷峰网
雷峰网
小众软件
小众软件
量子位
V
Visual Studio Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
Martin Fowler
Martin Fowler
G
Google Developers Blog
博客园_首页
博客园 - Franky
有赞技术团队
有赞技术团队
宝玉的分享
宝玉的分享

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

@@ -73,7 +73,7 @@ describe("replayRecentUserAssistantMessages", () => {

7373

.split(/\r?\n/)

7474

.filter((line) => line.trim().length > 0)

7575

.map((line) => JSON.parse(line));

76-

expect(records.filter((r) => r.type === "session")).toHaveLength(1);

76+

expect(records.reduce((count, r) => count + (r.type === "session" ? 1 : 0), 0)).toBe(1);

7777

expect(records[0]).toMatchObject({ id: "existing" });

7878

expect(records[1].message.role).toBe("user");

7979

});

Original file line numberDiff line numberDiff line change

@@ -582,7 +582,12 @@ describe("runCli exit behavior", () => {

582582

try {

583583

const runPromise = runCli(["node", "openclaw", "plugins", "marketplace", "list"]);

584584

await vi.waitFor(() => {

585-

expect(processOnceSpy.mock.calls.filter(([event]) => event === "exit")).toHaveLength(2);

585+

expect(

586+

processOnceSpy.mock.calls.reduce(

587+

(count, [event]) => count + (event === "exit" ? 1 : 0),

588+

0,

589+

),

590+

).toBe(2);

586591

});

587592
588593

const exitHandler = processOnceSpy.mock.calls.find(([event]) => event === "exit")?.[1];

Original file line numberDiff line numberDiff line change

@@ -585,7 +585,9 @@ describe("modelsStatusCommand auth overview", () => {

585585

await modelsStatusCommand({ json: true }, aliasRuntime as never);

586586

const aliasPayload = JSON.parse(String((aliasRuntime.log as Mock).mock.calls[0]?.[0]));

587587

const providers = aliasPayload.auth.providers as Array<{ provider: string }>;

588-

expect(providers.filter((provider) => provider.provider === "zai")).toHaveLength(1);

588+

expect(

589+

providers.reduce((count, provider) => count + (provider.provider === "zai" ? 1 : 0), 0),

590+

).toBe(1);

589591

expect(providers.map((provider) => provider.provider)).not.toContain("z.ai");

590592

} finally {

591593

if (originalLoadConfig) {

Original file line numberDiff line numberDiff line change

@@ -294,7 +294,7 @@ describeLaunchdIntegration("launchd integration", () => {

294294

});

295295

const events = await fs.readFile(eventsPath, "utf8");

296296

const lines = events.trim().split(/\r?\n/).filter(Boolean);

297-

expect(lines.filter((line) => line.startsWith("start "))).toHaveLength(1);

297+

expect(lines.reduce((count, line) => count + (line.startsWith("start ") ? 1 : 0), 0)).toBe(1);

298298

const signalLines = lines.filter((line) => /^(SIGHUP|SIGINT|SIGTERM) /.test(line));

299299

expect(signalLines).toEqual([]);

300300

}, 60_000);

Original file line numberDiff line numberDiff line change

@@ -631,7 +631,9 @@ describe("gateway broadcaster", () => {

631631

reason: "ws_send_buffer_drop",

632632

}),

633633

);

634-

expect(events.filter((event) => event.type === "payload.large")).toHaveLength(1);

634+

expect(

635+

events.reduce((count, event) => count + (event.type === "payload.large" ? 1 : 0), 0),

636+

).toBe(1);

635637

} finally {

636638

stop();

637639

resetDiagnosticEventsForTest();

Original file line numberDiff line numberDiff line change

@@ -149,6 +149,11 @@ describe("diagnostic memory", () => {

149149

}

150150

stop();

151151
152-

expect(events.filter((event) => event.type === "diagnostic.memory.pressure")).toHaveLength(1);

152+

expect(

153+

events.reduce(

154+

(count, event) => count + (event.type === "diagnostic.memory.pressure" ? 1 : 0),

155+

0,

156+

),

157+

).toBe(1);

153158

});

154159

});

Original file line numberDiff line numberDiff line change

@@ -135,8 +135,10 @@ describe("createClaimableDedupe", () => {

135135

await expect(dedupe.claim("line:evt-1")).resolves.toEqual({ kind: "duplicate" });

136136
137137

const claims = await Promise.all([dedupe.claim("line:race-1"), dedupe.claim("line:race-1")]);

138-

expect(claims.filter((claim) => claim.kind === "claimed")).toHaveLength(1);

139-

expect(claims.filter((claim) => claim.kind === "inflight")).toHaveLength(1);

138+

const countClaimKind = (kind: (typeof claims)[number]["kind"]) =>

139+

claims.reduce((count, claim) => count + (claim.kind === kind ? 1 : 0), 0);

140+

expect(countClaimKind("claimed")).toBe(1);

141+

expect(countClaimKind("inflight")).toBe(1);

140142
141143

const waitingClaim = claims.find((claim) => claim.kind === "inflight");

142144

await expect(dedupe.commit("line:race-1")).resolves.toBe(true);

Original file line numberDiff line numberDiff line change

@@ -150,7 +150,7 @@ describe("plugin state keyed store", () => {

150150

),

151151

);

152152
153-

expect(attempts.filter(Boolean)).toHaveLength(1);

153+

expect(attempts.reduce((count, attempt) => count + (attempt ? 1 : 0), 0)).toBe(1);

154154

const stored = await store.lookup("claim");

155155

if (stored === undefined) {

156156

throw new Error("expected winning plugin-state claim");

Original file line numberDiff line numberDiff line change

@@ -1226,7 +1226,7 @@ describe("tui-event-handlers: streaming watchdog", () => {

12261226

vi.advanceTimersByTime(10_000);

12271227
12281228

const statusCalls = setActivityStatus.mock.calls.map((c) => c[0]);

1229-

expect(statusCalls.filter((s) => s === "idle").length).toBe(1);

1229+

expect(statusCalls.reduce((count, s) => count + (s === "idle" ? 1 : 0), 0)).toBe(1);

12301230

expect(chatLog.addSystem).not.toHaveBeenCalledWith(expectedTimeoutMessage);

12311231

expect(state.activeChatRunId).toBeNull();

12321232
Original file line numberDiff line numberDiff line change

@@ -60,10 +60,10 @@ describe("scripts/lib/docker-e2e-plan", () => {

6060

expect(plan.lanes.map((lane) => lane.name)).toContain("commitments-safety");

6161

expect(plan.lanes.map((lane) => lane.name)).toContain("bundled-plugin-install-uninstall-0");

6262

expect(plan.lanes.map((lane) => lane.name)).toContain("bundled-plugin-install-uninstall-23");

63-

expect(plan.lanes.filter((lane) => lane.name === "install-e2e-openai")).toHaveLength(1);

64-

expect(

65-

plan.lanes.filter((lane) => lane.name === "bundled-plugin-install-uninstall-0"),

66-

).toHaveLength(1);

63+

const countLane = (name: string) =>

64+

plan.lanes.reduce((count, lane) => count + (lane.name === name ? 1 : 0), 0);

65+

expect(countLane("install-e2e-openai")).toBe(1);

66+

expect(countLane("bundled-plugin-install-uninstall-0")).toBe(1);

6767

expect(plan.lanes.map((lane) => lane.name)).not.toContain("bundled-plugin-install-uninstall");

6868

expect(plan.lanes.map((lane) => lane.name)).not.toContain("bundled-channel-deps");

6969

expect(plan.lanes.map((lane) => lane.name)).not.toContain("openwebui");