brainy/tests
David Snelling 732d23bd2a fix: resolve v5.7.x race condition with write-through cache (v5.7.2)
Fixes critical bug where brain.add() → brain.relate() would fail with
"Source entity not found" error. The issue occurred because entities
written asynchronously weren't immediately queryable.

Solution: Write-through cache at storage layer (baseStorage.ts)
- Cache data during async writes (synchronous operation)
- Check cache before disk reads (guarantees read-after-write consistency)
- Self-cleaning (cache clears after write completes)
- Zero-config, automatic for all 8 storage adapters

Impact:
- Fixes PDF import failures in v5.7.0/v5.7.1
- Maintains 12-24x import speedup from v5.7.0
- Production-ready for billion-scale deployments

Test coverage:
- 8 unit tests (write-through cache behavior)
- 7 integration tests (brain.add → brain.relate scenarios)
- 74 regression tests verified passing

Resolves: Import failures, VFS structure generation errors
2025-11-12 09:32:52 -08:00
..
api feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
augmentations/intelligentImport feat: add intelligent import for CSV, Excel, and PDF files 2025-10-01 16:51:03 -07:00
benchmarks feat: remove legacy ImportManager, standardize getStats() API 2025-10-09 11:40:31 -07:00
comprehensive feat: Stage 3 CANONICAL taxonomy with 169 types (v5.5.0) 2025-11-06 09:02:23 -08:00
configs 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
fixtures/import feat: add intelligent import for CSV, Excel, and PDF files 2025-10-01 16:51:03 -07:00
helpers feat: Brainy 3.0 - Triple Intelligence Release 2025-09-15 11:06:16 -07:00
integration fix: resolve v5.7.x race condition with write-through cache (v5.7.2) 2025-11-12 09:32:52 -08:00
manual fix: update tests for v5.1.0 API changes (VFS auto-init + property access) 2025-11-02 11:38:12 -08:00
performance fix: update all Stage 2 references to Stage 3 CANONICAL type counts 2025-11-06 09:40:33 -08:00
regression fix: resolve v5.7.0 deadlock by restoring storage layer separation (v5.7.1) 2025-11-11 15:24:43 -08:00
scripts feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
unit fix: resolve v5.7.x race condition with write-through cache (v5.7.2) 2025-11-12 09:32:52 -08:00
vfs fix: resolve HNSW race condition and verb weight extraction (v5.4.0) 2025-11-05 17:05:07 -08:00
brainy-3.test.ts fix: resolve 10 test failures across clustering, metadata, and deletion 2025-10-09 16:33:08 -07:00
critical-error-handling.test.ts feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
critical-neural-validation.test.ts feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
critical-performance-benchmark.test.ts feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
distributed-demo.test.ts feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
model-loading.test.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
opfs-storage.test.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
package-size-breakdown.test.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
package-size-limit.test.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
setup-integration.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
setup-unit.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
setup.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
streaming-pipeline.test.ts feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
type-utils.test.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
typeAwareHNSWIndex.test.ts feat: Phase 2 Type-Aware HNSW - 87% memory reduction @ billion scale 2025-10-15 15:39:28 -07:00
typeAwareQueryPlanner.test.ts fix: update all Stage 2 references to Stage 3 CANONICAL type counts 2025-11-06 09:40:33 -08:00