brainy/src/storage/adapters
David Snelling 79ae349b60 fix: clear() now properly resets VFS and COW state
Bug: After brain.clear(), VFS operations failed with
"Source entity 00000000-0000-0000-0000-000000000000 not found"

Root causes fixed:
- VFS instance remained in memory pointing to deleted root entity
- FileSystemStorage.clear() set blobStorage=undefined but didn't reinit
- Write-through cache returned stale entity data after clear()

Changes:
- Re-initialize COW (BlobStorage) after storage.clear() in brainy.ts
- Reset and reinitialize VFS following checkout() pattern
- Add clearWriteCache() to BaseStorage, call in Memory/FileSystem adapters
- Add 7 integration tests for VFS clear functionality

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 17:04:09 -08:00
..
azureBlobStorage.ts feat: progressive init and readiness API for cloud storage 2026-01-07 12:51:05 -08:00
baseStorageAdapter.ts feat: progressive init and readiness API for cloud storage 2026-01-07 12:51:05 -08:00
batchS3Operations.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
fileSystemStorage.ts fix: clear() now properly resets VFS and COW state 2026-01-16 17:04:09 -08:00
gcsStorage.ts feat: progressive init and readiness API for cloud storage 2026-01-07 12:51:05 -08:00
historicalStorageAdapter.ts fix(cow): asOf() fails with "COW not enabled" due to property name mismatch 2025-12-02 11:22:04 -08:00
memoryStorage.ts fix: clear() now properly resets VFS and COW state 2026-01-16 17:04:09 -08:00
opfsStorage.ts feat: ID-first storage architecture + remove memory-unsafe APIs (v6.0.0) 2025-11-19 16:46:11 -08:00
optimizedS3Search.ts fix: resolve critical 378x pagination infinite loop bug (v5.7.11) 2025-11-13 14:20:19 -08:00
r2Storage.ts perf(storage): simplify cloud adapters to always-on write buffering 2025-12-02 13:43:04 -08:00
s3CompatibleStorage.ts feat: progressive init and readiness API for cloud storage 2026-01-07 12:51:05 -08:00