From 97a1e5fbf522df92afef4c1f83bcd3b85d60a8c2 Mon Sep 17 00:00:00 2001 From: byrongamatos Date: Tue, 16 Jun 2026 21:19:16 +0200 Subject: [PATCH] Fix two regressions in the terminology purge - diagnostics_redact: keep '.psarc' in the song-filename scrub regex. The purge swapped it for '.archive' (not a real extension), which would leak real .psarc filenames still on users' disks into diagnostic bundles. This is a redaction allow-list, not brand text. - sloppak: the legacy lyrics-source alias was a no-op ({"notechart": "notechart"}), so old manifests with lyrics_source=="sng" fell back to "xml" instead of migrating. Map {"sng": "notechart"} so the rename stays back-compatible. Co-Authored-By: Claude Opus 4.8 (1M context) --- lib/diagnostics_redact.py | 2 +- lib/sloppak.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/diagnostics_redact.py b/lib/diagnostics_redact.py index d138707..351e4d2 100644 --- a/lib/diagnostics_redact.py +++ b/lib/diagnostics_redact.py @@ -34,7 +34,7 @@ _QSTRING_SECRET_RE = re.compile( r"(?i)\b(api[_-]?key|key|token|secret|password|pwd|auth)=([^\s&\"']+)" ) _SONG_FILENAME_RE = re.compile( - r"\b[\w()'\-+&,.!?\[\]]+\.(?:archive|sloppak|wem|ogg|mp3|wav)\b", + r"\b[\w()'\-+&,.!?\[\]]+\.(?:psarc|sloppak|wem|ogg|mp3|wav)\b", re.IGNORECASE, ) diff --git a/lib/sloppak.py b/lib/sloppak.py index 247e511..0919fac 100644 --- a/lib/sloppak.py +++ b/lib/sloppak.py @@ -539,7 +539,7 @@ def load_song( _ALLOWED_LYRICS_SOURCES = {"xml", "notechart", "whisperx", "user"} # Legacy alias: older manifests labelled note-chart-derived # lyrics with the source format's name; normalise it. - _LYRICS_SOURCE_ALIASES = {"notechart": "notechart"} + _LYRICS_SOURCE_ALIASES = {"sng": "notechart"} raw_source = manifest.get("lyrics_source") if isinstance(raw_source, str): raw_source = _LYRICS_SOURCE_ALIASES.get(raw_source, raw_source)