Try an exact move
Create these four files underold/ and new/. Both snapshots contain a utility
module and a pricing module. Only the location of formatPrice changes:
old/src/utils.ts
new/src/utils.ts
old/src/pricing.ts
new/src/pricing.ts
new/src/pricing.ts:
new/src/pricing.ts
edited marker (or JSON modified: true) tells you the destination
differs from the source. Similarity supports this pairing; it does not establish behavioral equivalence. Moving and
renaming the declaration together may leave two unpaired edits instead.
Candidate selection
Only supported insertion/deletion candidates enter this process. It does not bucket every node in every source file, and fingerprint equality still requires verification.Exact matching
Candidates are collected in deterministic input order and bucketed by structure fingerprint. Exact content fingerprints nominate candidates. Full content and topology verification establishes an exact move; collisions never establish identity on their own. Whole files can match identical source contents even when path labels differ. An unlabeled export wrapper can expose its named declaration. Generic syntax fragments and local variables inside named declarations are excluded. Source and destination files must differ, and each action can participate in at most one move.Modified matching
When no exact candidate is found, the correlator compares lowercased token sets with Jaccard similarity:Stable identities
CrossFileMatch contains ActionId { file, action } values referencing the original ordered inputs. Reports use these IDs to remove only the paired human entries. Repeated names or identical bodies do not make unrelated actions interchangeable.
See the correlate reference for Rust types and machine outputs for report schemas.
From matches to reports
The correlator returns
CrossFileMatch records, not replacement actions. The
engine uses those IDs when presenting a human report. Machine consumers keep the
original actions and can inspect crossFileMoves separately. A whole-file match
renders as a file rename; an unlabeled export wrapper can expose its function’s
name for a declaration move.