Skip to main content

partition_by_alias

Function partition_by_alias 

Source
pub fn partition_by_alias<'e>(
    graph: &GraphynGraph,
    edges: &'e [QueryEdge],
) -> (Vec<&'e QueryEdge>, Vec<&'e QueryEdge>)
Expand description

Split edges into those that reach the symbol under its own name and those that rename it.

The distinction drives the “HIGH RISK” labelling in both the CLI and the MCP server: a caller that imports UserPayload as ResponseModel will not turn up in a text search for the original name, which is exactly the case Graphyn exists to surface.

An alias equal to the symbol’s own name is not a rename. Adapters record the local name on type-reference edges whether or not it differs, so testing alias.is_some() alone flagged ordinary same-name references as high risk and buried the genuine renames among them.