feat: backfill_history_from_snapshots — infer full op history from snapshot diffs
For commits never covered by structured_delta, diffs adjacent snapshot manifests to reconstruct insert/replace/delete/move ops for every file.
Algorithm: - Walk all commits oldest-first - Diff child manifest vs parent manifest (or empty for genesis) - Unambiguous rename: one removed + one added path share same object_id → move - Ambiguous (multiple candidates): fall back to insert + delete - Skip (repo_id, address, commit_id) pairs already in history table - Mark inferred entries: op_payload.inferred_from = 'snapshot_diff'
This recovers symbol history for files that predate structured_delta indexing (e.g. static/js/app.ts before the src/ts migration).
Tests (12 in TestBackfillHistoryFromSnapshots): genesis_all_inserts, new_file_is_insert, changed_content_is_replace, removed_file_is_delete, unambiguous_rename_is_move, ambiguous_rename_falls_back, skips_existing_entries, unchanged_files_no_entries, dry_run, idempotent, repo_id_filter, inferred_op_payload_marks_source
0 comments
muse hub commit comment sha256:661a8359960bf93cb7bff10f15c16f8df25f666114518c982ca9ec2cb9c2099a --body "your comment"
No comments yet. Be the first to start the discussion.