• v6.2.3 0ba6da405e

    dpsifr released this 2025-11-26 21:08:04 +01:00 | 513 commits to main since this release

    Bug Fix

    Fixed: counts.byType({ excludeVFS: true }) now returns correct type counts

    Root Cause

    lazyLoadCounts() was reading from stats.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 to init() (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