fix: detect file-level move+edit as a single PatchOp
When a file is renamed *and* its content changes simultaneously, the diff engine previously emitted a disconnected all-delete PatchOp for the old path and an all-insert PatchOp for the new path — losing the relationship between them entirely.
The fix adds `_detect_file_move_edits` in `symbol_diff.py` which scores (removed_path, added_path) pairs by body_hash overlap and greedily collapses those with ≥50% overlap into a single `PatchOp` carrying `from_address` (old path) and `address` (new path), with `child_ops` being the actual symbol diff between the two trees.
`PatchOp` in `domain.py` gains `from_address: NotRequired[DomainAddress]` to carry this metadata cleanly without a new op type.
`diff.py` detects `from_address` and renders the file header in cyan as `R old_path → new_path`, matching the existing colour semantics (cyan = same content, different location — now extended to same-origin, different content+location).
Three regression tests in `TestFileMoveAndEdit` cover: collapse to single PatchOp, correct child op types, and no false positives for unrelated files.
No comments yet. Be the first to start the discussion.