[PR #467] [MERGED] opus_tags: reject duplicate CSV headers used for tagging #518

Closed
opened 2026-11-26 20:18:09 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/467
Author: @EdenBendheim
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @QemmHD

Base: main ← Head: ubiq/opus-tags-duplicate-headers


📝 Commits (1)

  • d85e326 opus_tags: reject duplicate CSV headers used for tagging

📊 Changes

3 files changed (+86 additions, -2 deletions)

View changed files

📝 docs/audio.md (+5 -0)
📝 tests/test_opus_tags.py (+68 -1)
📝 tools/opus_tags.py (+13 -1)

📄 Description

Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123319059

What changed

  • tools/opus_tags.py: Validate CSV headers before reading rows in both the names CSV (bank, stream_id, name, source) and dialogue CSV (wave, label, speaker, text_<lang>), preserving required-header and Ogg CRC checks. Duplicate consumed headers exit 2 with a deterministic diagnostic before touching any Ogg file; repeated unused extra columns remain ignored.
  • tests/test_opus_tags.py & docs/audio.md: Synthetic tests covering all consumed columns in both CSVs, UTF-8 BOM, untouched Ogg bytes/mtime on rejection, and extra-column stability, plus updated docs.

Testing & Disclosure

  • AI-assisted: Implemented with Codex (gpt-6.2-sol) and reviewed with Codex (gpt-6.2-astra).
  • Environment: macOS 27.3, Apple M1 Max, Python 3.14.3 (CPU-only, synthetic fixtures, zero game data).
  • Verified on ubiquitarianism/leonida main (8f481cf16): test_opus_tags*.py (34/34), compileall, check_no_game_data.py, LF check — all passed.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/467 **Author:** [@EdenBendheim](https://github.com/EdenBendheim) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@QemmHD](https://github.com/QemmHD) **Base:** `main` ← **Head:** `ubiq/opus-tags-duplicate-headers` --- ### 📝 Commits (1) - [`d85e326`](https://github.com/ubiquitarianism/leonida/commit/d85e326eb74d7d2e56692b030295ab63f034dde0) opus_tags: reject duplicate CSV headers used for tagging ### 📊 Changes **3 files changed** (+86 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/audio.md` (+5 -0) 📝 `tests/test_opus_tags.py` (+68 -1) 📝 `tools/opus_tags.py` (+13 -1) </details> ### 📄 Description Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123319059 ### What changed - **`tools/opus_tags.py`**: Validate CSV headers before reading rows in both the names CSV (`bank`, `stream_id`, `name`, `source`) and dialogue CSV (`wave`, `label`, `speaker`, `text_<lang>`), preserving required-header and Ogg CRC checks. Duplicate consumed headers exit `2` with a deterministic diagnostic before touching any Ogg file; repeated unused extra columns remain ignored. - **`tests/test_opus_tags.py` & `docs/audio.md`**: Synthetic tests covering all consumed columns in both CSVs, UTF-8 BOM, untouched Ogg bytes/mtime on rejection, and extra-column stability, plus updated docs. ### Testing & Disclosure - **AI-assisted:** Implemented with Codex (`gpt-6.2-sol`) and reviewed with Codex (`gpt-6.2-astra`). - **Environment:** macOS 27.3, Apple M1 Max, Python 3.14.3 (CPU-only, synthetic fixtures, zero game data). - **Verified on `ubiquitarianism/leonida` `main` (`8f481cf16`):** `test_opus_tags*.py` (34/34), `compileall`, `check_no_game_data.py`, LF check — all passed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:18:09 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#518
No description provided.