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

推荐订阅源

Jina AI
Jina AI
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
有赞技术团队
有赞技术团队
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Recent Announcements
Recent Announcements
Y
Y Combinator Blog
Vercel News
Vercel News
Martin Fowler
Martin Fowler
V
V2EX
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
L
LangChain Blog
云风的 BLOG
云风的 BLOG
H
Hackread – Cybersecurity News, Data Breaches, AI and More
aimingoo的专栏
aimingoo的专栏
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
N
Netflix TechBlog - Medium
Google DeepMind News
Google DeepMind News
雷峰网
雷峰网
阮一峰的网络日志
阮一峰的网络日志
F
Fortinet All Blogs

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
fix(doctor): diagnose malformed provider catalogs · openc...
vincentkoc · 2026-05-31 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -80,6 +80,9 @@ function createDeps(overrides: Partial<CoreHealthCheckDeps> = {}): CoreHealthChe

8080

async collectRuntimeToolSchemaFindings() {

8181

return [];

8282

},

83+

async collectProviderCatalogProjectionFindings() {

84+

return [];

85+

},

8386

...overrides,

8487

};

8588

}

@@ -664,4 +667,41 @@ describe("registerCoreHealthChecks", () => {

664667

}),

665668

);

666669

});

670+
671+

it("reports active provider catalog projection findings", async () => {

672+

const check = getCheck(

673+

createCoreHealthChecks(

674+

createDeps({

675+

async collectProviderCatalogProjectionFindings(): Promise<readonly HealthFinding[]> {

676+

return [

677+

{

678+

checkId: "core/doctor/provider-catalog-projection",

679+

severity: "error",

680+

message:

681+

"Provider catalog mockplugin cannot be projected into the unified text model catalog.",

682+

path: "plugins.entries.mockplugin",

683+

target: "mockplugin",

684+

requirement: "mockplugin provider catalog entry read failed",

685+

},

686+

];

687+

},

688+

}),

689+

),

690+

"core/doctor/provider-catalog-projection",

691+

);

692+
693+

await expect(

694+

check.detect({

695+

mode: "doctor",

696+

runtime,

697+

cfg: {},

698+

}),

699+

).resolves.toContainEqual(

700+

expect.objectContaining({

701+

checkId: "core/doctor/provider-catalog-projection",

702+

severity: "error",

703+

target: "mockplugin",

704+

}),

705+

);

706+

});

667707

});

Original file line numberDiff line numberDiff line change

@@ -42,6 +42,9 @@ export type CoreHealthCheckDeps = {

4242

readonly collectRuntimeToolSchemaFindings: (

4343

ctx: HealthCheckContext,

4444

) => Promise<readonly HealthFinding[]>;

45+

readonly collectProviderCatalogProjectionFindings: (

46+

ctx: HealthCheckContext,

47+

) => Promise<readonly HealthFinding[]>;

4548

};

4649
4750

async function detectUnavailableSkillsWithRuntime(

@@ -79,11 +82,19 @@ async function collectRuntimeToolSchemaFindingsWithRuntime(

7982

return runtime.collectRuntimeToolSchemaFindings(ctx.cfg);

8083

}

8184
85+

async function collectProviderCatalogProjectionFindingsWithRuntime(

86+

ctx: HealthCheckContext,

87+

): Promise<readonly HealthFinding[]> {

88+

const runtime = await loadDoctorCoreChecksRuntimeModule();

89+

return runtime.collectProviderCatalogProjectionFindings(ctx.cfg);

90+

}

91+
8292

const defaultCoreHealthCheckDeps: CoreHealthCheckDeps = {

8393

detectUnavailableSkills: detectUnavailableSkillsWithRuntime,

8494

collectSecurityWarnings: collectSecurityWarningsWithRuntime,

8595

collectWorkspaceSuggestionNotes: collectWorkspaceSuggestionNotesWithRuntime,

8696

collectRuntimeToolSchemaFindings: collectRuntimeToolSchemaFindingsWithRuntime,

97+

collectProviderCatalogProjectionFindings: collectProviderCatalogProjectionFindingsWithRuntime,

8798

};

8899
89100

export function configValidationIssuesToHealthFindings(

@@ -421,6 +432,18 @@ function createRuntimeToolSchemaCheck(deps: CoreHealthCheckDeps): HealthCheck {

421432

};

422433

}

423434
435+

function createProviderCatalogProjectionCheck(deps: CoreHealthCheckDeps): HealthCheck {

436+

return {

437+

id: "core/doctor/provider-catalog-projection",

438+

kind: "core",

439+

description: "Provider catalog hooks project into unified text model catalog rows.",

440+

source: "doctor",

441+

async detect(ctx) {

442+

return deps.collectProviderCatalogProjectionFindings(ctx);

443+

},

444+

};

445+

}

446+
424447

function normalizeDoctorNoteLine(line: string): string {

425448

return line.replace(/^- /, "").trim();

426449

}

@@ -896,6 +919,7 @@ function createConvertedWorkflowChecks(deps: CoreHealthCheckDeps): readonly Heal

896919

openAIOAuthTlsCheck,

897920

hooksModelCheck,

898921

bootstrapSizeCheck,

922+

createProviderCatalogProjectionCheck(deps),

899923

createRuntimeToolSchemaCheck(deps),

900924

createWorkspaceSuggestionsCheck(deps),

901925

];

Original file line numberDiff line numberDiff line change

@@ -384,6 +384,49 @@ describe("doctor health contributions", () => {

384384

);

385385

});

386386
387+

it("reports provider catalog projection blockers during normal doctor runs", async () => {

388+

const contribution = requireDoctorContribution("doctor:provider-catalog-projection");

389+

mocks.getHealthCheck.mockReturnValue({

390+

id: "core/doctor/provider-catalog-projection",

391+

detect: vi.fn(async () => [

392+

{

393+

checkId: "core/doctor/provider-catalog-projection",

394+

severity: "error",

395+

message:

396+

"Provider catalog mockplugin cannot be projected into the unified text model catalog.",

397+

path: "plugins.entries.mockplugin",

398+

target: "mockplugin",

399+

requirement: "provider catalog entry read failed",

400+

fixHint:

401+

"Fix the plugin provider catalog hook or disable the plugin, then rerun doctor before relying on model discovery.",

402+

},

403+

]),

404+

});

405+

const ctx = {

406+

cfg: {},

407+

configResult: { cfg: {} },

408+

sourceConfigValid: true,

409+

prompter: buildDoctorPrompter(false),

410+

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

411+

options: {},

412+

cfgForPersistence: {},

413+

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

414+

env: {},

415+

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

416+
417+

await contribution.run(ctx);

418+
419+

expect(ctx.healthOk).toBe(false);

420+

expect(mocks.note).toHaveBeenCalledWith(

421+

expect.stringContaining("Provider catalog mockplugin cannot be projected"),

422+

"Doctor warnings",

423+

);

424+

expect(mocks.note).toHaveBeenCalledWith(

425+

expect.stringContaining("issue: provider catalog entry read failed"),

426+

"Doctor warnings",

427+

);

428+

});

429+
387430

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

388431

expect(

389432

shouldSkipLegacyUpdateDoctorConfigWrite({

Original file line numberDiff line numberDiff line change

@@ -935,7 +935,7 @@ async function runFinalConfigValidationHealth(ctx: DoctorHealthFlowContext): Pro

935935

}

936936

}

937937
938-

function formatRuntimeToolSchemaFindings(findings: readonly HealthFinding[]): string {

938+

function formatHealthFindings(findings: readonly HealthFinding[]): string {

939939

return findings

940940

.map((finding) => {

941941

const lines = [`- ${finding.message}`];

@@ -953,6 +953,31 @@ function formatRuntimeToolSchemaFindings(findings: readonly HealthFinding[]): st

953953

.join("\n");

954954

}

955955
956+

async function runProviderCatalogProjectionHealth(ctx: DoctorHealthFlowContext): Promise<void> {

957+

const { registerCoreHealthChecks } = await loadDoctorCoreChecksModule();

958+

const { getHealthCheck } = await loadHealthCheckRegistryModule();

959+

const { resolveAgentWorkspaceDir, resolveDefaultAgentId } = await loadAgentScopeModule();

960+

const { note } = await loadNoteModule();

961+
962+

registerCoreHealthChecks();

963+

const check = getHealthCheck("core/doctor/provider-catalog-projection");

964+

if (!check) {

965+

return;

966+

}

967+

const findings = await check.detect({

968+

mode: "doctor",

969+

runtime: ctx.runtime,

970+

cfg: ctx.cfg,

971+

cwd: resolveAgentWorkspaceDir(ctx.cfg, resolveDefaultAgentId(ctx.cfg)),

972+

configPath: ctx.configPath,

973+

});

974+

if (findings.length === 0) {

975+

return;

976+

}

977+

ctx.healthOk = false;

978+

note(formatHealthFindings(findings), "Doctor warnings");

979+

}

980+
956981

async function runRuntimeToolSchemasHealth(ctx: DoctorHealthFlowContext): Promise<void> {

957982

const { registerCoreHealthChecks } = await loadDoctorCoreChecksModule();

958983

const { getHealthCheck } = await loadHealthCheckRegistryModule();

@@ -975,7 +1000,7 @@ async function runRuntimeToolSchemasHealth(ctx: DoctorHealthFlowContext): Promis

9751000

return;

9761001

}

9771002

ctx.healthOk = false;

978-

note(formatRuntimeToolSchemaFindings(findings), "Doctor warnings");

1003+

note(formatHealthFindings(findings), "Doctor warnings");

9791004

}

9801005
9811006

export function resolveDoctorHealthContributions(): DoctorHealthContribution[] {

@@ -1116,6 +1141,12 @@ export function resolveDoctorHealthContributions(): DoctorHealthContribution[] {

11161141

label: "Tool result cap",

11171142

run: runToolResultCapHealth,

11181143

}),

1144+

createDoctorHealthContribution({

1145+

id: "doctor:provider-catalog-projection",

1146+

label: "Provider catalog projection",

1147+

healthCheckIds: ["core/doctor/provider-catalog-projection"],

1148+

run: runProviderCatalogProjectionHealth,

1149+

}),

11191150

createDoctorHealthContribution({

11201151

id: "doctor:runtime-tool-schemas",

11211152

label: "Runtime tool schemas",

Original file line numberDiff line numberDiff line change

@@ -179,6 +179,12 @@ export const doctorHealthConversionRules = [

179179

target: ["core/doctor/tool-result-cap"],

180180

rule: "Detect explicit live tool-result cap overrides that are stale or ineffective; preserve deep-mode effective cap output as finding metadata.",

181181

},

182+

{

183+

contributionId: "doctor:provider-catalog-projection",

184+

conversion: "detect-only",

185+

target: ["core/doctor/provider-catalog-projection"],

186+

rule: "Validate provider catalog hooks against unified text catalog projection and report malformed plugin catalog rows during doctor.",

187+

},

182188

{

183189

contributionId: "doctor:runtime-tool-schemas",

184190

conversion: "detect-only",

Original file line numberDiff line numberDiff line change

@@ -14,6 +14,8 @@ export function projectProviderCatalogResultToUnifiedTextRows(params: {

1414

? { [params.providerId]: params.result.provider }

1515

: params.result.providers;

1616

const rows: UnifiedModelCatalogEntry[] = [];

17+

// Doctor owns malformed plugin catalog diagnostics; runtime projection stays on

18+

// the typed provider catalog contract instead of carrying fallback semantics.

1719

for (const [providerId, providerConfig] of Object.entries(providers)) {

1820

for (const model of providerConfig.models ?? []) {

1921

rows.push({