• v2.14.3 455689f8fd

    dpsifr released this 2025-09-03 00:18:44 +02:00 | 975 commits to main since this release

    Critical Bug Fix

    This release fixes the verb retrieval bug that was causing brain.getVerbs() to return empty arrays even after successfully adding verbs.

    The Problem

    Verbs are stored as two separate pieces:

    1. HNSWVerb (id, vector, connections) in /verbs/ directory
    2. Metadata (source, target, type, etc.) in /verb-metadata/ directory

    The getVerbsWithPagination() method wasn't properly reconstructing the complete GraphVerb object from these two pieces.

    The Fix

    • Now properly includes the vector field from HNSWVerb
    • Correctly merges HNSWVerb data with metadata
    • Skips verbs without metadata instead of returning incomplete objects
    • Properly maps sourceId/targetId and source/target fields
    • Handles connections Map deserialization correctly
    • Fixed filter logic to check correct fields

    Impact

    This fixes the issue reported by brain-cloud Explorer where relationships couldn't be retrieved after import, requiring workarounds to maintain local copies of edges.

    Technical Details

    The storage architecture splits verbs for performance:

    • Lightweight HNSW data for vector operations
    • Rich metadata for graph operations

    The retrieval must properly reconstruct both parts, which this fix now does correctly.

    For brain-cloud Explorer

    After updating to v2.14.3, the Explorer project can remove its workaround (lines 2215-2230 in server.ts) and directly use brain.getVerbs() to retrieve relationships.

    Downloads