Symptom and exact scope
In @claude-flow/cli 3.41.2, agentdb_graph-query mode k-hop returns the native result whenever graph-node loads. There is no coverage check or hydration from graph_edges. An empty native graph returns only the supplied seed with success:true, even when the existing SQL-backed pathfinder retrieves retained relationships.
Verified through the affected project's existing live MCP: ruvllm_status graph totalNodes=0,totalEdges=0,available=true; k-hop for the known retained seed returns count=1 (the seed). This is independent of the constructor persistence defect #3313: correcting persistence does not populate historical relationships.
Minimal fix proposed
Use the existing managed graph_edges SQL CTE path as authority for retained-relationship k-hop queries. Do not use an independently populated native graph to claim historical completeness. If the managed source is unavailable or unreadable, return an explicit error rather than a partial native success. Leave native writes, graph storage, pathfinder, semantic and PageRank modes alone. No migration, edge replay, SQL data rewrite, or database replacement.
Keep the existing SQL depth cap but expose requested vs applied depth and truncation; preserve relation filtering (#3202). Bound the returned-row limit and label it as an output bound, not a work/time/memory budget guarantee. No new graph algorithm.
Acceptance
- SQL relationships are returned with an empty, partial, unavailable or throwing native backend; native is not invoked for this read.
- Empty SQL graph returns an empty result, not a fabricated seed or unrelated native nodes.
- Exact relation filter, cycles, branching, seed exclusion, deterministic ordering, applied depth and output truncation tested against actual native SQLite in a disposable fixture.
- SQL errors/missing source fail explicitly; never report an empty healthy store on error.
- Before/after logical graph rows unchanged in tests and live verification.
- Exact-anchor reversible downstream target; no MCP kills or automatic data recovery.
Related: #3313 (persistence only), #3202 (relation/depth), ruvnet/RuVector#984 (metadata fidelity; not required to use retained SQL).
Symptom and exact scope
In @claude-flow/cli 3.41.2, agentdb_graph-query mode k-hop returns the native result whenever graph-node loads. There is no coverage check or hydration from graph_edges. An empty native graph returns only the supplied seed with success:true, even when the existing SQL-backed pathfinder retrieves retained relationships.
Verified through the affected project's existing live MCP: ruvllm_status graph totalNodes=0,totalEdges=0,available=true; k-hop for the known retained seed returns count=1 (the seed). This is independent of the constructor persistence defect #3313: correcting persistence does not populate historical relationships.
Minimal fix proposed
Use the existing managed graph_edges SQL CTE path as authority for retained-relationship k-hop queries. Do not use an independently populated native graph to claim historical completeness. If the managed source is unavailable or unreadable, return an explicit error rather than a partial native success. Leave native writes, graph storage, pathfinder, semantic and PageRank modes alone. No migration, edge replay, SQL data rewrite, or database replacement.
Keep the existing SQL depth cap but expose requested vs applied depth and truncation; preserve relation filtering (#3202). Bound the returned-row limit and label it as an output bound, not a work/time/memory budget guarantee. No new graph algorithm.
Acceptance
Related: #3313 (persistence only), #3202 (relation/depth), ruvnet/RuVector#984 (metadata fidelity; not required to use retained SQL).