fix(core): resolve TypeScript compilation errors and test failures

- Add missing 'level' property to HNSWNoun objects in storage adapters
- Fix HNSWVerb type compatibility in CacheManager imports
- Clear statistics cache when clearing storage to prevent stale data
- Update test expectations to match actual HNSW index behavior (includes both nouns and verbs)
- Add StatisticsCollector utility for enhanced metrics tracking
- Improve statistics comparison in tests to handle volatile fields
This commit is contained in:
David Snelling 2025-08-04 20:00:38 -07:00
parent 8c1c9a08d3
commit ba890170bf
12 changed files with 668 additions and 112 deletions

View file

@ -389,7 +389,7 @@ describe('Brainy Core Functionality', () => {
// Verify counts
expect(stats.nounCount).toBe(3)
expect(stats.verbCount).toBe(2)
expect(stats.hnswIndexSize).toBe(1)
expect(stats.hnswIndexSize).toBe(5)
})
})
})