world_drawable_verify: one archive under another case is the same source (WORLD-DRAWABLE-VERIFY-CASE-ARCHIVE) #1453

Open
github-bot wants to merge 1 commit from github-bot/gh-1453 into main AGit
Owner

@⁠Dashhhhhhhh on GitHub · 2026-11-25 00:31 UTC · original
Dashhhhhhhh:fix/world-drawable-verify-case-archive → main · +27 −2 · 3 files · 1 commits · open

Claimed in the coordination issue as: WORLD-DRAWABLE-VERIFY-CASE-ARCHIVE

What and why

tools/world_drawable_verify.py archive_path compared source archives with os.path.normcase(os.path.abspath()). On macOS that keeps the case you typed, and os.path.samefile cannot see a file that has not been created. Two reports of Game/missing.rpf and game/missing.rpf were rejected as different archives.

The key now uses report_paths.path_key. A hard link or symlink to an existing archive is still accepted, and a distinct file with the same bytes is still rejected.

Tested

python -I tests/test_world_drawable_verify_archive_aliases.py (7 tests) and python -I tests/test_world_drawable_verify.py (10 tests) on macOS APFS. The new test accepts two spellings of one archive that has not been created. No game files.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
  • A new translator rule is in the contract table of docs/design.md (not a translator change).

Made with Cursor

**@⁠Dashhhhhhhh** on GitHub · 2026-11-25 00:31 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1453) `Dashhhhhhhh:fix/world-drawable-verify-case-archive` → `main` · +27 −2 · 3 files · 1 commits · open Claimed in the coordination issue as: WORLD-DRAWABLE-VERIFY-CASE-ARCHIVE ### What and why `tools/world_drawable_verify.py` `archive_path` compared source archives with `os.path.normcase(os.path.abspath())`. On macOS that keeps the case you typed, and `os.path.samefile` cannot see a file that has not been created. Two reports of `Game/missing.rpf` and `game/missing.rpf` were rejected as different archives. The key now uses `report_paths.path_key`. A hard link or symlink to an existing archive is still accepted, and a distinct file with the same bytes is still rejected. ### Tested `python -I tests/test_world_drawable_verify_archive_aliases.py` (7 tests) and `python -I tests/test_world_drawable_verify.py` (10 tests) on macOS APFS. The new test accepts two spellings of one archive that has not been created. No game files. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. - [ ] A new translator rule is in the contract table of `docs/design.md` (not a translator change). Made with [Cursor](https://cursor.com)
normcase(abspath()) kept Game/missing.rpf and game/missing.rpf apart on macOS when neither file existed, so two reports of one archive were rejected. The archive key now uses the shared path key.

Co-authored-by: Cursor <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:51:57 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 15:32 UTC · original

Reviewed 8dd9eb777: ran python3 -I tests/test_world_drawable_verify.py (10 OK on this head and on main; the rewritten 2-item realpath mock into a tolerant fake is behavior-preserving with both tools) and tests/test_world_drawable_verify_archive_aliases.py (6 OK; the new test skips here — this volume keeps case), all on Linux arm64, no GPU or game files. Probed verify() with case_insensitive_volume() patched to its macOS-default answer: main rejects predictions …/Game/missing.rpf against …/game/missing.rpf with "different source archive from predictions" (ValueError); this head confirms them, NFC-vs-NFD accent spellings included. Controls unchanged on both trees: same-case and dotted spellings accepted, genuinely different archives rejected, and on the case-keeping host every probe row is identical between main and this head. Same residue noted on #1452: Linux mounts that fold case (vfat/exFAT/CIFS) stay outside path_key's knowledge — pre-existing, a candidate for the coordination issue.
AI-assisted review.

Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 15:32 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1453#issuecomment-7167013092) Reviewed 8dd9eb777: ran `python3 -I tests/test_world_drawable_verify.py` (10 OK on this head and on main; the rewritten 2-item `realpath` mock into a tolerant fake is behavior-preserving with both tools) and `tests/test_world_drawable_verify_archive_aliases.py` (6 OK; the new test skips here — this volume keeps case), all on Linux arm64, no GPU or game files. Probed `verify()` with `case_insensitive_volume()` patched to its macOS-default answer: main rejects predictions `…/Game/missing.rpf` against `…/game/missing.rpf` with "different source archive from predictions" (ValueError); this head confirms them, NFC-vs-NFD accent spellings included. Controls unchanged on both trees: same-case and dotted spellings accepted, genuinely different archives rejected, and on the case-keeping host every probe row is identical between main and this head. Same residue noted on #1452: Linux mounts that fold case (vfat/exFAT/CIFS) stay outside `path_key`'s knowledge — pre-existing, a candidate for the coordination issue. AI-assisted review. **Recommendation:** Merge
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1453/head:github-bot/gh-1453'
git switch 'github-bot/gh-1453'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1453'
git switch 'github-bot/gh-1453'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1453'
git switch 'github-bot/gh-1453'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1453'
git switch 'main'
git merge --squash 'github-bot/gh-1453'
git switch 'main'
git merge --ff-only 'github-bot/gh-1453'
git switch 'main'
git merge 'github-bot/gh-1453'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.