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

Merged
Dashhhhhhhh merged 1 commit from upstream-pr/1453 into main 2026-11-29 18:28:00 +00:00
Dashhhhhhhh commented 2026-11-25 00:31:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Dashhhhhhhh on 2026-11-25T00:31:04Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5482765921 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1453). Originally posted by [Dashhhhhhhh](https://github.com/Dashhhhhhhh) on 2026-11-25T00:31:04Z. --- 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)
PierreEbele commented 2026-11-25 15:32:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T15:32:54Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7167013092 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1453#issuecomment-7167013092). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-25T15:32:54Z. --- 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
OreoFR commented 2026-11-28 21:51:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:51:18Z.


Verified by OreoFR

  • Base: main 3408969a7 + PR head 8dd9eb777
  • Test: python -I tests/test_world_drawable_verify.py tests/test_world_drawable_verify_archive_aliases.py
  • Red on main: 10 + 7 OK (1 skip each)
  • Green with the PR: same
  • Verdict: NO RED
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246321950 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1453#issuecomment-7246321950). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T21:51:18Z. --- **Verified by OreoFR** - Base: main `3408969a7` + PR head `8dd9eb777` - Test: `python -I tests/test_world_drawable_verify.py tests/test_world_drawable_verify_archive_aliases.py` - Red on main: 10 + 7 OK (1 skip each) - Green with the PR: same - Verdict: NO RED - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
zmasi commented 2026-11-29 00:55:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T00:55:30Z.


#1453 | head 8dd9eb777c (merged cleanly onto origin/main a3484ceebc) | Windows 11 (10.0.26200.9974, NTFS), Python 3.12.10 | AI-assisted: yes

Independent Verification (Windows 11 + NTFS)

  • Diff & safety audit: Inspected 100% of the diff across tools/world_drawable_verify.py, tests/test_world_drawable_verify.py, and tests/test_world_drawable_verify_archive_aliases.py switching archive_path to report_paths.path_key(value). python -I scripts/check_no_game_data.py tools/world_drawable_verify.py tests/test_world_drawable_verify.py tests/test_world_drawable_verify_archive_aliases.py passed (rc=0).
  • Native Windows 11 NTFS execution:
    • python -I tests/test_world_drawable_verify.py -> 10 ran, OK (skipped=1)
    • python -I tests/test_world_drawable_verify_archive_aliases.py -> 7 ran, OK (skipped=1), executing test_another_case_of_one_missing_archive_is_the_same_source (Game\missing.rpf vs game\missing.rpf on a real case-insensitive NTFS volume; only the separate POSIX symlink alias test skips when unprivileged symlinks are unavailable).
    • Live NTFS directory junction + case-alias probe: Created Game and an NTFS directory junction mklink /J GameJunc Game, confirming archive_path("...\\Game\\missing.rpf") == archive_path("...\\GameJunc\\MISSING.RPF") before missing.rpf exists on disk.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248444695 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1453#issuecomment-7248444695). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T00:55:30Z. --- #1453 | head 8dd9eb777c4b1c22d20e66c74ba94c7113da9fda (merged cleanly onto origin/main a3484ceebc) | Windows 11 (10.0.26200.9974, NTFS), Python 3.12.10 | AI-assisted: yes ### Independent Verification (Windows 11 + NTFS) - **Diff & safety audit**: Inspected 100% of the diff across `tools/world_drawable_verify.py`, `tests/test_world_drawable_verify.py`, and `tests/test_world_drawable_verify_archive_aliases.py` switching `archive_path` to `report_paths.path_key(value)`. `python -I scripts/check_no_game_data.py tools/world_drawable_verify.py tests/test_world_drawable_verify.py tests/test_world_drawable_verify_archive_aliases.py` passed (`rc=0`). - **Native Windows 11 NTFS execution**: - `python -I tests/test_world_drawable_verify.py` -> `10 ran, OK (skipped=1)` - `python -I tests/test_world_drawable_verify_archive_aliases.py` -> `7 ran, OK (skipped=1)`, executing `test_another_case_of_one_missing_archive_is_the_same_source` (`Game\missing.rpf` vs `game\missing.rpf` on a real case-insensitive NTFS volume; only the separate POSIX symlink alias test skips when unprivileged symlinks are unavailable). - **Live NTFS directory junction + case-alias probe**: Created `Game` and an NTFS directory junction `mklink /J GameJunc Game`, confirming `archive_path("...\\Game\\missing.rpf") == archive_path("...\\GameJunc\\MISSING.RPF")` before `missing.rpf` exists on disk.
TheGeogeo commented 2026-11-29 14:18:23 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T14:18:23Z.


Ready for testing: merges cleanly with main 3535eb5c4. Not in main yet: git cherry finds 1 commit(s) not there, and 1 of the 14 lines it adds are already present. No duplicate found: its claim WORLD-DRAWABLE-VERIFY-CASE-ARCHIVE appears in no other open pull request and in no main commit.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257200148 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1453#issuecomment-7257200148). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T14:18:23Z. --- Ready for testing: merges cleanly with `main` `3535eb5c4`. Not in `main` yet: `git cherry` finds 1 commit(s) not there, and 1 of the 14 lines it adds are already present. No duplicate found: its claim `WORLD-DRAWABLE-VERIFY-CASE-ARCHIVE` appears in no other open pull request and in no `main` commit. AI-assisted (Claude Code).
enlight3d commented 2026-11-29 15:28:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T15:28:55Z.


RUN comment, PR #1453 (world_drawable_verify: one archive under another case is the same source)

Heads: PR 8dd9eb777, main 91bab934d (local merge of the PR into it, not pushed).
Kind: Python (tools/world_drawable_verify.py) + 2 test files.

Commands (repo root):
python -I tests/test_world_drawable_verify.py
python -I tests/test_world_drawable_verify_archive_aliases.py

RED: not reachable on Windows. With tools/world_drawable_verify.py put back to the merge-base version and the tests kept, both files still pass (10/10 and 7/7). The bug is macOS-specific: os.path.normcase keeps case there, while on Windows it already lowercases, so normcase(abspath()) and path_key() agree and the new test (another_case_of_one_missing_archive_is_the_same_source, a case-insensitive volume is detected, it runs and is not skipped here) is green without the fix. The red needs a case-insensitive volume on macOS.
GREEN at the PR head: test_world_drawable_verify 10/10, test_world_drawable_verify_archive_aliases 7/7.
GREEN merged into main: same two files 10/10 and 7/7.

Machine: Windows 11 Pro, RTX 3090 24 GB, NVIDIA 621.40, Python 3.13.12 (uv build), run with python -I, one process per test file.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7258123072 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1453#issuecomment-7258123072). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T15:28:55Z. --- RUN comment, PR #1453 (world_drawable_verify: one archive under another case is the same source) Heads: PR 8dd9eb777, main 91bab934d (local merge of the PR into it, not pushed). Kind: Python (tools/world_drawable_verify.py) + 2 test files. Commands (repo root): python -I tests/test_world_drawable_verify.py python -I tests/test_world_drawable_verify_archive_aliases.py RED: not reachable on Windows. With tools/world_drawable_verify.py put back to the merge-base version and the tests kept, both files still pass (10/10 and 7/7). The bug is macOS-specific: os.path.normcase keeps case there, while on Windows it already lowercases, so normcase(abspath()) and path_key() agree and the new test (another_case_of_one_missing_archive_is_the_same_source, a case-insensitive volume is detected, it runs and is not skipped here) is green without the fix. The red needs a case-insensitive volume on macOS. GREEN at the PR head: test_world_drawable_verify 10/10, test_world_drawable_verify_archive_aliases 7/7. GREEN merged into main: same two files 10/10 and 7/7. Machine: Windows 11 Pro, RTX 3090 24 GB, NVIDIA 621.40, Python 3.13.12 (uv build), run with `python -I`, one process per test file.
OreoFR commented 2026-11-29 17:11:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T17:11:12Z.


Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main 4364a4fa6, PR head 8dd9eb777 : red 1 error / green 17 OK

  • Merge: clean (git merge-tree). Reviews: none. No game data in the diff. Skipped on the merge: none.
  • (MEASURED n=3) each red failure reruns alone 3/3.
  • Red (main + only this PR's test files): test_world_drawable_verify 10/10 (the PR only adapts the realpath mock there); test_world_drawable_verify_archive_aliases 7 tests, 1 error: test_another_case_of_one_missing_archive_is_the_same_source (ValueError "different source archive").
  • Green (main + git merge --no-ff): 10/10 and 7/7 OK (the new test skips on case-sensitive volumes; it runs here).
  • Neighbours (tests importing report_paths): main 464 passed / 9 skipped, merge 465 / 9, no regression.
  • Diff: archive_path now goes through path_key, which folds case per volume. Correct.

Verdict: READY

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7259491252 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1453#issuecomment-7259491252). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T17:11:12Z. --- Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main 4364a4fa6, PR head 8dd9eb777 : red 1 error / green 17 OK - Merge: clean (`git merge-tree`). Reviews: none. No game data in the diff. Skipped on the merge: none. - (MEASURED n=3) each red failure reruns alone 3/3. - **Red** (main + only this PR's test files): `test_world_drawable_verify` 10/10 (the PR only adapts the `realpath` mock there); `test_world_drawable_verify_archive_aliases` 7 tests, 1 error: `test_another_case_of_one_missing_archive_is_the_same_source` (ValueError "different source archive"). - **Green** (main + `git merge --no-ff`): 10/10 and 7/7 OK (the new test skips on case-sensitive volumes; it runs here). - Neighbours (tests importing `report_paths`): main 464 passed / 9 skipped, merge 465 / 9, no regression. - Diff: `archive_path` now goes through `path_key`, which folds case per volume. Correct. **Verdict: READY** AI-assisted: Claude Code
DadaCap commented 2026-11-29 18:28:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-29T18:28:02Z.


Thank you! Merged into main with a merge commit. It was verified ready on its current head (8dd9eb777) by OreoFR's Mac agent (macOS, red/green on main + PR); see the verification comment above. (AI-assisted, posted for DadaCap.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7260505321 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1453#issuecomment-7260505321). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-29T18:28:02Z. --- Thank you! Merged into `main` with a merge commit. It was verified ready on its current head (8dd9eb777) by OreoFR's Mac agent (macOS, red/green on main + PR); see the verification comment above. (AI-assisted, posted for DadaCap.)
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!1453
No description provided.