feat: add bounded structural evidence retrieval#9
Conversation
Add conservative same/related-file direct-call evidence and positional argument mappings to context and detailed callees output. Abstain on qualified, ambiguous, recursive, or unreliable cases; keep call-derived local links within visible rows; and cover caps, filters, and false-positive regressions.
Document bounded local/direct-call evidence, regenerate checked-in CLI transcripts from the current binary, and keep output-visible routing details out of the distributed guide.
Greptile SummaryThis PR adds bounded structural evidence retrieval to
Confidence Score: 5/5Safe to merge. All new code paths are additive, conservatively gated, and covered by focused integration tests that exercise the cap, filter, and abstention behaviour. Both new evidence modules are purely additive with no changes to existing resolution or output contracts. Explicit budget caps, conservative abstention on ambiguity, and 49 new tests give high confidence the feature behaves as specified. The CLI fixes are straightforward and also covered by updated integration tests. No files require special attention. The most complex new files — src/evidence/direct_call.rs and src/evidence/local_links.rs — have dedicated test modules and are cross-validated by the flow-filter and callees-detailed integration tests. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant CLI
participant flow.rs as flow.rs (context)
participant callees.rs
participant local_links.rs
participant direct_call.rs
CLI->>flow.rs: srcwalk context target
flow.rs->>flow.rs: filter_call_sites to visible_sites
flow.rs->>local_links.rs: collect_local_links_for_function_spans
local_links.rs-->>flow.rs: LocalLinkGraph (budget flag)
flow.rs->>flow.rs: append_local_structural_links
flow.rs->>direct_call.rs: build_direct_call_evidence_index(visible_sites)
direct_call.rs->>direct_call.rs: collect same-file + related-file targets
direct_call.rs-->>flow.rs: DirectCallEvidenceIndex
flow.rs->>flow.rs: append_direct_call_evidence
CLI->>callees.rs: srcwalk trace callees fn --detailed
callees.rs->>direct_call.rs: build_direct_call_evidence_index(filtered_sites)
direct_call.rs-->>callees.rs: DirectCallEvidenceIndex
callees.rs->>callees.rs: edge_for_site / unknown_for_site inline evidence
callees.rs->>callees.rs: append_unresolved_call_site_evidence
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant CLI
participant flow.rs as flow.rs (context)
participant callees.rs
participant local_links.rs
participant direct_call.rs
CLI->>flow.rs: srcwalk context target
flow.rs->>flow.rs: filter_call_sites to visible_sites
flow.rs->>local_links.rs: collect_local_links_for_function_spans
local_links.rs-->>flow.rs: LocalLinkGraph (budget flag)
flow.rs->>flow.rs: append_local_structural_links
flow.rs->>direct_call.rs: build_direct_call_evidence_index(visible_sites)
direct_call.rs->>direct_call.rs: collect same-file + related-file targets
direct_call.rs-->>flow.rs: DirectCallEvidenceIndex
flow.rs->>flow.rs: append_direct_call_evidence
CLI->>callees.rs: srcwalk trace callees fn --detailed
callees.rs->>direct_call.rs: build_direct_call_evidence_index(filtered_sites)
direct_call.rs-->>callees.rs: DirectCallEvidenceIndex
callees.rs->>callees.rs: edge_for_site / unknown_for_site inline evidence
callees.rs->>callees.rs: append_unresolved_call_site_evidence
Reviews (2): Last reviewed commit: "chore: prepare v1.1.0 release" | Re-trigger Greptile |
Summary
Public boundary
Not included:
Verification
cargo build --release --lockedcargo test --lockedcargo clippy --locked -- -D warningscargo fmt --checkcargo test --locked --test windows_pathsgit diff --checkWindows CI runs fmt, clippy, and the full locked test suite, including the new integration coverage.