fix: use collection deletion instead of reset, add embedding retry, slow down indexing

- semantic-cache.clearCache: delete collection instead of client.reset()
  to avoid 403 Forbidden on newer ChromaDB versions
- vault-vector-store.clearIndex: same collection deletion approach
- ContentVectorizer: add 3-attempt retry with exponential backoff (1s, 2s, 4s)
- main.ts: reduce indexing batch size from 5 to 2, increase delay from 100ms to 500ms
- Update semantic-cache tests for deleteCollection
This commit is contained in:
2026-05-19 23:41:05 +02:00
parent ce109cf6fb
commit cc97d77810
5 changed files with 104 additions and 55 deletions
+5 -3
View File
@@ -155,13 +155,15 @@ describe('SemanticCacheService', () => {
await disabledCacheService.clearCache();
expect(mockChromaClient.reset).not.toHaveBeenCalled();
expect(mockChromaClient.deleteCollection).not.toHaveBeenCalled();
});
it('should clear the cache via the ChromaClient', async () => {
it('should clear the cache via deleteCollection', async () => {
await cacheService.clearCache();
expect(mockChromaClient.reset).toHaveBeenCalled();
expect(mockChromaClient.deleteCollection).toHaveBeenCalledWith({
name: mockCacheConfig.collectionName,
});
});
});
});