brainy/src
David Snelling 36fdffb27b fix: resolve VFS readdir crash due to stale verb count in pagination
Fixes a critical bug where getVerbsWithPagination would crash with
"Cannot read properties of undefined (reading 'replace')" when
the cached totalVerbCount exceeded actual verb files on disk.

Changes:
- Load actual verb files before calculating pagination bounds
- Use actualFileCount instead of stale totalVerbCount cache
- Add null-safety check for undefined array elements
- Track successfullyLoaded count to prevent infinite loops
- Fix getVerbsWithPaginationStreaming to use streaming result for hasMore

This mirrors the fix applied to nouns pagination in commit 5f10f8d
but was never applied to verbs until now.

Reported by Brain Cloud team - VFS directory operations would fail
when metadata entries existed without corresponding verb files.
2025-10-01 13:03:41 -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: add neural extraction APIs with NounType taxonomy 2025-09-29 13:51:47 -07:00
cli fix: conversation commands now properly close Brainy instance to return to CLI 2025-09-29 17:03:20 -07:00
config fix: update hardcoded version references to use dynamic version 2025-09-26 13:41:16 -07:00
conversation feat: add infinite agent memory with MCP integration 2025-09-29 15:37:11 -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
mcp fix: update all imports and references from BrainyData to Brainy 2025-09-30 17:09:15 -07:00
neural refactor: remove deprecated BrainyData class completely 2025-09-30 16:04:00 -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: resolve VFS readdir crash due to stale verb count in pagination 2025-10-01 13:03:41 -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 refactor: remove deprecated BrainyData class completely 2025-09-30 16:04:00 -07:00
universal fix: prevent fs adapter from throwing on import in browser 2025-09-17 16:22:02 -07:00
utils fix: update hardcoded version references to use dynamic version 2025-09-26 13:41:16 -07:00
vfs fix: resolve VFS race conditions and decompression errors 2025-09-30 12:54:40 -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 refactor: remove deprecated BrainyData class completely 2025-09-30 16:04:00 -07:00
coreTypes.ts feat: add distributed architecture with sharding and coordination 2025-09-22 15:45:35 -07:00
cortex.ts 🧠 Brainy 2.0.0 - Zero-Configuration AI Database with Triple Intelligence™ 2025-08-26 12:32:21 -07:00
importManager.ts feat: modernize API architecture and deprecation handling 2025-09-17 11:54:20 -07:00
index.ts feat: add infinite agent memory with MCP integration 2025-09-29 15:37:11 -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