-
v6.5.0 Stable
released this
2025-12-11 22:27:45 +01:00 | 497 commits to main since this releaseWhat's Changed
Bug Fixes
- fix(vfs): prevent race condition in bulkWrite by ordering operations
- Process mkdir operations sequentially first (sorted by path depth)
- Then process write/delete/update operations in parallel batches
- Prevents duplicate directory entities when mkdir and write for related paths are in the same batch
Documentation
- Updated API documentation for accuracy
- Added comprehensive bulkWrite documentation to VFS_CORE.md
- Fixed incorrect API signatures in docs/README.md, docs/guides/neural-api.md
Tests
- Added comprehensive tests for bulkWrite race condition scenarios
Full Changelog: https://github.com/soulcraftlabs/brainy/compare/v6.4.0...v6.5.0
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
- fix(vfs): prevent race condition in bulkWrite by ordering operations
-
released this
2025-12-11 17:41:14 +01:00 | 499 commits to main since this releaseFull Changelog: https://github.com/soulcraftlabs/brainy/compare/v6.3.2...v6.4.0
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
-
Source code (ZIP)
-
released this
2025-12-10 01:17:45 +01:00 | 501 commits to main since this releaseBug Fixes
VFS File Versioning Fix
VFS files now correctly version their actual blob content instead of stale embedding text.
Problem: When versioning VFS files, all versions had identical data because VersionManager was capturing the stale
entity.data(embedding text) instead of actual file content from BlobStorage.Fix:
VersionManager.save()now reads fresh content viavfs.readFile()for VFS filesVersionManager.restore()writes content back viavfs.writeFile()- Text files stored as UTF-8, binary files as base64
Documentation
- Added VFS file versioning example to API docs
- Updated API docs for v6.3.2
Testing
- Added comprehensive VFS versioning test suite (10 tests)
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
-
released this
2025-12-09 18:38:05 +01:00 | 503 commits to main since this releaseFull Changelog: https://github.com/soulcraftlabs/brainy/compare/v6.3.0...v6.3.1
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
-
Source code (ZIP)
-
released this
2025-12-04 21:55:35 +01:00 | 505 commits to main since this releaseCritical Architecture Fix: Singleton GraphAdjacencyIndex
This release fixes the root cause of the VFS tree corruption bug reported by the Soulcraft Workshop team.
🐛 Bug Fixed
VFS tree structure returns 0 children after file writes - Previously, calling
vfs.mkdir()orvfs.writeFile()could corrupt the VFS index, causingreaddir('/')to return incomplete results. Data was NOT lost - it existed in storage but wasn't queryable.🔧 Root Cause
The bug was caused by dual ownership of GraphAdjacencyIndex:
Storage.graphIndex(created in BaseStorage.init())Brainy.graphIndex(created in Brainy.init())
When verbs were saved, both instances were updated. But if Storage's graphIndex was recreated (via
ensureInitialized()), the new instance had an empty verbIdSet. Queries filtered through this empty verbIdSet returned nothing.✅ Fix Summary
-
GraphAdjacencyIndex Singleton Pattern
- Brainy now uses
storage.getGraphIndex()instead of creating its own - Single source of truth - no more dual ownership
- Added
invalidateGraphIndex()for branch switches
- Brainy now uses
-
Auto-rebuild verbIdSet Defense
- If LSM-trees have data but verbIdSet is empty, automatically populate it
- Safety net for edge cases
-
Removed Double-Add Bug
- Graph index updates now happen ONLY via transaction system
- Prevents duplicate counting in
relationshipCountsByType
-
PathResolver Cache Invalidation
- Added
invalidateAllCaches()method checkout()now clears VFS caches before recreating VFS
- Added
📦 Upgrade
npm install @soulcraft/brainy@6.3.0🔗 Related
- Workshop Bug Report: VFS tree corruption after mkdir/writeFile
- Previous patches (v6.2.8-v6.2.9) addressed symptoms, this fixes the root cause
🤖 Generated with Claude Code
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
-
released this
2025-12-04 20:22:41 +01:00 | 507 commits to main since this releaseCritical Bug Fixes
This release fixes two critical VFS bugs that caused directory listing corruption, reported by the Soulcraft Workshop team.
Bug 1: verbCountsByType Optimization Skipping Requested Types
- Symptom:
vfs.readdir('/')returned empty or incomplete results after app restart - Root Cause:
getVerbs()optimization skipped verb types with count 0, but statistics were stale after restart - Fix: Never skip verb types explicitly requested in the filter; added fast path for sourceId + verbType combo
Bug 2: UnifiedCache Not Invalidated on Path Deletion
- Symptom: "Source entity not found" errors when recreating deleted folders
- Root Cause:
invalidatePath()cleared local caches but NOT the global UnifiedCache - Fix: Added
deleteByPrefix()to UnifiedCache; fixedinvalidatePath()to clear all cache layers
Files Changed
src/storage/baseStorage.ts- verbCountsByType fix + fast pathsrc/utils/unifiedCache.ts- deleteByPrefix methodsrc/vfs/PathResolver.ts- cache invalidation fix
Tests Added
- 7 new unit tests covering both bugs and edge cases
- Delete/recreate cycle tests verified working
Full Changelog: https://github.com/soulcraftlabs/brainy/compare/v6.2.8...v6.2.9
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
- Symptom:
-
released this
2025-12-02 20:45:22 +01:00 | 515 commits to main since this releaseBug Fix
Critical fix for
brain.counts.byType()returning inflated/incorrect valuesProblem
brain.counts.byType()returned wildly incorrect counts that could be 100x inflated:// Actual entities: 68 // counts.byType() returned: { "collection": 4186, "document": 6480, "person": 812, // ... ~100x inflated }Root Cause
Two accumulation bugs:
-
MetadataIndex.lazyLoadCounts()- Added counts to existing Map instead of replacing:// BUG: Each restart doubled the counts const currentCount = this.totalEntitiesByType.get(type) || 0 this.totalEntitiesByType.set(type, currentCount + bitmap.size) -
MetadataIndex.rebuild()andGraphAdjacencyIndex.rebuild()- Did not clear count Maps before rebuilding
Fix
- Clear
totalEntitiesByType,entityCountsByTypeFixed,verbCountsByTypeFixedat start oflazyLoadCounts() - Clear counts in
MetadataIndex.rebuild()before rebuilding - Clear
relationshipCountsByTypeinGraphAdjacencyIndex.rebuild()
Affected Features
brain.counts.byType()✅ Fixedbrain.counts.entities()✅ Fixedbrain.counts.byRelationshipType()✅ Fixed- All storage adapters (Memory, FileSystem, S3, GCS, R2, Azure, OPFS) ✅ Fixed
Upgrade
npm install @soulcraft/brainy@6.2.5After upgrading, counts will be correct on next restart - no manual action needed.
Reported by: Soulcraft Workshop Team
🤖 Generated with Claude Code
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
-
-
released this
2025-12-02 20:22:17 +01:00 | 517 commits to main since this releaseBug Fix
Critical fix for
asOf()time-travel queriesProblem
brain.asOf(commitId)was failing with:Historical storage requires underlying storage to have COW enabled. Call brain.init() first to initialize COW.This occurred even when COW was properly initialized.
Root Cause
Property name mismatch in
HistoricalStorageAdapter:- Was looking for:
_commitLog,_blobStorage,_treeObject(with underscores) - Actually set as:
commitLog,blobStorage(no underscores, no treeObject)
Fix
- Corrected property access to use
commitLogandblobStorage - Removed unused
treeObjectproperty (TreeObject is dynamically imported) - Removed unused static import
Affected Features
brain.asOf(commitId)- Time-travel queries ✅ Fixedbrain.fork()- Already working correctlybrain.commit()- Already working correctlybrain.getHistory()- Already working correctly
Upgrade
npm install @soulcraft/brainy@6.2.4
Reported by: Soulcraft Workshop Team
🤖 Generated with Claude Code
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
- Was looking for:
-
released this
2025-11-26 21:08:04 +01:00 | 519 commits to main since this releaseBug Fix
Fixed:
counts.byType({ excludeVFS: true })now returns correct type countsRoot Cause
lazyLoadCounts()was reading fromstats.nounCount(SERVICE-keyed data like{"brainy": 100}) instead of the sparse index (TYPE-keyed data like{"person": 17, "concept": 22}). Additionally, it had a race condition (not awaited in constructor).Changes
- Fix
lazyLoadCounts()to compute counts from 'noun' sparse index (correct source) - Move
lazyLoadCounts()call from constructor toinit()(properly awaited) - Add
getNounCountsByType()/getVerbCountsByType()getters to BaseStorage - Add regression tests (7 tests)
Impact
- Fixes Workshop bug where
counts.byType({ excludeVFS: true })returned{}even when 48 entities existed - VFS statistics APIs now work correctly
- HNSW, MetadataIndexManager, and storage now agree on counts
Upgrade
npm update @soulcraft/brainy
🤖 Generated with Claude Code
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
- Fix
-
released this
2025-11-26 00:41:12 +01:00 | 521 commits to main since this releaseFull Changelog: https://github.com/soulcraftlabs/brainy/compare/v6.2.1...v6.2.2
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
-
Source code (ZIP)