fix(falkordb): route namespace/ops get_by_group_ids reads to the group's graph#1675
Open
spencer2211 wants to merge 1 commit into
Open
fix(falkordb): route namespace/ops get_by_group_ids reads to the group's graph#1675spencer2211 wants to merge 1 commit into
spencer2211 wants to merge 1 commit into
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
@Naseem77 this is the namespace-path gap you flagged on #1326 — carried forward onto post-#1670 cc @prasmussen15 for context: #1326 was closed in favour of #1670, which fixed |
Author
|
I have read the CLA Document and I hereby sign the CLA behalf on myself, e-mail: spencer.p.fuller@gmail.com |
Author
|
recheck |
The classmethod get_by_group_ids paths were routed to the right FalkorDB graph, but the namespace/ops read path (e.g. graphiti.nodes.episode. get_by_group_ids) delegates to the Falkor *Operations classes with the base driver (default_db) and never cloned to the group's graph, so a single group_id read returned 0 rows. Apply the same single-group clone + multi-group fan-out routing to all nine FalkorDB operations get_by_group_ids methods (episode/entity/community/saga nodes and episodic/entity/community/has_episode/next_episode edges), guarded by isinstance(executor, GraphDriver) so the QueryExecutor param narrows to a clone-capable driver. Adds a package-free routing regression test.
spencer2211
force-pushed
the
fix/falkordb-ops-namespace-group-routing
branch
from
July 23, 2026 04:50
480f214 to
f840e89
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#1670fixed single-group_idrouting for the decorated path (@handle_multiple_group_ids, which clonesself.clients.driverand passes it down asdriver=). The namespace/ops read path is a separate implementation and is still unrouted onmain.graphiti.nodes.episode.get_by_group_ids(...)delegates to the FalkorDB*Operationsclasses (FalkorEpisodeNodeOperations.get_by_group_idsetc.). Those methods receive the base driver asexecutor— pointed atdefault_db— and run the query directly, so they never go through the decorator's clone. On FalkorDB, where eachgroup_idis its own graph, a single-group read therefore queries the empty default graph and returns 0 rows.This is the path reported in #1651 (
get_episodes/delete_episodequerying the wrong graph from the MCP server). There are currently noclonecall sites anywhere undergraphiti_core/driver/falkordb/operations/.Related history: #1325 is the original report; #1326 covered both the classmethod path and this ops path, and was closed in favour of #1670, which covered only the former. This PR carries the remaining half forward against current
main.Change
Apply single-group
executor.clone(database=gid)routing plus multi-group fan-out to all nine FalkorDB operationsget_by_group_idsmethods:The clone is guarded by
isinstance(executor, GraphDriver)so theQueryExecutorparameter narrows to a clone-capable driver (theQueryExecutorprotocol does not declareclone/provider), keeping pyright clean.This is complementary to #1670, not overlapping: the decorator routes at the search/retrieve entry point via
driver=, this routes at the ops layer viaexecutor=.Test plan
Adds
tests/driver/test_falkordb_ops_routing.py— a package-free regression using aspec=GraphDrivermock, so it needs no live FalkorDB and runs in CI. Covers single-group routing, multi-group fan-out, and the empty-group_idspass-through.uv run pytest tests/driver/test_falkordb_ops_routing.py -q→ 5 passeduv run pytest tests/driver/ tests/test_handle_multiple_group_ids.py -q→ 34 passed, 1 skipped (includes fix(falkordb): route single group_id search to the matching graph #1670's decorator tests — no interaction regression)make lint→ ruff clean, pyright 0 errorsHappy to consolidate the repeated fan-out into a shared helper rather than one block per ops class if you'd prefer that shape.