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

推荐订阅源

月光博客
月光博客
Martin Fowler
Martin Fowler
Last Week in AI
Last Week in AI
罗磊的独立博客
阮一峰的网络日志
阮一峰的网络日志
博客园 - 【当耐特】
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
V
Visual Studio Blog
Hugging Face - Blog
Hugging Face - Blog
雷峰网
雷峰网
博客园_首页
人人都是产品经理
人人都是产品经理
量子位
美团技术团队
The Cloudflare Blog
小众软件
小众软件
WordPress大学
WordPress大学
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
D
DataBreaches.Net
博客园 - Franky

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: dedupe doctor memory note assertions · openclaw/ope...
steipete · 2026-05-12 · via Recent Commits to openclaw:main

@@ -141,6 +141,10 @@ function resetMemoryRecallMocks() {

141141

maybeRepairWorkspaceMemoryHealth.mockClear();

142142

}

143143144+

function firstNoteMessage(): string {

145+

return String(note.mock.calls.at(0)?.[0] ?? "");

146+

}

147+144148

describe("noteMemorySearchHealth", () => {

145149

const cfg = {} as OpenClawConfig;

146150

@@ -209,7 +213,7 @@ describe("noteMemorySearchHealth", () => {

209213

});

210214211215

expect(note).toHaveBeenCalledTimes(1);

212-

const message = String(note.mock.calls[0]?.[0] ?? "");

216+

const message = firstNoteMessage();

213217

expect(message).toContain("gateway reports local embeddings are not ready");

214218

expect(message).toContain("node-llama-cpp not installed");

215219

});

@@ -271,9 +275,7 @@ describe("noteMemorySearchHealth", () => {

271275

expect(resolveApiKeyForProvider).not.toHaveBeenCalled();

272276

expect(checkQmdBinaryAvailability).not.toHaveBeenCalled();

273277

expect(note).toHaveBeenCalledTimes(1);

274-

expect(String(note.mock.calls[0]?.[0] ?? "")).toContain(

275-

"No active memory plugin is registered",

276-

);

278+

expect(firstNoteMessage()).toContain("No active memory plugin is registered");

277279

});

278280279281

it("does not warn when CLI backend resolution is missing but gateway memory probe is ready", async () => {

@@ -308,9 +310,7 @@ describe("noteMemorySearchHealth", () => {

308310

expect(resolveApiKeyForProvider).not.toHaveBeenCalled();

309311

expect(checkQmdBinaryAvailability).not.toHaveBeenCalled();

310312

expect(note).toHaveBeenCalledTimes(1);

311-

expect(String(note.mock.calls[0]?.[0] ?? "")).toContain(

312-

"No active memory plugin is registered",

313-

);

313+

expect(firstNoteMessage()).toContain("No active memory plugin is registered");

314314

});

315315316316

it("warns when CLI backend resolution is missing and gateway memory probe is not ready", async () => {

@@ -328,9 +328,7 @@ describe("noteMemorySearchHealth", () => {

328328

expect(resolveApiKeyForProvider).not.toHaveBeenCalled();

329329

expect(checkQmdBinaryAvailability).not.toHaveBeenCalled();

330330

expect(note).toHaveBeenCalledTimes(1);

331-

expect(String(note.mock.calls[0]?.[0] ?? "")).toContain(

332-

"No active memory plugin is registered",

333-

);

331+

expect(firstNoteMessage()).toContain("No active memory plugin is registered");

334332

});

335333336334

it("does not warn when QMD backend is active", async () => {

@@ -366,7 +364,7 @@ describe("noteMemorySearchHealth", () => {

366364

await noteMemorySearchHealth(qmdCfg, {});

367365368366

expect(note).toHaveBeenCalledTimes(1);

369-

const message = String(note.mock.calls[0]?.[0] ?? "");

367+

const message = firstNoteMessage();

370368

expect(message).toContain("QMD memory backend is configured");

371369

expect(message).toContain("spawn qmd ENOENT");

372370

expect(message).toContain("npm install -g @tobilu/qmd");

@@ -495,7 +493,7 @@ describe("noteMemorySearchHealth", () => {

495493

gatewayMemoryProbe: { checked: true, ready: false, error: "connection refused" },

496494

});

497495498-

const message = String(note.mock.calls[0]?.[0] ?? "");

496+

const message = firstNoteMessage();

499497

expect(message).toContain('provider "ollama" is configured');

500498

expect(message).toContain("embeddings are not ready");

501499

});

@@ -511,7 +509,7 @@ describe("noteMemorySearchHealth", () => {

511509

gatewayMemoryProbe: { checked: true, ready: false, error: "LM API token missing" },

512510

});

513511514-

const message = String(note.mock.calls[0]?.[0] ?? "");

512+

const message = firstNoteMessage();

515513

expect(message).toContain('provider "lmstudio" is configured');

516514

expect(message).toContain("embeddings are not ready");

517515

});

@@ -569,7 +567,7 @@ describe("noteMemorySearchHealth", () => {

569567

},

570568

});

571569572-

const message = String(note.mock.calls[0]?.[0] ?? "");

570+

const message = firstNoteMessage();

573571

expect(message).toContain('provider "lmstudio" is configured');

574572

});

575573

@@ -584,7 +582,7 @@ describe("noteMemorySearchHealth", () => {

584582

gatewayMemoryProbe: { checked: true, ready: true },

585583

});

586584587-

const message = note.mock.calls[0]?.[0] as string;

585+

const message = firstNoteMessage();

588586

expect(message).toContain("reports memory embeddings are ready");

589587

});

590588

@@ -603,7 +601,7 @@ describe("noteMemorySearchHealth", () => {

603601

},

604602

});

605603606-

const message = note.mock.calls[0]?.[0] as string;

604+

const message = firstNoteMessage();

607605

expect(message).toContain("Gateway memory probe for default agent is not ready");

608606

expect(message).toContain("openclaw configure --section model");

609607

expect(message).not.toContain("openclaw auth add --provider");

@@ -622,7 +620,7 @@ describe("noteMemorySearchHealth", () => {

622620

// DEFAULT_LOCAL_MODEL fallback does NOT apply to auto — only to explicit

623621

// provider: "local". So with no local file and no API keys, warn.

624622

expect(note).toHaveBeenCalledTimes(1);

625-

const message = String(note.mock.calls[0]?.[0] ?? "");

623+

const message = firstNoteMessage();

626624

expect(message).toContain("needs at least one embedding provider");

627625

expect(message).toContain("openclaw configure --section model");

628626

});

@@ -676,7 +674,7 @@ describe("noteMemorySearchHealth", () => {

676674677675

await noteMemorySearchHealth(cfg);

678676679-

const message = String(note.mock.calls[0]?.[0] ?? "");

677+

const message = firstNoteMessage();

680678

expect(message).toContain("GEMINI_API_KEY");

681679

expect(message).toContain('provider is set to "gemini"');

682680

});

@@ -690,7 +688,7 @@ describe("noteMemorySearchHealth", () => {

690688691689

await noteMemorySearchHealth(cfg);

692690693-

const message = String(note.mock.calls[0]?.[0] ?? "");

691+

const message = firstNoteMessage();

694692

expect(message).toContain("OPENAI_API_KEY");

695693

});

696694

@@ -771,7 +769,7 @@ describe("memory recall doctor integration", () => {

771769

qmd: undefined,

772770

});

773771

expect(note).toHaveBeenCalledTimes(1);

774-

const message = String(note.mock.calls[0]?.[0] ?? "");

772+

const message = firstNoteMessage();

775773

expect(message).toContain("Memory recall artifacts need attention:");

776774

expect(message).toContain("doctor --fix");

777775

expect(message).toContain("memory status --fix");

@@ -812,7 +810,7 @@ describe("memory recall doctor integration", () => {

812810

workspaceDir: "/tmp/agent-default/workspace",

813811

});

814812

expect(note).toHaveBeenCalledTimes(1);

815-

const message = String(note.mock.calls[0]?.[0] ?? "");

813+

const message = firstNoteMessage();

816814

expect(message).toContain("Memory recall artifacts repaired:");

817815

expect(message).toContain("rewrote recall store");

818816

expect(message).toContain("removed stale promotion lock");