-
released this
2025-11-13 19:46:11 +01:00 | 572 commits to main since this releasev5.7.8: CRITICAL HOTFIX - HNSW Connections Deserialization
Critical Bug Fixed
Fixed "noun.connections.entries is not a function" error reported by Workshop team when using v5.7.7 with lazy loading.
Root Cause
When HNSW data was loaded from JSON storage via
getNounsWithPagination(), theconnectionsfield (which should beMap<number, Set<string>>) was deserialized as a plain JavaScript object{}. Subsequent code that expected a Map with.entries()method would crash.The Fix
Added defensive deserialization in
baseStorage.ts:1156-1168to reconstruct the Map and Sets from plain objects when loading from storage:// v5.7.8: Convert connections from plain object to Map (JSON deserialization fix) const connections = new Map<number, Set<string>>() if (noun.connections && typeof noun.connections === 'object') { for (const [levelStr, ids] of Object.entries(noun.connections)) { if (Array.isArray(ids)) { connections.set(parseInt(levelStr, 10), new Set<string>(ids)) } } }Impact
- ✅ Fixes HNSW index rebuild failures
- ✅ Workshop team can now use v5.7.7+ lazy loading without crashes
- ✅ All existing data formats supported (defensive checks)
- ✅ No data migration required
Upgrade
npm install @soulcraft/brainy@5.7.8No code changes needed - existing applications work automatically.
For Workshop Team
This fixes the blocking issue you reported. The lazy loading feature from v5.7.7 will now work correctly with your existing data.
Testing:
- Build: ✅ PASS
- Unit tests: ✅ PASS (1,032/1,032 tests)
- Published: ✅ npm @soulcraft/brainy@5.7.8
Full Changelog: https://github.com/soulcraftlabs/brainy/compare/v5.7.7...v5.7.8
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
0 downloads