Expand description
Semantic diff implementation for super::ComparativeQueryDb.
Ported from sqry-mcp::execution::diff_comparator (which in turn adapted
sqry-core::graph::diff::GraphComparator) as part of Phase 3C / DB20. The
MCP copy diverged from sqry-core’s in three ways, all of which are
preserved here so the MCP wire format is byte-for-byte stable:
- Qualified names are formatted through
sqry_core::graph::unified::resolution::display_graph_qualified_namewhen a known language is associated with the source file. This lets per-language plugins override the stored qualified name (e.g. Swift insertingType.foris_staticmembers). - The
is_staticflag is threaded through the comparator so the above display logic receives the same information the graph node stored. - Line numbers / columns / paths are reported as plain fields on
NodeLocation; the MCP handler wraps them in its transport DTO (NodeRefData+fileUri) so the wire format is owned by MCP.
Rename detection heuristics (Levenshtein over signatures weighted 70%,
location proximity weighted 30%, 90% confidence threshold) match the
previous MCP GraphComparator bit-for-bit.
Structs§
- Diff
Options - Options controlling the diff computation.
- Diff
Output - Output of
compute_diff/super::ComparativeQueryDb::diff. - Diff
Summary - Summary counts for a diff.
- Node
Change - A single change record.
- Node
Location - Location of a single changed node, reported in sqry-db-owned terms.
Enums§
- Change
Type - Kind of change detected between the two snapshots.
Functions§
- compute_
diff - Entry point: computes the semantic diff between
oldandnew.