• v3.37.8 38b563c981

    dpsifr released this 2025-10-13 18:01:39 +02:00 | 816 commits to main since this release

    🐛 Critical Bug Fix

    Fixed cache pollution from empty-vector objects in HNSW lazy mode that caused silent failures during entity retrieval after container restarts.

    What's Fixed

    Cache Validation:

    • Add comprehensive validation to detect and reject cached objects with empty vectors (vector: [])
    • Auto-remove invalid cached objects and reload from cloud storage
    • Prevent caching nodes with empty vectors in saveNode()
    • Add detailed cached object structure logging for diagnostics

    Affected Adapters:

    • GCS Storage: Full validation and auto-recovery
    • S3 Storage: Full validation and auto-recovery

    Root Cause

    HNSW's adaptive caching for large datasets uses lazy loading (vector: [] for memory efficiency). These empty-vector objects were being cached and returned as valid, causing getNode() to return null despite valid data existing in cloud storage.

    Impact

    This fix resolves the critical GCS persistence bug where:

    • Cache contained objects but getNode() returned null
    • Entity retrieval failed after container restarts
    • Silent failures with no error logs

    Upgrade

    npm install @soulcraft/brainy@3.37.8
    

    Full Changelog: https://github.com/soulcraftlabs/brainy/compare/v3.37.7...v3.37.8

    Downloads