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

推荐订阅源

雷峰网
雷峰网
MongoDB | Blog
MongoDB | Blog
D
Docker
Martin Fowler
Martin Fowler
人人都是产品经理
人人都是产品经理
GbyAI
GbyAI
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
M
MIT News - Artificial intelligence
腾讯CDC
阮一峰的网络日志
阮一峰的网络日志
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
Blog — PlanetScale
Blog — PlanetScale
Vercel News
Vercel News
The Cloudflare Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
有赞技术团队
有赞技术团队
G
Google Developers Blog
Stack Overflow Blog
Stack Overflow Blog
I
InfoQ
U
Unit 42

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: expose shell completion health findings (#85566) ...
giodl73-repo · 2026-05-25 · via Recent Commits to openclaw:main

@@ -8,6 +8,12 @@ import {

8899

const mocks = vi.hoisted(() => ({

1010

maybeRunConfiguredPluginInstallReleaseStep: vi.fn(),

11+

registerCoreHealthChecks: vi.fn(),

12+

registerBundledHealthChecks: vi.fn(),

13+

runDoctorHealthRepairs: vi.fn(),

14+

listHealthChecks: vi.fn(),

15+

resolveAgentWorkspaceDir: vi.fn(() => "/tmp/openclaw-workspace"),

16+

resolveDefaultAgentId: vi.fn(() => "default"),

1117

note: vi.fn(),

1218

replaceConfigFile: vi.fn().mockResolvedValue(undefined),

1319

readConfigFileSnapshot: vi.fn().mockResolvedValue({

@@ -26,6 +32,27 @@ vi.mock("../commands/doctor/shared/release-configured-plugin-installs.js", () =>

2632

maybeRunConfiguredPluginInstallReleaseStep: mocks.maybeRunConfiguredPluginInstallReleaseStep,

2733

}));

283435+

vi.mock("./doctor-core-checks.js", () => ({

36+

registerCoreHealthChecks: mocks.registerCoreHealthChecks,

37+

}));

38+39+

vi.mock("./bundled-health-checks.js", () => ({

40+

registerBundledHealthChecks: mocks.registerBundledHealthChecks,

41+

}));

42+43+

vi.mock("./doctor-repair-flow.js", () => ({

44+

runDoctorHealthRepairs: mocks.runDoctorHealthRepairs,

45+

}));

46+47+

vi.mock("./health-check-registry.js", () => ({

48+

listHealthChecks: mocks.listHealthChecks,

49+

}));

50+51+

vi.mock("../agents/agent-scope.js", () => ({

52+

resolveAgentWorkspaceDir: mocks.resolveAgentWorkspaceDir,

53+

resolveDefaultAgentId: mocks.resolveDefaultAgentId,

54+

}));

55+2956

vi.mock("../terminal/note.js", () => ({

3057

note: mocks.note,

3158

}));

@@ -86,6 +113,30 @@ function buildDoctorPrompter(shouldRepair: boolean): DoctorPrompter {

86113

describe("doctor health contributions", () => {

87114

beforeEach(() => {

88115

mocks.maybeRunConfiguredPluginInstallReleaseStep.mockReset();

116+

mocks.registerCoreHealthChecks.mockReset();

117+

mocks.registerBundledHealthChecks.mockReset();

118+

mocks.runDoctorHealthRepairs.mockReset();

119+

mocks.runDoctorHealthRepairs.mockResolvedValue({

120+

config: {},

121+

findings: [],

122+

remainingFindings: [],

123+

changes: [],

124+

warnings: [],

125+

diffs: [],

126+

effects: [],

127+

checksRun: 0,

128+

checksRepaired: 0,

129+

checksValidated: 0,

130+

});

131+

mocks.listHealthChecks.mockReset();

132+

mocks.listHealthChecks.mockReturnValue([

133+

{ id: "core/doctor/shell-completion" },

134+

{ id: "core/doctor/unrelated" },

135+

]);

136+

mocks.resolveAgentWorkspaceDir.mockReset();

137+

mocks.resolveAgentWorkspaceDir.mockReturnValue("/tmp/openclaw-workspace");

138+

mocks.resolveDefaultAgentId.mockReset();

139+

mocks.resolveDefaultAgentId.mockReturnValue("default");

89140

mocks.note.mockReset();

90141

mocks.readConfigFileSnapshot.mockReset();

91142

mocks.readConfigFileSnapshot.mockResolvedValue({

@@ -210,6 +261,27 @@ describe("doctor health contributions", () => {

210261

);

211262

});

212263264+

it("keeps legacy positional shell completion out of the broad structured repair pass", async () => {

265+

const contribution = requireDoctorContribution("doctor:structured-health-repairs");

266+

const ctx = {

267+

cfg: {},

268+

configResult: { cfg: {} },

269+

sourceConfigValid: true,

270+

prompter: buildDoctorPrompter(true),

271+

runtime: { log: vi.fn(), error: vi.fn(), exit: vi.fn() },

272+

options: {},

273+

cfgForPersistence: {},

274+

configPath: "/tmp/fake-openclaw.json",

275+

env: {},

276+

} as Parameters<(typeof contribution)["run"]>[0];

277+278+

await contribution.run(ctx);

279+280+

expect(mocks.runDoctorHealthRepairs).toHaveBeenCalledWith(expect.any(Object), {

281+

checks: [{ id: "core/doctor/unrelated" }],

282+

});

283+

});

284+213285

it("skips doctor config writes under legacy update parents", () => {

214286

expect(

215287

shouldSkipLegacyUpdateDoctorConfigWrite({