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

推荐订阅源

爱范儿
爱范儿
MyScale Blog
MyScale Blog
Recent Announcements
Recent Announcements
N
Netflix TechBlog - Medium
GbyAI
GbyAI
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
阮一峰的网络日志
阮一峰的网络日志
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
Martin Fowler
Martin Fowler
腾讯CDC
大猫的无限游戏
大猫的无限游戏
aimingoo的专栏
aimingoo的专栏
云风的 BLOG
云风的 BLOG
J
Java Code Geeks
WordPress大学
WordPress大学
P
Proofpoint News Feed
雷峰网
雷峰网
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
人人都是产品经理
人人都是产品经理
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Y
Y Combinator 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: tighten provider usage auth assertions · openclaw/o...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -47,6 +47,14 @@ async function withTempHome<T>(fn: (homeDir: string) => Promise<T>): Promise<T>

4747

}

4848

}

494950+

function providerCalls(mockFn: { mock: { calls: unknown[][] } }): unknown[] {

51+

return mockFn.mock.calls.map(([params]) =>

52+

params && typeof params === "object" && "provider" in params

53+

? (params as { provider?: unknown }).provider

54+

: undefined,

55+

);

56+

}

57+5058

describe("resolveProviderAuths plugin boundary", () => {

5159

beforeAll(async () => {

5260

({ resolveProviderAuths } = await import("./provider-usage.auth.js"));

@@ -126,11 +134,7 @@ describe("resolveProviderAuths plugin boundary", () => {

126134

]);

127135

});

128136129-

expect(resolveProviderUsageAuthWithPluginMock).toHaveBeenCalledWith(

130-

expect.objectContaining({

131-

provider: "zai",

132-

}),

133-

);

137+

expect(providerCalls(resolveProviderUsageAuthWithPluginMock)).toEqual(["zai"]);

134138

expect(ensureAuthProfileStoreMock).not.toHaveBeenCalled();

135139

});

136140

@@ -160,11 +164,7 @@ describe("resolveProviderAuths plugin boundary", () => {

160164

});

161165162166

expect(resolveProviderUsageAuthWithPluginMock).toHaveBeenCalledTimes(1);

163-

expect(resolveProviderUsageAuthWithPluginMock).toHaveBeenCalledWith(

164-

expect.objectContaining({

165-

provider: "zai",

166-

}),

167-

);

167+

expect(providerCalls(resolveProviderUsageAuthWithPluginMock)).toEqual(["zai"]);

168168

});

169169170170

it("keeps auth-profile credential sources provider-specific", async () => {

@@ -205,11 +205,7 @@ describe("resolveProviderAuths plugin boundary", () => {

205205

});

206206207207

expect(resolveProviderUsageAuthWithPluginMock).toHaveBeenCalledTimes(1);

208-

expect(resolveProviderUsageAuthWithPluginMock).toHaveBeenCalledWith(

209-

expect.objectContaining({

210-

provider: "anthropic",

211-

}),

212-

);

208+

expect(providerCalls(resolveProviderUsageAuthWithPluginMock)).toEqual(["anthropic"]);

213209

expect(ensureAuthProfileStoreMock).not.toHaveBeenCalled();

214210

});

215211

@@ -250,16 +246,8 @@ describe("resolveProviderAuths plugin boundary", () => {

250246

]);

251247

});

252248253-

expect(resolveAuthProfileOrderMock).toHaveBeenCalledWith(

254-

expect.objectContaining({

255-

provider: "minimax-portal",

256-

}),

257-

);

258-

expect(resolveProviderUsageAuthWithPluginMock).toHaveBeenCalledWith(

259-

expect.objectContaining({

260-

provider: "minimax",

261-

}),

262-

);

249+

expect(providerCalls(resolveAuthProfileOrderMock)).toEqual(["minimax", "minimax-portal"]);

250+

expect(providerCalls(resolveProviderUsageAuthWithPluginMock)).toEqual(["minimax"]);

263251

expect(ensureAuthProfileStoreMock).not.toHaveBeenCalled();

264252

});

265253

@@ -286,11 +274,7 @@ describe("resolveProviderAuths plugin boundary", () => {

286274

]);

287275

});

288276289-

expect(resolveProviderUsageAuthWithPluginMock).toHaveBeenCalledWith(

290-

expect.objectContaining({

291-

provider: "minimax",

292-

}),

293-

);

277+

expect(providerCalls(resolveProviderUsageAuthWithPluginMock)).toEqual(["minimax"]);

294278

expect(ensureAuthProfileStoreMock).not.toHaveBeenCalled();

295279

});

296280

@@ -332,10 +316,6 @@ describe("resolveProviderAuths plugin boundary", () => {

332316

});

333317334318

expect(resolveProviderUsageAuthWithPluginMock).toHaveBeenCalledTimes(1);

335-

expect(resolveProviderUsageAuthWithPluginMock).toHaveBeenCalledWith(

336-

expect.objectContaining({

337-

provider: "anthropic",

338-

}),

339-

);

319+

expect(providerCalls(resolveProviderUsageAuthWithPluginMock)).toEqual(["anthropic"]);

340320

});

341321

});