fix(memory): initialize provider-none lifecycle during sync · openclaw/openclaw@0b7c94a
vincentkoc
·
2026-06-02
·
via Recent Commits to openclaw:main
File tree
extensions/memory-core/src/memory
| Original file line number | Diff line number | Diff line change |
|---|
@@ -137,6 +137,11 @@ describe("memory manager FTS-only reindex", () => {
|
137 | 137 | expect(createEmbeddingProviderMock).not.toHaveBeenCalled(); |
138 | 138 | expect(countChunksContaining("Alpha topic")).toBeGreaterThan(0); |
139 | 139 | expect(memoryManager.status().custom?.indexIdentity).toEqual({ status: "valid" }); |
| 140 | +expect(memoryManager.status().custom?.providerState).toEqual({ |
| 141 | +mode: "fts-only", |
| 142 | +reason: "No embedding provider available (FTS-only mode)", |
| 143 | +attemptedProviderId: "none", |
| 144 | +}); |
140 | 145 | }); |
141 | 146 | |
142 | 147 | it("reports explicit provider-none probes as FTS-only without resolving providers", async () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -464,7 +464,7 @@ export class MemoryIndexManager extends MemoryManagerEmbeddingOps implements Mem
|
464 | 464 | log.warn(`memory sync failed (search): ${String(err)}`); |
465 | 465 | }, |
466 | 466 | }); |
467 | | -if (preflight.shouldInitializeProvider && this.settings.provider !== "none") { |
| 467 | +if (preflight.shouldInitializeProvider) { |
468 | 468 | await this.ensureProviderInitialized(); |
469 | 469 | } |
470 | 470 | if (!this.provider && this.providerLifecycle.mode === "degraded") { |
@@ -802,9 +802,7 @@ export class MemoryIndexManager extends MemoryManagerEmbeddingOps implements Mem
|
802 | 802 | return this.syncing; |
803 | 803 | } |
804 | 804 | this.syncing = (async () => { |
805 | | -if (this.settings.provider !== "none") { |
806 | | -await this.ensureProviderInitialized(); |
807 | | -} |
| 805 | +await this.ensureProviderInitialized(); |
808 | 806 | await this.runSyncWithReadonlyRecovery(params); |
809 | 807 | })().finally(() => { |
810 | 808 | this.syncing = null; |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。