Skip to content

Conversation

@sigfawn
Copy link

@sigfawn sigfawn commented Jan 2, 2026

This PR addresses critical functional bugs in GraphDatabaseAdapter.ts that prevented the graph backend from initializing or performing semantic searches.

1. ESM Compatibility Fix

  • Problem: The adapter was using require('fs') inside an ESM module, which causes a ReferenceError in pure ESM environments.
  • Fix: Replaced require with a standard import * as fs at the top of the file.

2. Cypher Parameter Support

  • Problem: The query() method signature did not accept parameters, making it impossible to perform safe, parameterized queries.
  • Fix: Updated the query() signature to accept params?: Record<string, any> and pass them to the underlying database engine.

3. Functional Search Fix

  • Problem: searchSimilarEpisodes() used the `` placeholder in its Cypher string but failed to pass the actual embedding data. This caused a 100% failure rate for graph-based semantic memory recall.
  • Fix: Corrected the call to pass { embedding } as a parameter map.

4. Data Type Flexibility

  • Improvement: Updated property definitions from string only to any to better reflect the schema-less nature of the graph database while maintaining existing serialization for safety.

Result: The RuVector Graph backend is now functional for initialization and episodic memory retrieval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant