pub fn resolve_entity_fuzzy(
conn: &Connection,
namespace: &str,
name: &str,
auto_fuzzy: bool,
) -> Result<Option<(i64, String, bool)>, AppError>Expand description
Resolve an entity by exact name, then optionally by fuzzy match.
- Exact match always wins.
- When
auto_fuzzyis true and exactly one candidate scores ≥min_score(or the top candidate is ≥ 0.90 and beats the runner-up by ≥ 0.05), that candidate is returned with a stderr warning. - When no auto-resolution is possible, returns
Ok(None)after the caller can surface suggestions viasuggest_entity_names.