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

推荐订阅源

月光博客
月光博客
小众软件
小众软件
爱范儿
爱范儿
Y
Y Combinator Blog
博客园 - Franky
美团技术团队
博客园 - 【当耐特】
The Cloudflare Blog
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
IT之家
IT之家
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
WordPress大学
WordPress大学
V
Visual Studio Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
有赞技术团队
有赞技术团队

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 daemon install assertions · openclaw/opencl...
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -127,13 +127,11 @@ describe("buildGatewayInstallPlan", () => {

127127

expect(plan.workingDirectory).toBe("/Users/me");

128128

expect(plan.environment).toEqual({ OPENCLAW_PORT: "3000" });

129129

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

130-

expect(mocks.buildServiceEnvironment).toHaveBeenCalledWith(

131-

expect.objectContaining({

132-

env: { HOME: isolatedHome },

133-

port: 3000,

134-

extraPathDirs: ["/custom"],

135-

}),

136-

);

130+

expect(mocks.buildServiceEnvironment).toHaveBeenCalledOnce();

131+

const serviceEnvRequest = mocks.buildServiceEnvironment.mock.calls[0]?.[0];

132+

expect(serviceEnvRequest?.env).toStrictEqual({ HOME: isolatedHome });

133+

expect(serviceEnvRequest?.port).toBe(3000);

134+

expect(serviceEnvRequest?.extraPathDirs).toStrictEqual(["/custom"]);

137135

});

138136139137

it("does not prepend '.' when nodePath is a bare executable name", async () => {

@@ -146,11 +144,8 @@ describe("buildGatewayInstallPlan", () => {

146144

nodePath: "node",

147145

});

148146149-

expect(mocks.buildServiceEnvironment).toHaveBeenCalledWith(

150-

expect.objectContaining({

151-

extraPathDirs: undefined,

152-

}),

153-

);

147+

expect(mocks.buildServiceEnvironment).toHaveBeenCalledOnce();

148+

expect(mocks.buildServiceEnvironment.mock.calls[0]?.[0]?.extraPathDirs).toBeUndefined();

154149

});

155150156151

it("emits warnings when renderSystemNodeWarning returns one", async () => {

@@ -188,11 +183,8 @@ describe("buildGatewayInstallPlan", () => {

188183

});

189184190185

expect(plan.workingDirectory).toBe(path.join(isolatedHome, ".openclaw"));

191-

expect(mocks.buildServiceEnvironment).toHaveBeenCalledWith(

192-

expect.objectContaining({

193-

platform: "darwin",

194-

}),

195-

);

186+

expect(mocks.buildServiceEnvironment).toHaveBeenCalledOnce();

187+

expect(mocks.buildServiceEnvironment.mock.calls[0]?.[0]?.platform).toBe("darwin");

196188

});

197189198190

it("does not invent a working directory for non-macOS service installs", async () => {

@@ -228,17 +220,11 @@ describe("buildGatewayInstallPlan", () => {

228220

runtime: "node",

229221

});

230222231-

expect(mocks.resolveGatewayProgramArguments).toHaveBeenCalledWith(

232-

expect.objectContaining({

233-

wrapperPath,

234-

}),

235-

);

236-

expect(mocks.buildServiceEnvironment).toHaveBeenCalledWith(

237-

expect.objectContaining({

238-

env: expect.objectContaining({

239-

OPENCLAW_WRAPPER: wrapperPath,

240-

}),

241-

}),

223+

expect(mocks.resolveGatewayProgramArguments).toHaveBeenCalledOnce();

224+

expect(mocks.resolveGatewayProgramArguments.mock.calls[0]?.[0]?.wrapperPath).toBe(wrapperPath);

225+

expect(mocks.buildServiceEnvironment).toHaveBeenCalledOnce();

226+

expect(mocks.buildServiceEnvironment.mock.calls[0]?.[0]?.env?.OPENCLAW_WRAPPER).toBe(

227+

wrapperPath,

242228

);

243229

expect(plan.environment.OPENCLAW_WRAPPER).toBe(wrapperPath);

244230

});

@@ -409,25 +395,19 @@ describe("buildGatewayInstallPlan", () => {

409395

'Exec SecretRef passEnv ref "HOME" blocked by host-env security policy',

410396

"Config SecretRef",

411397

);

412-

expect(warn).toHaveBeenCalledWith(

413-

expect.stringContaining("XDG_CONFIG_HOME"),

414-

"Config SecretRef",

415-

);

416-

expect(warn).toHaveBeenCalledWith(

417-

expect.stringContaining("XDG_CONFIG_DIRS"),

418-

"Config SecretRef",

419-

);

420-

expect(warn).toHaveBeenCalledWith(expect.stringContaining("BASH_ENV"), "Config SecretRef");

421-

expect(warn).toHaveBeenCalledWith(expect.stringContaining("GH_TOKEN"), "Config SecretRef");

422-

expect(warn).toHaveBeenCalledWith(

423-

expect.stringContaining("AWS_ACCESS_KEY_ID"),

424-

"Config SecretRef",

425-

);

426-

expect(warn).toHaveBeenCalledWith(expect.stringContaining("DOCKER_HOST"), "Config SecretRef");

427-

expect(warn).toHaveBeenCalledWith(

428-

expect.stringContaining("NODE_TLS_REJECT_UNAUTHORIZED"),

429-

"Config SecretRef",

430-

);

398+

const warningMessages = warn.mock.calls.map(([message]) => message);

399+

for (const blockedName of [

400+

"XDG_CONFIG_HOME",

401+

"XDG_CONFIG_DIRS",

402+

"BASH_ENV",

403+

"GH_TOKEN",

404+

"AWS_ACCESS_KEY_ID",

405+

"DOCKER_HOST",

406+

"NODE_TLS_REJECT_UNAUTHORIZED",

407+

]) {

408+

expect(warningMessages.some((message) => message.includes(blockedName))).toBe(true);

409+

}

410+

expect(warn.mock.calls.every(([, title]) => title === "Config SecretRef")).toBe(true);

431411

});

432412433413

it("does not include passEnv values for unused exec SecretRef providers", async () => {