• v5.6.1 7066d802e2

    v5.6.1 Stable

    dpsifr released this 2025-11-11 18:10:11 +01:00 | 592 commits to main since this release

    Bug Fixes

    Fix clear() not deleting COW version control data

    Resolves critical bug where brain.clear() did not fully clear storage:

    Root Causes

    1. _cow/ directory contents deleted but directory not removed
    2. In-memory counters (totalNounCount, totalVerbCount) not reset
    3. COW could auto-reinitialize on next operation

    Fixes Applied

    • FileSystemStorage: Delete entire _cow/ directory with fs.rm()
    • OPFSStorage: Delete _cow/ with removeEntry({recursive: true})
    • S3CompatibleStorage: Reset counters after clear
    • BaseStorage: Guard initializeCOW() against reinit when cowEnabled=false
    • All adapters: Reset totalNounCount and totalVerbCount to 0

    Impact

    Resolves Workshop bug report - storage now properly clears from 103MB to 0 bytes, entity counts correctly return to 0.

    GCSStorage, R2Storage, and AzureBlobStorage already had correct implementations.

    Full Changelog: https://github.com/soulcraftlabs/brainy/compare/v5.6.0...v5.6.1

    Downloads