From c3c8f25babc90016a01c1ab224f1c9702c7ab7e5 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 27 Apr 2026 14:19:59 +0100 Subject: [PATCH] fix(memory): report qmd dirty watcher state --- CHANGELOG.md | 1 + extensions/memory-core/src/memory/qmd-manager.test.ts | 3 +++ extensions/memory-core/src/memory/qmd-manager.ts | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c801cc13989..2701efa61ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ Docs: https://docs.openclaw.ai - Ollama/onboarding: de-dupe suggested bare local models against installed `:latest` tags and skip redundant pulls, so setup shows the installed model once and no longer says it is downloading an already available model. Fixes #68952. Thanks @tleyden. - Memory-core/doctor: keep `doctor.memory.status` on the cached path by default and only run live embedding pings for explicit deep probes, preventing slow local embedding backends from blocking Gateway status checks. Fixes #71568. Thanks @apex-system. - Memory/QMD: skip QMD vector status probes and embedding maintenance in lexical `searchMode: "search"`, so BM25-only QMD setups on ARM do not trigger llama.cpp/Vulkan builds during status checks or embed cycles. Fixes #59234 and #67113. Thanks @PrinceOfEgypt, @Vksh07, @Snipe76, @NomLom, @t4r3e2q1-commits, and @dmak. +- Memory/QMD: report the live watcher dirty state in memory status, so changed QMD-backed memory files show as dirty until the queued sync finishes. Fixes #60244. Thanks @xinzf. - Compaction: skip oversized pre-compaction checkpoint snapshots and prune duplicate long user turns from compaction input and rotated successor transcripts, preventing retry storms from being preserved across checkpoint cycles. Fixes #72780. Thanks @SweetSophia. - Control UI/Cron: render cron job prompts and run summaries as sanitized markdown in the dashboard, with full-width block content, safer link clicks, and no duplicate error text when a failed run has no summary. Supersedes #48504. Thanks @garethdaine. - Control UI/Gateway: preserve WebChat client version labels across localhost, 127.0.0.1, and IPv6 loopback aliases on the same port, avoiding misleading `vcontrol-ui` connection logs while investigating duplicate-message reports. Refs #72753 and #72742. Thanks @LumenFromTheFuture and @allesgutefy. diff --git a/extensions/memory-core/src/memory/qmd-manager.test.ts b/extensions/memory-core/src/memory/qmd-manager.test.ts index dbf13ae5c21..1fc523617dd 100644 --- a/extensions/memory-core/src/memory/qmd-manager.test.ts +++ b/extensions/memory-core/src/memory/qmd-manager.test.ts @@ -434,10 +434,13 @@ describe("QmdMemoryManager", () => { expect(initialUpdateCalls).toHaveLength(0); watcher.emit("change", path.join(workspaceDir, "notes.md")); + expect(manager.status().dirty).toBe(true); + await vi.advanceTimersByTimeAsync(25); const updateCalls = spawnMock.mock.calls.filter((call) => call[1]?.[0] === "update"); expect(updateCalls).toHaveLength(1); + expect(manager.status().dirty).toBe(false); await manager.close(); }); diff --git a/extensions/memory-core/src/memory/qmd-manager.ts b/extensions/memory-core/src/memory/qmd-manager.ts index d0d10173003..1d92dec35f3 100644 --- a/extensions/memory-core/src/memory/qmd-manager.ts +++ b/extensions/memory-core/src/memory/qmd-manager.ts @@ -1324,7 +1324,7 @@ export class QmdMemoryManager implements MemorySearchManager { requestedProvider: "qmd", files: counts.totalDocuments, chunks: counts.totalDocuments, - dirty: false, + dirty: this.dirty, workspaceDir: this.workspaceDir, dbPath: this.indexPath, sources: Array.from(this.sources),