pub fn hover_cutover<Q>(
legacy_hover_text: Option<String>,
semantic_queries: &Q,
symbol: &str,
file_id: FileId,
byte_offset: u32,
scope_id: Option<ScopeId>,
) -> HoverCutoverOutcomewhere
Q: SemanticQueries,Expand description
Run hover with the semantic path as primary, falling back to legacy when the semantic result is unavailable.
§Decision logic
- Call
SemanticQueries::symbol_atfor the entity at the hover position. - Call
SemanticQueries::visible_symbols_atfor origin metadata. - Classify the result:
- Exact: entity found with high/medium confidence → explain symbol.
- DynamicBoundary: entity has dynamic-boundary provenance → explain boundary.
- Ambiguous: multiple visible symbols match → explain ambiguity.
- Unavailable: no entity found → fall back to legacy hover text.
- Emit a shadow-compare receipt regardless of outcome.