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

推荐订阅源

宝玉的分享
宝玉的分享
小众软件
小众软件
J
Java Code Geeks
I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
L
LangChain Blog
博客园 - 司徒正美
量子位
Y
Y Combinator Blog
C
Check Point Blog
T
Tailwind CSS Blog
D
DataBreaches.Net
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
F
Fortinet All Blogs
云风的 BLOG
云风的 BLOG
A
About on SuperTechFans
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
大猫的无限游戏
大猫的无限游戏
V
V2EX
阮一峰的网络日志
阮一峰的网络日志

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 status usage mock calls · openclaw/openclaw@7...
steipete · 2026-05-12 · via Recent Commits to openclaw:main

@@ -40,6 +40,26 @@ vi.mock("./status.daemon.js", () => ({

4040

getNodeDaemonStatusSummary: mocks.getNodeDaemonStatusSummary,

4141

}));

424243+

function requireProviderUsageCall(): {

44+

timeoutMs?: number;

45+

config?: unknown;

46+

agentDir?: string;

47+

} {

48+

const call = mocks.loadProviderUsageSummary.mock.calls.at(0);

49+

if (!call) {

50+

throw new Error("expected provider usage summary call");

51+

}

52+

const params = call.at(0);

53+

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

54+

throw new Error("expected provider usage summary params");

55+

}

56+

return params as {

57+

timeoutMs?: number;

58+

config?: unknown;

59+

agentDir?: string;

60+

};

61+

}

62+4363

describe("status-runtime-shared", () => {

4464

beforeEach(() => {

4565

vi.clearAllMocks();

@@ -107,16 +127,10 @@ describe("status-runtime-shared", () => {

107127

config: { gateway: {} },

108128

});

109129110-

const usageCall = mocks.loadProviderUsageSummary.mock.calls[0]?.[0] as

111-

| {

112-

timeoutMs?: number;

113-

config?: unknown;

114-

agentDir?: string;

115-

}

116-

| undefined;

117-

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

118-

expect(usageCall?.config).toEqual({ gateway: {} });

119-

expect(usageCall?.agentDir).toContain("main");

130+

const usageCall = requireProviderUsageCall();

131+

expect(usageCall.timeoutMs).toBe(1234);

132+

expect(usageCall.config).toEqual({ gateway: {} });

133+

expect(usageCall.agentDir).toContain("main");

120134

});

121135122136

it("resolves usage summaries with explicit agent scope", async () => {

@@ -231,16 +245,10 @@ describe("status-runtime-shared", () => {

231245

gatewayService: { label: "LaunchAgent" },

232246

nodeService: { label: "node" },

233247

});

234-

const usageCall = mocks.loadProviderUsageSummary.mock.calls[0]?.[0] as

235-

| {

236-

timeoutMs?: number;

237-

config?: unknown;

238-

agentDir?: string;

239-

}

240-

| undefined;

241-

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

242-

expect(usageCall?.config).toEqual({ gateway: {} });

243-

expect(usageCall?.agentDir).toContain("main");

248+

const usageCall = requireProviderUsageCall();

249+

expect(usageCall.timeoutMs).toBe(1234);

250+

expect(usageCall.config).toEqual({ gateway: {} });

251+

expect(usageCall.agentDir).toContain("main");

244252

expect(mocks.callGateway).toHaveBeenNthCalledWith(1, {

245253

method: "health",

246254

params: { probe: true },