navmesh_decode: ask report_paths for the report-path guard (NAVMESH-DECODE-SHARED-REPORT-PATH) #1243

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

@⁠breachato on GitHub · 2026-11-24 20:44 UTC · original
breachato:navmesh-decode-shared-report-path → main · +1 −37 · 1 files · 1 commits · open

Claimed in the coordination issue as: NAVMESH-DECODE-SHARED-REPORT-PATH (#14)

Depends on: none

Fixes: none

What and why

tools/navmesh_decode.py carried a full private copy of tools/report_paths.py (:1049-1081): _PC_CASE_SENSITIVE,
_case_insensitive_volume (the macOS pathconf probe), _path_key (realpath + normcase + NFD casefold) and its own
same_report_path, all used by the four output guards at :1101 (--csv against --out), :1108 (the input),
:1112 (the carve folder's index.json) and :1115 (each carved entry). CONTRIBUTING.md asks a report writer to
call report_paths.same_report_path instead of deriving the answer again.

The copy was also missing the part the shared helper has and it does not: the folding-volume probe
(same_name_on_folding_volume). Its macOS probe answers only on APFS/HFS+ and normcase folds only on Windows, so
on a Linux mount that ignores case (vfat, exFAT, CIFS) --out R.json and --csv r.json passed as two report paths
and the second replaced the first.

The four private helpers and the now-unused unicodedata import go (1 insertion, 37 deletions). The module keeps
the name same_report_path because tests/test_report_path_case.py resolves navmesh_decode.same_report_path; it is
now the imported function. Different topic from NAVMESH-JOAAT-LATIN1 (joaat_cs encoding). No behaviour change on
Windows, macOS or a case-sensitive Linux filesystem.

Tested

  • tests/test_navmesh_decode.py and tests/test_report_path_case.py: 20 passed, 1 skipped, 15 subtests passed.
  • python -I tools/navmesh_decode.py --help: prints its usage (the import works under -I).
  • python -m compileall -q tools/navmesh_decode.py: clean.
  • Not tested: the folding-volume case this fixes, which needs a case-folding mount (vfat/exFAT/CIFS); this
    machine is NTFS, where normcase already folds case. tests/test_report_paths.py covers the helper's own
    folding-volume answer.
  • No game files, no GPU; nothing was built.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)
**@⁠breachato** on GitHub · 2026-11-24 20:44 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1243) `breachato:navmesh-decode-shared-report-path` → `main` · +1 −37 · 1 files · 1 commits · open Claimed in the coordination issue as: NAVMESH-DECODE-SHARED-REPORT-PATH (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) Depends on: none Fixes: none ### What and why `tools/navmesh_decode.py` carried a full private copy of `tools/report_paths.py` (`:1049-1081`): `_PC_CASE_SENSITIVE`, `_case_insensitive_volume` (the macOS `pathconf` probe), `_path_key` (realpath + normcase + NFD casefold) and its own `same_report_path`, all used by the four output guards at `:1101` (`--csv` against `--out`), `:1108` (the input), `:1112` (the carve folder's `index.json`) and `:1115` (each carved entry). CONTRIBUTING.md asks a report writer to call `report_paths.same_report_path` instead of deriving the answer again. The copy was also missing the part the shared helper has and it does not: the folding-volume probe (`same_name_on_folding_volume`). Its macOS probe answers only on APFS/HFS+ and `normcase` folds only on Windows, so on a Linux mount that ignores case (vfat, exFAT, CIFS) `--out R.json` and `--csv r.json` passed as two report paths and the second replaced the first. The four private helpers and the now-unused `unicodedata` import go (1 insertion, 37 deletions). The module keeps the name `same_report_path` because `tests/test_report_path_case.py` resolves `navmesh_decode.same_report_path`; it is now the imported function. Different topic from NAVMESH-JOAAT-LATIN1 (`joaat_cs` encoding). No behaviour change on Windows, macOS or a case-sensitive Linux filesystem. ### Tested - `tests/test_navmesh_decode.py` and `tests/test_report_path_case.py`: **20 passed, 1 skipped**, 15 subtests passed. - `python -I tools/navmesh_decode.py --help`: prints its usage (the import works under `-I`). - `python -m compileall -q tools/navmesh_decode.py`: clean. - **Not tested:** the folding-volume case this fixes, which needs a case-folding mount (vfat/exFAT/CIFS); this machine is NTFS, where `normcase` already folds case. `tests/test_report_paths.py` covers the helper's own folding-volume answer. - No game files, no GPU; nothing was built. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:44:15 +00:00
Author
Owner

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

Reviewed 9ba1fa9: navmesh_decode now imports same_report_path from tools/report_paths.py instead of its own copy. Ran in the sandbox on this branch and on main: tests/test_navmesh_decode.py (17 OK), tests/test_report_paths.py (22 OK), tests/test_report_path_case.py (4 OK, 1 skipped), compileall, --help clean. A 14-case probe (hard link, symlinks, dangling symlink vs target, case and NFD-accent twins, relative and missing paths) is verdict-identical to the old guard on a case-sensitive volume; on folding volumes it now also refuses a case-twin, which is the point. No finding. Suggestion: drop navmesh_decode from LEGACY_COPIES in tests/test_report_paths.py and add it to SHARED so the import stays enforced; tests pass unchanged either way.

AI-assisted review.

Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 09:25 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1243#issuecomment-7158318214) Reviewed 9ba1fa9: navmesh_decode now imports `same_report_path` from tools/report_paths.py instead of its own copy. Ran in the sandbox on this branch and on main: tests/test_navmesh_decode.py (17 OK), tests/test_report_paths.py (22 OK), tests/test_report_path_case.py (4 OK, 1 skipped), compileall, `--help` clean. A 14-case probe (hard link, symlinks, dangling symlink vs target, case and NFD-accent twins, relative and missing paths) is verdict-identical to the old guard on a case-sensitive volume; on folding volumes it now also refuses a case-twin, which is the point. No finding. Suggestion: drop navmesh_decode from LEGACY_COPIES in tests/test_report_paths.py and add it to SHARED so the import stays enforced; tests pass unchanged either way. 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/1243/head:github-bot/gh-1243'
git switch 'github-bot/gh-1243'

Merge

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