feat: explain_dependency(A, B) — shortest call-path finder #26
Labels
No labels
code-review
correctness
dos
performance
security
severity/high
severity/low
severity/medium
tech-debt
Kind/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
h-dv/code-index#26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rank 5 of the 2026-07-20 index-data brainstorm (
_prdoc/records/brainstorm-2026-07-20-index-data-catalog.md).What: given two symbols, return the shortest call path between them over
symbol_edges— and, reversed, "through which chain does tool X break if B's signature changes".Why: best value/cost ratio in the entire brainstorm. Demonstrated: path from an mcp-server test to indexer internals (
read_code_reports_served_span_honestly → pre_index → db::open → apply_pragmas, 4 hops, 3 crates) found in one BFS; reproducing with existing tools needs ~4 sequentialfind_calleescalls whereopenalone has 30+ callees to sift — the most token-expensive agent pattern observed.Cost: trivial — BFS over 4,109 edges at query time, sub-millisecond; no schema change, no new data.
Shipped in v0.5.20 (I029 Track B) as the
explain_dependencyMCP tool.BFS shortest path over
symbol_edgeswith per-hop edgeweight,reversedirection, and honesty guarantees hardened by the adversarial review:found:falsecarries both endpoint files' resolution rates (absence-of-path ≠ proof of independence),from==torequires an actual cycle (a real self-loop returns[x, x]with its edge weight; no trivial empty-path false positive), and stalesymbol_edgesrows (no FK; deletion window) are endpoint-joined out at load and surfaced asstale_edges— a dangling id can never be spliced into a fabricated path.Validated on this repository:
pre_index → open → apply_pragmas(mcp-server test harness → indexer internals, 3 crates) found in one call. Covered by 7-language e2e.