• v5.1.0 2c48bac523

    dpsifr released this 2025-11-02 20:45:54 +01:00 | 632 commits to main since this release

    v5.1.0 - VFS Auto-Initialization + Critical Bug Fixes

    🚨 BREAKING CHANGES

    • VFS API Change: VFS is now a property (brain.vfs) not a method (brain.vfs())
    • VFS Auto-Init: VFS automatically initializes during brain.init() - no separate vfs.init() call needed
    • UUID Validation: Stricter UUID validation (32 hex chars required)

    🎯 Key Features

    • Zero-Setup VFS: VFS now auto-initializes - eliminating setup friction
    • Root Directory: Automatically created during brain.init()
    • Simpler API: Property access instead of method call

    🐛 Critical Bug Fixes

    • CRITICAL: Fixed CacheAugmentation race condition causing null pointer during async operations
    • SECURITY: Fixed BlobStorage integrity verification bug (was incorrectly tied to skipCache option)
    • COW: Added proper skipVerification option to BlobReadOptions

    Test Results

    • Before: 906/1051 passing (86%)
    • After: 1020/1051 passing (97%)
    • VFS: 100% passing ✓
    • COW/BlobStorage: 100% passing ✓
    • Batch Operations: 96% passing ✓

    📦 Files Changed

    • src/augmentations/cacheAugmentation.ts - Race condition fix
    • src/storage/cow/BlobStorage.ts - Security fix + skipVerification option
    • tests/**/*.test.ts - 19 test files updated for v5.1.0 API

    🔧 Migration Guide

    // OLD (v5.0.0)
    const brain = new Brainy()
    await brain.init()
    const vfs = brain.vfs()  // Method call
    await vfs.init()         // Separate init required
    
    // NEW (v5.1.0)
    const brain = new Brainy()
    await brain.init()       // VFS auto-initializes here
    const vfs = brain.vfs    // Property access
    // VFS ready to use immediately!
    

    📚 Documentation

    Full Changelog: https://github.com/soulcraftlabs/brainy/compare/v5.0.0...v5.1.0

    Downloads