gabriel / muse public
fix patch delta task/blob-rename-detection #1 / 1
AI Agent gabriel · 115 days ago · May 26, 2026 · Diff

fix(delta): detect blob-identical file renames for files with no symbol tree

_detect_file_move_edits only matched renames via symbol tree body_hash overlap — files with no parseable symbols (plain .txt, unknown extensions) fell through to InsertOp + DeleteOp even when content_id was identical.

Strategy 2: after symbol-tree matching, compare raw blob content_ids for remaining unmatched added/removed paths. An exact match (score=1.0) is an unambiguous rename — emits PatchOp(from_address=old_path).

delta_summary now counts renamed files separately from modified files.

sha256:248464b6a2f758985cbef90f864fa62c61842be699d975d6e00b6a9509ef919c sha
+35 ~3 symbols
sha256:f0aa1efe6a90f6092724ba478911cc6c696dee4ec8afa35c4c668e889aed14da snapshot
+35
symbols added
~3
symbols modified
0
dead code introduced
Semantic Changes 38 symbols
~ tests/test_file_rename_detection.py .py 35 symbols added
+ TestBlobIdenticalRename class class TestBlobIdenticalRename L92–204
+ test_child_summary_mentions_from_path method method test_child_summary_mentions_from_path L191–204
+ test_rename_summary_mentions_renamed method method test_rename_summary_mentions_renamed L171–189
+ test_txt_rename_child_ops_empty method method test_txt_rename_child_ops_empty L155–169
+ test_txt_rename_patch_op_has_correct_address method method test_txt_rename_patch_op_has_correct_address L121–136
+ test_txt_rename_patch_op_has_from_address method method test_txt_rename_patch_op_has_from_address L138–153
+ test_txt_rename_produces_patch_op_not_insert_delete method method test_txt_rename_produces_patch_op_not_insert_delete L96–119
+ TestDeltaSummaryForRenames class class TestDeltaSummaryForRenames L423–449
+ test_summary_single_rename method method test_summary_single_rename L426–437
+ test_summary_two_renames method method test_summary_two_renames L439–449
+ TestNotARename class class TestNotARename L268–313
+ test_different_content_not_detected_as_rename method method test_different_content_not_detected_as_rename L272–298
+ test_same_extension_different_content_not_rename method method test_same_extension_different_content_not_rename L300–313
+ TestRenameWithSiblings class class TestRenameWithSiblings L321–415
+ test_rename_ambiguity_resolved_by_content_id method method test_rename_ambiguity_resolved_by_content_id L393–415
+ test_rename_plus_deletion method method test_rename_plus_deletion L348–367
+ test_rename_plus_new_file method method test_rename_plus_new_file L325–346
+ test_two_simultaneous_renames method method test_two_simultaneous_renames L369–391
+ TestSymbolFileRename class class TestSymbolFileRename L212–260
+ test_python_file_rename_from_address_set method method test_python_file_rename_from_address_set L246–260
+ test_python_file_rename_same_content_produces_patch_op method method test_python_file_rename_same_content_produces_patch_op L217–244
+ _init_repo function function _init_repo L48–66
+ _op_addresses function function _op_addresses L83–84
+ _op_types function function _op_types L79–80
+ _snap function function _snap L69–76
+ CodePlugin import import CodePlugin L39–39
+ SnapshotManifest import import SnapshotManifest L38–38
+ annotations import import annotations L28–28
+ blob_id import import blob_id L35–35
+ json import import json L30–30
+ muse_dir import import muse_dir L37–37
+ pathlib import import pathlib L31–31
+ pytest import import pytest L33–33
+ write_object import import write_object L36–36
+ plugin variable variable plugin L41–41
← Older Oldest on task/blob-rename-detection
All commits
Newer → Latest on task/blob-rename-detection

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:248464b6a2f758985cbef90f864fa62c61842be699d975d6e00b6a9509ef919c --body "your comment"