ruvnet / ruvnet/ruflo

agentdb graph k-hop: native backend ignores `relation`; SQL fallback caps depth at 3 while callers ask for 5

Open
#3,202 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
72.7k
Forks
8.6k
Avg merge
2d 23h
Merged PRs (30d)
83

Description

Found during the 2026-09-05 PR-review mission (agent `pr-review-small-repos`, verifying ruvnet/ruClip#13).

**Observed (read, not inferred):**
- `v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts:1033-1040` (`agentdb_graph-query`, k-hop): the native graph backend path calls `getNeighbors(nodeId, depth)` with **no `relation` argument**, so a caller's `relation` filter is silently ignored on that backend.
- The SQL fallback path **caps depth at 3**, while ruClip's cycle-prevention check asks for depth 5.

**Effect:** the same k-hop query can over-reject (relation ignored → extra edges counted) or under-reach (depth 5 truncated to 3) depending on which backend is active. ruClip#13 fixed the response-shape parsing (`results: [{nodeId}]`) on the caller side; this is the remaining server-side inconsistency.

**Ask:** pass `relation` through on the native path (or document that it is unsupported and return an explicit `unsupported` field), and either lift the SQL depth cap or surface the applied depth in the response so callers can detect truncation.

Evidence: ruClip's installed `@claude-flow/cli@3.38.20` carries the same code.

🤖 Generated with [RuFlo](https://github.com/ruvnet/ruflo)

https://claude.ai/code/session_019xHM4rAH4aaShb4DTr1n6s

Contributor guide

Open the contributing guide

Research direction

Start in v3/@claude-flow/cli/src/mcp-tools/agentdb-tools.ts:1033-1040 at the agentdb_graph-query k-hop entry point, and compare the native getNeighbors call with the SQL fallback. Verify relation filtering and depth behavior for callers requesting depth 5; done means both backends provide consistent, detectable behavior without silently ignoring relation or truncating depth.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql, typescript
Domain
api, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.