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

推荐订阅源

V
Visual Studio Blog
Stack Overflow Blog
Stack Overflow Blog
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
L
LangChain Blog
T
The Blog of Author Tim Ferriss
J
Java Code Geeks
Y
Y Combinator Blog
月光博客
月光博客
雷峰网
雷峰网
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
F
Fortinet All Blogs
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
P
Proofpoint News Feed
小众软件
小众软件
H
Help Net Security
Last Week in AI
Last Week in AI
B
Blog RSS Feed
宝玉的分享
宝玉的分享
N
Netflix TechBlog - Medium
博客园 - 叶小钗
The GitHub Blog
The GitHub 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
Doctor: convert read-only health checks (#83198) · opencl...
giodl73-repo · 2026-05-19 · via Recent Commits to openclaw:main

@@ -1,6 +1,9 @@

11

import { describe, expect, it, vi } from "vitest";

22

import type { OpenClawConfig } from "../config/config.js";

33

import {

4+

collectMacLaunchAgentOverrideWarning,

5+

collectMacLaunchctlGatewayEnvOverrideWarning,

6+

collectMacStaleOpenClawUpdateLaunchdJobsWarning,

47

noteMacLaunchctlGatewayEnvOverrides,

58

noteMacStaleOpenClawUpdateLaunchdJobs,

69

} from "./doctor-platform-notes.js";

@@ -14,6 +17,29 @@ function requireNoteCall(noteFn: { mock: { calls: unknown[][] } }, index = 0): u

1417

}

15181619

describe("noteMacLaunchctlGatewayEnvOverrides", () => {

20+

it("collects clear unsetenv instructions for token override", async () => {

21+

const getenv = vi.fn(async (name: string) =>

22+

name === "OPENCLAW_GATEWAY_TOKEN" ? "launchctl-token" : undefined,

23+

);

24+

const cfg = {

25+

gateway: {

26+

auth: {

27+

token: "config-token",

28+

},

29+

},

30+

} as OpenClawConfig;

31+32+

const warning = await collectMacLaunchctlGatewayEnvOverrideWarning(cfg, {

33+

platform: "darwin",

34+

getenv,

35+

});

36+37+

expect(warning).toContain("Host-wide launchctl gateway auth overrides detected");

38+

expect(warning).toContain("OPENCLAW_GATEWAY_TOKEN");

39+

expect(warning).toContain("launchctl unsetenv OPENCLAW_GATEWAY_TOKEN");

40+

expect(warning).not.toContain("OPENCLAW_GATEWAY_PASSWORD");

41+

});

42+1743

it("prints clear unsetenv instructions for token override", async () => {

1844

const noteFn = vi.fn();

1945

const getenv = vi.fn(async (name: string) =>

@@ -96,6 +122,26 @@ describe("noteMacLaunchctlGatewayEnvOverrides", () => {

96122

});

9712398124

describe("noteMacStaleOpenClawUpdateLaunchdJobs", () => {

125+

it("collects stale updater job cleanup guidance on macOS", async () => {

126+

const findJobs = vi.fn(async () => [

127+

{

128+

label: "ai.openclaw.update.2026.5.12",

129+

lastExitStatus: 127,

130+

},

131+

]);

132+133+

const warning = await collectMacStaleOpenClawUpdateLaunchdJobsWarning({

134+

platform: "darwin",

135+

findJobs,

136+

});

137+138+

expect(findJobs).toHaveBeenCalledTimes(1);

139+

expect(warning).toContain("Stale OpenClaw updater launchd job(s) detected");

140+

expect(warning).toContain("ai.openclaw.update.2026.5.12");

141+

expect(warning).toContain("launchctl remove <label>");

142+

expect(warning).toContain("openclaw gateway restart");

143+

});

144+99145

it("prints stale updater job cleanup guidance on macOS", async () => {

100146

const noteFn = vi.fn();

101147

const findJobs = vi.fn(async () => [

@@ -133,3 +179,27 @@ describe("noteMacStaleOpenClawUpdateLaunchdJobs", () => {

133179

expect(noteFn).not.toHaveBeenCalled();

134180

});

135181

});

182+183+

describe("collectMacLaunchAgentOverrideWarning", () => {

184+

it("collects guidance when launch agent writes are disabled", () => {

185+

const warning = collectMacLaunchAgentOverrideWarning({

186+

platform: "darwin",

187+

homeDir: "/Users/tester",

188+

exists: (candidate) => candidate.includes("disable-launchagent"),

189+

});

190+191+

expect(warning).toContain("LaunchAgent writes are disabled");

192+

expect(warning).toContain("rm ");

193+

expect(warning).toContain("disable-launchagent");

194+

});

195+196+

it("does nothing when launch agent writes are not disabled", () => {

197+

expect(

198+

collectMacLaunchAgentOverrideWarning({

199+

platform: "darwin",

200+

homeDir: "/Users/tester",

201+

exists: () => false,

202+

}),

203+

).toBeNull();

204+

});

205+

});