mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-27 04:47:03 -06:00
fix(memory): initialize provider-none lifecycle during sync
This commit is contained in:
@@ -137,6 +137,11 @@ describe("memory manager FTS-only reindex", () => {
|
||||
expect(createEmbeddingProviderMock).not.toHaveBeenCalled();
|
||||
expect(countChunksContaining("Alpha topic")).toBeGreaterThan(0);
|
||||
expect(memoryManager.status().custom?.indexIdentity).toEqual({ status: "valid" });
|
||||
expect(memoryManager.status().custom?.providerState).toEqual({
|
||||
mode: "fts-only",
|
||||
reason: "No embedding provider available (FTS-only mode)",
|
||||
attemptedProviderId: "none",
|
||||
});
|
||||
});
|
||||
|
||||
it("reports explicit provider-none probes as FTS-only without resolving providers", async () => {
|
||||
|
||||
@@ -464,7 +464,7 @@ export class MemoryIndexManager extends MemoryManagerEmbeddingOps implements Mem
|
||||
log.warn(`memory sync failed (search): ${String(err)}`);
|
||||
},
|
||||
});
|
||||
if (preflight.shouldInitializeProvider && this.settings.provider !== "none") {
|
||||
if (preflight.shouldInitializeProvider) {
|
||||
await this.ensureProviderInitialized();
|
||||
}
|
||||
if (!this.provider && this.providerLifecycle.mode === "degraded") {
|
||||
@@ -802,9 +802,7 @@ export class MemoryIndexManager extends MemoryManagerEmbeddingOps implements Mem
|
||||
return this.syncing;
|
||||
}
|
||||
this.syncing = (async () => {
|
||||
if (this.settings.provider !== "none") {
|
||||
await this.ensureProviderInitialized();
|
||||
}
|
||||
await this.ensureProviderInitialized();
|
||||
await this.runSyncWithReadonlyRecovery(params);
|
||||
})().finally(() => {
|
||||
this.syncing = null;
|
||||
|
||||
Reference in New Issue
Block a user