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

推荐订阅源

Martin Fowler
Martin Fowler
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
aimingoo的专栏
aimingoo的专栏
T
The Blog of Author Tim Ferriss
IT之家
IT之家
罗磊的独立博客
博客园_首页
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
量子位
Hugging Face - Blog
Hugging Face - Blog
G
Google Developers Blog
博客园 - 叶小钗
H
Help Net Security
N
Netflix TechBlog - Medium
B
Blog
Engineering at Meta
Engineering at Meta
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
V2EX
Vercel News
Vercel News
博客园 - 三生石上(FineUI控件)

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 codex plugin activation assertions · opencl...
steipete · 2026-05-11 · via Recent Commits to openclaw:main

@@ -9,6 +9,19 @@ import {

99

import type { v2 } from "./protocol.js";

10101111

describe("Codex plugin activation", () => {

12+

function expectActivationResult(

13+

result: Awaited<ReturnType<typeof ensureCodexPluginActivation>>,

14+

expected: { ok: boolean; reason: string; installAttempted: boolean },

15+

) {

16+

expect(result.ok).toBe(expected.ok);

17+

expect(result.reason).toBe(expected.reason);

18+

expect(result.installAttempted).toBe(expected.installAttempted);

19+

}

20+21+

function expectBooleanParam(params: unknown, key: string, expected: boolean) {

22+

expect((params as Record<string, unknown> | undefined)?.[key]).toBe(expected);

23+

}

24+1225

it("skips plugin/install when the migrated plugin is already active", async () => {

1326

const calls: string[] = [];

1427

const result = await ensureCodexPluginActivation({

@@ -22,7 +35,7 @@ describe("Codex plugin activation", () => {

2235

},

2336

});

243725-

expect(result).toMatchObject({

38+

expectActivationResult(result, {

2639

ok: true,

2740

reason: "already_active",

2841

installAttempted: false,

@@ -60,7 +73,7 @@ describe("Codex plugin activation", () => {

6073

},

6174

});

627563-

expect(result).toMatchObject({

76+

expectActivationResult(result, {

6477

ok: true,

6578

reason: "already_active",

6679

installAttempted: true,

@@ -97,7 +110,7 @@ describe("Codex plugin activation", () => {

97110

return { authPolicy: "ON_USE", appsNeedingAuth: [] } satisfies v2.PluginInstallResponse;

98111

}

99112

if (method === "skills/list") {

100-

expect(params).toMatchObject({ forceReload: true });

113+

expectBooleanParam(params, "forceReload", true);

101114

return { data: [] } satisfies v2.SkillsListResponse;

102115

}

103116

if (method === "hooks/list") {

@@ -107,14 +120,14 @@ describe("Codex plugin activation", () => {

107120

return {};

108121

}

109122

if (method === "app/list") {

110-

expect(params).toMatchObject({ forceRefetch: true });

123+

expectBooleanParam(params, "forceRefetch", true);

111124

return { data: [], nextCursor: null } satisfies v2.AppsListResponse;

112125

}

113126

throw new Error(`unexpected request ${method}`);

114127

},

115128

});

116129117-

expect(result).toMatchObject({

130+

expectActivationResult(result, {

118131

ok: true,

119132

reason: "installed",

120133

installAttempted: true,

@@ -162,7 +175,7 @@ describe("Codex plugin activation", () => {

162175

},

163176

});

164177165-

expect(result).toMatchObject({

178+

expectActivationResult(result, {

166179

ok: true,

167180

reason: "installed",

168181

installAttempted: true,

@@ -192,7 +205,7 @@ describe("Codex plugin activation", () => {

192205

},

193206

});

194207195-

expect(result).toMatchObject({

208+

expectActivationResult(result, {

196209

ok: false,

197210

reason: "refresh_failed",

198211

installAttempted: true,

@@ -241,7 +254,7 @@ describe("Codex plugin activation", () => {

241254

},

242255

});

243256244-

expect(result).toMatchObject({

257+

expectActivationResult(result, {

245258

ok: true,

246259

reason: "installed",

247260

installAttempted: true,