Просмотр исходного кода

fix(packaging): keep both git SHA map names in review-compact

Do not content-dedup meta/git source-file-sha256.json against the legacy
file-sha256.json alias so the finalize layout stays physically present.

Co-authored-by: Cursor <cursoragent@cursor.com>
root 3 месяцев назад
Родитель
Сommit
486a2ce803
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      package_for_agent_analysis.py

+ 5 - 1
package_for_agent_analysis.py

@@ -1826,7 +1826,11 @@ def _should_content_dedup(size: int, relative: str) -> bool:
         stripped = relative[len("source/") :]
     if stripped in _SOFTWARE_MIRROR_UNDER_SOURCE:
         return False
-    name = _path_basename(relative)
+    # Finalize layout requires both canonical and legacy git SHA maps as physical members.
+    base = _path_basename(relative)
+    if base in {"source-file-sha256.json", "file-sha256.json"} and "/meta/git/" in f"/{lower}":
+        return False
+    name = base
     if name in DERIVED_BOARD_VIEWER_ASSETS or name.endswith((".brd", ".pdf")):
         return True
     if evidence_canon.is_compact_allowlisted(relative):