manifest: exclude a manifest spelled with another case (MANIFEST-WALK-CASE-EXCLUDE) #1441

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

@⁠Dashhhhhhhh on GitHub · 2026-11-25 00:18 UTC · original
Dashhhhhhhh:fix/manifest-walk-case-exclude → main · +63 −15 · 2 files · 1 commits · open

Claimed in the coordination issue as: MANIFEST-WALK-CASE-EXCLUDE

What and why

tools/manifest.py walk() decided the manifest was outside the game folder by comparing os.path.normcase(os.path.realpath()). That keeps the case you typed on macOS. A folder created as Game and --out game/MANIFEST.json are one file on APFS, so the next create treated the manifest as an input and refused to replace it, and verify listed it as NEW and then printed OK.

The scan now compares report_paths.path_key, which folds case on a volume that ignores it. Recreating a real manifest under the other spelling works. A hashed file under the other spelling is still refused, and a hard link to a hashed file is still refused. manifest_verifier.py has the same exclude key; pull requests #344 and #899 already edit that file, so this change leaves it alone.

Tested

python -I tests/test_manifest.py (42 tests) and python -I tests/test_report_paths.py (22 tests), on macOS APFS. The new tests exclude PKG/Manifest.json from a folder created as pkg, recreate that manifest, and refuse PKG/ROOT.DAT. 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:18 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1441) `Dashhhhhhhh:fix/manifest-walk-case-exclude` → `main` · +63 −15 · 2 files · 1 commits · open Claimed in the coordination issue as: MANIFEST-WALK-CASE-EXCLUDE ### What and why `tools/manifest.py` `walk()` decided the manifest was outside the game folder by comparing `os.path.normcase(os.path.realpath())`. That keeps the case you typed on macOS. A folder created as `Game` and `--out game/MANIFEST.json` are one file on APFS, so the next `create` treated the manifest as an input and refused to replace it, and `verify` listed it as `NEW` and then printed `OK`. The scan now compares `report_paths.path_key`, which folds case on a volume that ignores it. Recreating a real manifest under the other spelling works. A hashed file under the other spelling is still refused, and a hard link to a hashed file is still refused. `manifest_verifier.py` has the same exclude key; pull requests #344 and #899 already edit that file, so this change leaves it alone. ### Tested `python -I tests/test_manifest.py` (42 tests) and `python -I tests/test_report_paths.py` (22 tests), on macOS APFS. The new tests exclude `PKG/Manifest.json` from a folder created as `pkg`, recreate that manifest, and refuse `PKG/ROOT.DAT`. 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(realpath()) kept Game and game apart on macOS, so the next create treated the manifest as an input and verify listed it as new. The scan now uses the shared path key, which folds that case, and a hashed file under the other spelling is still refused.

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

@⁠tiguan26 on GitHub · 2026-11-25 03:54 UTC · original · approved these changes

Approving. Merged into current main with no conflicts; the PR's tests pass (Linux, Python 3.13). Comparing through path_key folds case on a case-insensitive volume, where normcase(realpath()) keeps the typed case on macOS, so Game/manifest.json and game/manifest.json are now the same file for --exclude and for the output-inside-game-folder check.

AI-assisted (Claude).

**@⁠tiguan26** on GitHub · 2026-11-25 03:54 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1441#pullrequestreview-6051631876) · **approved these changes** Approving. Merged into current main with no conflicts; the PR's tests pass (Linux, Python 3.13). Comparing through path_key folds case on a case-insensitive volume, where normcase(realpath()) keeps the typed case on macOS, so Game/manifest.json and game/manifest.json are now the same file for --exclude and for the output-inside-game-folder check. AI-assisted (Claude).
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/1441/head:github-bot/gh-1441'
git switch 'github-bot/gh-1441'

Merge

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