brainy/src
David Snelling 01e89fffca fix(storage): resolve persistence restart bug across all storage adapters
Critical bug fix that restores data persistence after application restart for all storage adapters (GCS, S3, OPFS, FileSystem).

**Root Cause:**
Storage adapters were loading entity counts from _system/counts.json but not returning totalCount in pagination methods, causing rebuildIndexesIfNeeded() to see undefined and incorrectly assume no data existed.

**Changes:**
- GCS Storage: Return totalCount in getNodesWithPagination() and getVerbsWithPagination()
- S3 Storage: Call initializeCounts() in init() and return totalCount in pagination methods
- OPFS Storage: Call initializeCounts() in init() to load pre-calculated counts
- BaseStorage: Add defensive validation to prevent future adapters from missing totalCount

**Impact:**
- Production deployments now work correctly (Cloud Run, AWS, Kubernetes)
- Data persists correctly across container restarts
- Serverless scale-to-zero deployments now functional
- All storage adapters use O(1) pre-calculated counts (scales to millions of entities)

**Testing:**
- Build passes with no TypeScript errors
- All existing tests pass
- Defensive validation ensures future storage adapters won't have this bug

Fixes critical production issue affecting all persistent storage deployments.
2025-10-09 15:07:18 -07:00
..
api feat: add node: protocol to all Node.js built-in imports for bundler compatibility 2025-09-17 14:20:21 -07:00
augmentations feat: remove legacy ImportManager, standardize getStats() API 2025-10-09 11:40:31 -07:00
cli refactor: streamline core API surface 2025-10-04 08:52:06 -07:00
config fix: enable GCS native storage with Application Default Credentials 2025-10-09 10:39:54 -07:00
cortex feat: add node: protocol to all Node.js built-in imports for bundler compatibility 2025-09-17 14:20:21 -07:00
critical feat: add browser environment compatibility support 2025-09-17 15:48:02 -07:00
distributed feat: add node: protocol to all Node.js built-in imports for bundler compatibility 2025-09-17 14:20:21 -07:00
embeddings feat: complete VFS with Knowledge Layer integration 2025-09-25 10:47:44 -07:00
errors feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
graph feat: add production-scale counting and pagination APIs 2025-09-16 11:24:20 -07:00
hnsw feat: add distributed architecture with sharding and coordination 2025-09-22 15:45:35 -07:00
import fix: resolve 5 critical import bugs for production scale 2025-10-09 13:56:45 -07:00
importers feat: add unified import system with auto-detection and dual storage 2025-10-08 16:55:30 -07:00
mcp refactor: streamline core API surface 2025-10-04 08:52:06 -07:00
neural feat: remove legacy ImportManager, standardize getStats() API 2025-10-09 11:40:31 -07:00
patterns 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
scripts feat: add node: protocol to all Node.js built-in imports for bundler compatibility 2025-09-17 14:20:21 -07:00
shared refactor: remove deprecated BrainyData class completely 2025-09-30 16:04:00 -07:00
storage fix(storage): resolve persistence restart bug across all storage adapters 2025-10-09 15:07:18 -07:00
streaming feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
triple feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
types feat: add progress tracking, entity caching, and relationship confidence 2025-10-01 15:12:54 -07:00
universal fix: prevent fs adapter from throwing on import in browser 2025-09-17 16:22:02 -07:00
utils fix: resolve 5 critical import bugs for production scale 2025-10-09 13:56:45 -07:00
vfs feat: add resolvePathToId() method and fix test issues 2025-10-07 11:51:17 -07:00
augmentationManager.ts feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
augmentationPipeline.ts feat: Brainy 3.0 - Production-ready Triple Intelligence database 2025-09-11 16:23:32 -07:00
brainy.ts fix: pass entire storage config to createStorage (gcsNativeStorage now detected) 2025-10-09 11:08:52 -07:00
coreTypes.ts fix: metadata batch reading from correct directory 2025-10-06 15:43:45 -07:00
cortex.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
index.ts feat: remove legacy ImportManager, standardize getStats() API 2025-10-09 11:40:31 -07:00
pipeline.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
setup.ts chore: enforce consistent coding style and semicolon removal 2025-09-29 09:50:59 -07:00
unified.ts chore: enforce consistent coding style and semicolon removal 2025-09-29 09:50:59 -07:00
worker.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00