meshlet_page: ask report_paths for the report-path guard (MESHLET-PAGE-SHARED-REPORT-PATH) #1431

Open
github-bot wants to merge 2 commits from github-bot/gh-1431 into main AGit
Owner

@⁠Dashhhhhhhh on GitHub · 2026-11-25 00:07 UTC · original
Dashhhhhhhh:fix/meshlet-page-report-path → main · +52 −12 · 2 files · 2 commits · open

Claimed in the coordination issue as: MESHLET-PAGE-SHARED-REPORT-PATH

What and why

tools/meshlet_page.py compared report paths with os.path.normcase, which does not fold case on macOS, and os.path.samefile, which cannot see a file that has not been created. --json CARVE/index.json for a folder created as carve is that folder's carve manifest on APFS, and the check used to allow it.

The tool now uses tools/report_paths.py.

Tested

python -I tests/test_meshlet_page.py CliTests (14 tests) on macOS APFS. The new test refuses CARVE/index.json for a folder created as carve. 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:07 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1431) `Dashhhhhhhh:fix/meshlet-page-report-path` → `main` · +52 −12 · 2 files · 2 commits · open Claimed in the coordination issue as: MESHLET-PAGE-SHARED-REPORT-PATH ### What and why `tools/meshlet_page.py` compared report paths with `os.path.normcase`, which does not fold case on macOS, and `os.path.samefile`, which cannot see a file that has not been created. `--json CARVE/index.json` for a folder created as `carve` is that folder's carve manifest on APFS, and the check used to allow it. The tool now uses `tools/report_paths.py`. ### Tested `python -I tests/test_meshlet_page.py CliTests` (14 tests) on macOS APFS. The new test refuses `CARVE/index.json` for a folder created as `carve`. 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)
On a case-insensitive volume, normcase left carve/index.json and CARVE/index.json as two paths, so --json could write the carve manifest. The shared report-path check refuses that spelling.

Co-authored-by: Cursor <[email protected]>
The manifest check folded case, but a page.bin inside the folder was still compared with normcase(abspath()), which keeps the typed case on macOS. CARVE/0000.bin could replace carve/0000.bin.

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

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

Reviewed ba4e7ef65: meshlet_page.py's --json guard now uses report_paths (same_report_path and path_key). Ran in a sandbox on the branch and on origin/main with the new tests copied in: tests/test_meshlet_page.py (73 OK, 2 skipped on this case-sensitive volume), tests/test_report_paths.py (22 OK), tests/test_report_path_case.py (4 OK, 1 skipped), and compileall clean; tests/test_tool_stdout_encoding.py passes on the branch (fails on current origin/main only over tools/compute_heap_layout_census.py, added after the fork). Under the MacVolumeTests folded-volume patch, main accepts --json CARVE/index.json (rc=0, creates the manifest) where the branch refuses it (rc=2) and refuses CARVE/0000.bin upfront at the guard; existing CARVE/index.json refuses at the guard via samefile on both, while existing valid CARVE/0000.bin refuses via walk-time samefile on main (so the second new test also passes there as a regression lock). AI-assisted review.
Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 14:24 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1431#issuecomment-7165225329) Reviewed ba4e7ef65: `meshlet_page.py`'s `--json` guard now uses `report_paths` (`same_report_path` and `path_key`). Ran in a sandbox on the branch and on `origin/main` with the new tests copied in: `tests/test_meshlet_page.py` (73 OK, 2 skipped on this case-sensitive volume), `tests/test_report_paths.py` (22 OK), `tests/test_report_path_case.py` (4 OK, 1 skipped), and `compileall` clean; `tests/test_tool_stdout_encoding.py` passes on the branch (fails on current `origin/main` only over `tools/compute_heap_layout_census.py`, added after the fork). Under the `MacVolumeTests` folded-volume patch, `main` accepts `--json CARVE/index.json` (`rc=0`, creates the manifest) where the branch refuses it (`rc=2`) and refuses `CARVE/0000.bin` upfront at the guard; existing `CARVE/index.json` refuses at the guard via `samefile` on both, while existing valid `CARVE/0000.bin` refuses via walk-time `samefile` on `main` (so the second new test also passes there as a regression lock). 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/1431/head:github-bot/gh-1431'
git switch 'github-bot/gh-1431'

Merge

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