opus_tags: tag streams when given a single bank directory #2458

Merged
kirigayakazima merged 1 commit from upstream-pr/2458 into main 2026-11-28 15:15:50 +00:00
kirigayakazima commented 2026-11-27 11:09:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-27T11:09:38Z.


Claimed in the coordination issue as: OPUS-TAGS-SINGLE-BANK-ROOT

What and why

When the requested folder was itself an exported bank, root-level Opus files were counted but never looked up. Resolve that folder against the existing bank-label suffix rules, giving the qualified archive path precedence over a shorter matching label. The regression also confirms that the sibling bank stays untouched.

Tested

Windows, Python 3.14.7. The added regression failed on the parent and passed with this change.

  • python -I tests/test_opus_tags.py -k single_bank_root
  • python -I tests/test_opus_tags_dialogue_conflicts.py
  • Changed-path game-data scan and git diff --check passed. Shared main baseline: 6,374 semantic tests passed across 500 files.
  • Full Windows opus_tags suite has one pre-existing path-format assertion failure in test_cli_reports_incomplete_directory_discovery. Confirmed before applying this patch.

GPUs tested: N/A (CPU-only).

AI-assisted: Yes.

Checklist

  • Based on current main and merges cleanly with the tested base.
  • One topic.
  • No game data, keys or decryption.
  • Translator contract table: N/A.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5525619751 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2458). Originally posted by [kirigayakazima](https://github.com/kirigayakazima) on 2026-11-27T11:09:38Z. --- Claimed in the coordination issue as: [OPUS-TAGS-SINGLE-BANK-ROOT](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7216624385) ### What and why When the requested folder was itself an exported bank, root-level Opus files were counted but never looked up. Resolve that folder against the existing bank-label suffix rules, giving the qualified archive path precedence over a shorter matching label. The regression also confirms that the sibling bank stays untouched. ### Tested Windows, Python 3.14.7. The added regression failed on the parent and passed with this change. - `python -I tests/test_opus_tags.py -k single_bank_root` - `python -I tests/test_opus_tags_dialogue_conflicts.py` - Changed-path game-data scan and `git diff --check` passed. Shared main baseline: 6,374 semantic tests passed across 500 files. - Full Windows opus_tags suite has one pre-existing path-format assertion failure in test_cli_reports_incomplete_directory_discovery. Confirmed before applying this patch. GPUs tested: N/A (CPU-only). AI-assisted: Yes. ### Checklist - [x] Based on current main and merges cleanly with the tested base. - [x] One topic. - [x] No game data, keys or decryption. - Translator contract table: N/A.
MSedgeMC commented 2026-11-27 14:50:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MSedgeMC on 2026-11-27T14:50:54Z.

Review: COMMENTED


Verified on the PR branch: python3 -m unittest tests.test_opus_tags -v -> 29 tests OK, including the new single-bank-root qualified-label case. Not approving yet: the branch is 613 commits behind current main and also overlaps tests/test_opus_tags.py with PR #2459, so a rebase is needed before reviewing the final diff. Please rebase onto main and re-run the suite.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6089910995 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2458#pullrequestreview-6089910995). Originally posted by [MSedgeMC](https://github.com/MSedgeMC) on 2026-11-27T14:50:54Z. **Review:** COMMENTED --- Verified on the PR branch: python3 -m unittest tests.test_opus_tags -v -> 29 tests OK, including the new single-bank-root qualified-label case. Not approving yet: the branch is 613 commits behind current main and also overlaps tests/test_opus_tags.py with PR #2459, so a rebase is needed before reviewing the final diff. Please rebase onto main and re-run the suite.
zmasi commented 2026-11-28 06:36:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T06:36:10Z.


#2458 | head 2492874a77 (merged cleanly with main 6dfca6428) | python -I tests/test_opus_tags.py | red on main: -k test_single_bank_root_uses_qualified_label FAILED (failures=1: 0 != 1) | green on PR+main: Ran 29 tests, OK | Windows 11, Python 3.12.10 | AI-assisted: yes

Diff reviewed across both touched files (git merge origin/main at 6dfca6428 applies cleanly, and merging #2459 + #2458 together onto main 6dfca6428 also auto-merges both tools/opus_tags.py and tests/test_opus_tags.py with 0 conflicts and passes 30/30 tests). Also verified on merged PR+main: test_opus_tags_dialogue_conflicts.py (6/6 OK), test_runner_calls_all_tests.py (3/3 OK), test_text_write_line_endings.py (3/3 OK), compileall, git diff --check, and scripts/check_no_game_data.py (clean).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7235401215 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2458#issuecomment-7235401215). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T06:36:10Z. --- #2458 | head 2492874a77c446ad97eb880dd4064e84950b7f54 (merged cleanly with main 6dfca6428) | `python -I tests/test_opus_tags.py` | red on main: `-k test_single_bank_root_uses_qualified_label` FAILED (failures=1: `0 != 1`) | green on PR+main: Ran 29 tests, OK | Windows 11, Python 3.12.10 | AI-assisted: yes Diff reviewed across both touched files (`git merge origin/main` at `6dfca6428` applies cleanly, and merging `#2459` + `#2458` together onto `main` `6dfca6428` also auto-merges both `tools/opus_tags.py` and `tests/test_opus_tags.py` with `0` conflicts and passes 30/30 tests). Also verified on merged `PR+main`: `test_opus_tags_dialogue_conflicts.py` (6/6 OK), `test_runner_calls_all_tests.py` (3/3 OK), `test_text_write_line_endings.py` (3/3 OK), `compileall`, `git diff --check`, and `scripts/check_no_game_data.py` (clean).
MoonEyes commented 2026-11-28 15:15:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T15:15:42Z.


Red/green: classified READY by oreo-lot1 (red on main, green on head merged with main); head 2492874a77 unchanged since 2026-11-27, before that run.
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main d48a957bb in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7241329718 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2458#issuecomment-7241329718). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T15:15:42Z. --- Red/green: classified READY by oreo-lot1 (red on main, green on head merged with main); head 2492874a77c4 unchanged since 2026-11-27, before that run. Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main d48a957bb in GitHub Actions: no new failure. AI-assisted (Claude Code, Claude Opus 5.5)
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!2458
No description provided.