v1.7.2fossic2026-06-21

HnswProvider Gains Atomic Disk Persistence

HnswProvider can now save its HNSW vector index and event-ID mappings atomically to disk and reload them on construction, with corrupt-file recovery and system event emission.

v1.7.22026-06-21
  • ·save_to_disk() writes index.hnsw.data + index.hnsw.graph + mappings.bin atomically — any write failure removes all three files before returning the error
  • ·Auto-load on construction: new() loads existing files if present; corrupt files emit HnswIndexCorrupted and fall back to an operational empty index
  • ·load_hnsw_catching_panics wraps hnsw_rs load_hnsw in catch_unwind — hnsw_rs panics on corrupt data via assert_eq! rather than returning Err
  • ·Three system events (HnswIndexBuilt, HnswIndexLoaded, HnswIndexCorrupted) tagged {"event_class":"hnsw"} via lazy Mutex<Option<SystemStreamWriter>>