brainy/src/storage/adapters
David Snelling 968e7daeab fix: return minimal stats with counts when statistics don't exist
Previously, when no statistics file existed (e.g., first container restart
after adding entities), getStatisticsData() returned null, causing HNSW
rebuild to see entityCount=0 even though entities existed.

This fix ensures all storage adapters return minimal StatisticsData with
totalNodes/totalEdges populated from in-memory counts when statistics files
don't exist yet.

Changes:
- gcsStorage.ts: Return minimal stats instead of null on 404 errors
- memoryStorage.ts: Return minimal stats when statistics is null
- opfsStorage.ts: Return minimal stats on read errors and null checks
- s3CompatibleStorage.ts: Return minimal stats when no statistics found
- fileSystemStorage.ts: Use in-memory counts in mergeStatistics() null case

This completes the GCS persistence fix started in v3.37.3 and ensures
container restarts work correctly in all cloud environments.

Fixes: GCS container restart hang during HNSW index rebuild
2025-10-11 09:05:16 -07:00
..
baseStorageAdapter.ts feat: implement HNSW index rebuild and unified index interface 2025-10-10 11:15:17 -07: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: return minimal stats with counts when statistics don't exist 2025-10-11 09:05:16 -07:00
gcsStorage.ts fix: return minimal stats with counts when statistics don't exist 2025-10-11 09:05:16 -07:00
memoryStorage.ts fix: return minimal stats with counts when statistics don't exist 2025-10-11 09:05:16 -07:00
opfsStorage.ts fix: return minimal stats with counts when statistics don't exist 2025-10-11 09:05:16 -07:00
optimizedS3Search.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
s3CompatibleStorage.ts fix: return minimal stats with counts when statistics don't exist 2025-10-11 09:05:16 -07:00