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

推荐订阅源

雷峰网
雷峰网
G
Google Developers Blog
D
Docker
The GitHub Blog
The GitHub Blog
H
Help Net Security
WordPress大学
WordPress大学
博客园_首页
Recent Announcements
Recent Announcements
P
Proofpoint News Feed
罗磊的独立博客
I
InfoQ
U
Unit 42
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
Jina AI
Jina AI
J
Java Code Geeks
博客园 - Franky
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Last Week in AI
Last Week in AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
D
DataBreaches.Net
Google DeepMind News
Google DeepMind News

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: clear status command broad matchers · openclaw/open...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -97,6 +97,18 @@ function getJoinedRuntimeLogs() {

9797

return getRuntimeLogs().join("\n");

9898

}

9999100+

function expectLogsInclude(logs: readonly string[], fragment: string) {

101+

expect(logs.some((log) => log.includes(fragment))).toBe(true);

102+

}

103+104+

function expectLogsExclude(logs: readonly string[], fragment: string) {

105+

expect(logs.some((log) => log.includes(fragment))).toBe(false);

106+

}

107+108+

function expectLogsMatch(logs: readonly string[], pattern: RegExp) {

109+

expect(logs.some((log) => pattern.test(log))).toBe(true);

110+

}

111+100112

async function runStatusAndGetLogs(args: Parameters<typeof statusCommand>[0] = {}) {

101113

runtimeLogMock.mockClear();

102114

await statusCommand(args, runtime as never);

@@ -1001,13 +1013,10 @@ describe("statusCommand", () => {

10011013

count: 0,

10021014

warnings: [],

10031015

});

1004-

expect(payload.tasks).toEqual(

1005-

expect.objectContaining({

1006-

total: 0,

1007-

active: 0,

1008-

byStatus: expect.objectContaining({ queued: 0, running: 0 }),

1009-

}),

1010-

);

1016+

expect(payload.tasks.total).toBe(0);

1017+

expect(payload.tasks.active).toBe(0);

1018+

expect(payload.tasks.byStatus.queued).toBe(0);

1019+

expect(payload.tasks.byStatus.running).toBe(0);

10111020

expect(mocks.runSecurityAudit).not.toHaveBeenCalled();

1012102110131022

runtimeLogMock.mockClear();

@@ -1016,12 +1025,9 @@ describe("statusCommand", () => {

10161025

const allPayload = JSON.parse(getRuntimeLog(0));

10171026

expect(allPayload.securityAudit.summary.critical).toBe(1);

10181027

expect(allPayload.securityAudit.summary.warn).toBe(1);

1019-

expect(mocks.runSecurityAudit).toHaveBeenCalledWith(

1020-

expect.objectContaining({

1021-

includeFilesystem: true,

1022-

includeChannelSecurity: true,

1023-

}),

1024-

);

1028+

const auditParams = mocks.runSecurityAudit.mock.calls[0]?.[0];

1029+

expect(auditParams?.includeFilesystem).toBe(true);

1030+

expect(auditParams?.includeChannelSecurity).toBe(true);

10251031

});

1026103210271033

it("scopes usage resolution to the scanned config", async () => {

@@ -1040,8 +1046,8 @@ describe("statusCommand", () => {

10401046

resolveUsage?: (input: { config: unknown; timeoutMs?: number }) => Promise<unknown>;

10411047

}

10421048

| undefined;

1043-

expect(params).toBeDefined();

1044-

expect(params).toMatchObject({ usage: true, timeoutMs: 1234 });

1049+

expect(params?.usage).toBe(true);

1050+

expect(params?.timeoutMs).toBe(1234);

10451051

if (!params?.resolveUsage) {

10461052

throw new Error("missing status usage resolver");

10471053

}

@@ -1131,21 +1137,13 @@ describe("statusCommand", () => {

11311137

"Troubleshooting:",

11321138

"Next steps:",

11331139

]) {

1134-

expect(logs).toEqual(expect.arrayContaining([expect.stringContaining(token)]));

1140+

expectLogsInclude(logs, token);

11351141

}

1136-

expect(logs).toEqual(

1137-

expect.arrayContaining([

1138-

expect.stringContaining("legacy-plugin still uses legacy before_agent_start"),

1139-

]),

1140-

);

1141-

expect(logs).toEqual(

1142-

expect.arrayContaining([

1143-

expect.stringMatching(/openclaw (?:--profile isolated )?status --all/),

1144-

]),

1145-

);

1146-

expect(logs).toEqual(expect.arrayContaining([expect.stringContaining("Cache")]));

1147-

expect(logs).toEqual(expect.arrayContaining([expect.stringContaining("40% hit")]));

1148-

expect(logs).toEqual(expect.arrayContaining([expect.stringContaining("read 2.0k")]));

1142+

expectLogsInclude(logs, "legacy-plugin still uses legacy before_agent_start");

1143+

expectLogsMatch(logs, /openclaw (?:--profile isolated )?status --all/);

1144+

expectLogsInclude(logs, "Cache");

1145+

expectLogsInclude(logs, "40% hit");

1146+

expectLogsInclude(logs, "read 2.0k");

11491147

});

1150114811511149

it("shows a maintenance hint when task audit errors are present", async () => {

@@ -1200,8 +1198,8 @@ describe("statusCommand", () => {

12001198

},

12011199

});

12021200

const logs = await runStatusAndGetLogs();

1203-

expect(logs).toEqual(expect.arrayContaining([expect.stringContaining("100% cached")]));

1204-

expect(logs).not.toEqual(expect.arrayContaining([expect.stringContaining("120% cached")]));

1201+

expectLogsInclude(logs, "100% cached");

1202+

expectLogsExclude(logs, "120% cached");

1205120312061204

mocks.loadSessionStore.mockReturnValue({

12071205

"+1000": {

@@ -1213,12 +1211,9 @@ describe("statusCommand", () => {

12131211

},

12141212

});

12151213

const promptSideLogs = await runStatusAndGetLogs();

1216-

expect(promptSideLogs).toEqual(expect.arrayContaining([expect.stringContaining("67% cached")]));

1217-

expect(promptSideLogs).not.toEqual(

1218-

expect.arrayContaining([expect.stringContaining("40% cached")]),

1219-

);

1214+

expectLogsInclude(promptSideLogs, "67% cached");

1215+

expectLogsExclude(promptSideLogs, "40% cached");

12201216

});

1221-12221217

it("shows node-only gateway info when no local gateway service is installed", async () => {

12231218

mocks.resolveGatewayService.mockReturnValueOnce({

12241219

label: "LaunchAgent",

@@ -1261,7 +1256,7 @@ describe("statusCommand", () => {

12611256

presence: [],

12621257

});

12631258

const logs = await runStatusAndGetLogs();

1264-

expect(logs).toEqual(expect.arrayContaining([expect.stringContaining("auth token")]));

1259+

expectLogsInclude(logs, "auth token");

12651260

});

12661261

});

12671262