Skip to content

Synapse Memory DSL integration#96

Open
krypticmouse wants to merge 7 commits intomainfrom
sy
Open

Synapse Memory DSL integration#96
krypticmouse wants to merge 7 commits intomainfrom
sy

Conversation

@krypticmouse
Copy link
Copy Markdown
Collaborator

What does this PR do?

  • Introduced a new Synapse memory backend that connects to a running Synapse runtime over HTTP.
  • Updated Cargo.toml and Cargo.lock to include the synapse-client dependency.
  • Enhanced the openjarvis-python crate to support Synapse memory operations.
  • Implemented methods for storing, retrieving, and managing data with the Synapse backend.
  • Added configuration options for Synapse in the system settings.

This addition allows for more flexible memory management and integration with Synapse services.

How was this tested?

  • 3 Rust unit tests added in rust/crates/openjarvis-tools/src/storage/synapse.rs covering SynapseMemory::parse_results():
    • test_parse_results_empty - verifies an empty JSON object returns an empty result vec
    • test_parse_results_array - verifies a JSON array of objects is correctly parsed into RetrievalResult structs
    • test_parse_results_object_with_data - verifies a JSON object with a nested "data" array is unwrapped and parsed correctly
  • All 3 tests pass (cargo test -p openjarvis-tools --lib storage::synapse)
  • Integration/e2e testing requires a running Synapse runtime (synapse serve); the client methods (emit, query, health, ping, etc.) are thin HTTP wrappers over synapse-client which is itself tested upstream
  • cargo check passes across the full workspace with no errors

Checklist

  • Tests pass (uv run pytest tests/ -v)
  • Linter passes (uv run ruff check src/ tests/)
  • Formatter passes (uv run ruff format --check src/ tests/)
  • New/changed public API has docstrings
  • Follows registry pattern (if adding new component)

@robbym-dev
Copy link
Copy Markdown
Collaborator

Hey @krypticmouse, the Synapse integration looks well-structured. The Rust backend and Python wrapper follow the existing patterns nicely.

Before we can merge, a couple things:

  1. Python tests needed: there are no Python-side tests currently. Could you add unit tests that mock the Rust layer to verify the SynapseMemory class works correctly (store/retrieve/delete/clear, event bus emissions, error handling)?

  2. Commit cleanup: could you squash the history? Commits like "revert changes" and "main cfg" make it hard to review.

  3. Dependency vetting: synapse-client is at v0.1. Could you link to the crate's repo so we can assess its maturity?

Happy to review again once updated!

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.

2 participants