From d2a04f89934fbca6bc90cf37ac1fc6f4438bf110 Mon Sep 17 00:00:00 2001 From: Will Miao Date: Wed, 27 May 2026 19:38:08 +0800 Subject: [PATCH] fix(model-hash-index): clean up AutoV2 entry in remove_by_hash --- py/services/model_hash_index.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/py/services/model_hash_index.py b/py/services/model_hash_index.py index 20035198..2b890e29 100644 --- a/py/services/model_hash_index.py +++ b/py/services/model_hash_index.py @@ -186,6 +186,10 @@ class ModelHashIndex: # Remove hash-to-path mapping del self._hash_to_path[sha256] + autov2_key = sha256[:10] + if autov2_key in self._autov2_to_path: + del self._autov2_to_path[autov2_key] + # Update filename-to-hash and duplicate filenames for all paths for path_to_remove in paths_to_remove: fname = self._get_filename_from_path(path_to_remove)