Release v2.12.0: Purge pre-existing cold plan .tar.gz bundles from LIVE_REPOS in sync-vps-repos.sh and self-heal legacy .pdf archive members

This commit is contained in:
Hermes Agent committed 2026-12-01 10:42:27 +00:00
1 parent a066a0d03d
commit 14c467fa4f
3 files changed
+23 -2

No files matched your search

@@ -1009,6 +1009,24 @@ def audit_and_fix_multi_compressed_files(
]
except Exception:
bad_members = []
if bad_members and fix and fn in (BUNDLE_FILENAME, INACTIVE_BUNDLE_FILENAME):
# Automatically remediate any legacy .pdf members inside plan archive tarballs (e.g. inside LIVE_REPOS)
with tempfile.TemporaryDirectory() as tmp_repack:
rep_dir = Path(tmp_repack)
with tarfile.open(fp, "r:gz") as tf_in:
for m_in in safe_tar_members(tf_in):
if "/" not in m_in.name and not nested_comp_ext_re.search(m_in.name):
ex_f = tf_in.extractfile(m_in)
if ex_f is not None:
(rep_dir / m_in.name).write_bytes(ex_f.read())
md_files = sorted(p for p in rep_dir.iterdir() if p.is_file())
_pack_deterministic_tar_gz(md_files, fp)
bad_members = []
elif bad_members and fix and fn.startswith("ingglish-isopsephic-exegesis-") and fn.endswith((".tar.gz", ".tar.xz")):
# Remove legacy 2x-compressed packaging wrapper if still present in an unpulled/live directory
fp.unlink()
removed_double_sidecars.append(_norm_ws_path(fp, workspace_root=workspace_root))
bad_members = []
if bad_members:
nested_archive_violations.append(
{