bink_index: ask report_paths for the report-path guard (BINK-INDEX-SHARED-REPORT-PATH) #1430

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

@⁠Dashhhhhhhh on GitHub · 2026-11-25 00:07 UTC · original
Dashhhhhhhh:fix/bink-index-report-path → main · +22 −10 · 2 files · 1 commits · open

Claimed in the coordination issue as: BINK-INDEX-SHARED-REPORT-PATH

What and why

tools/bink_index.py compared report paths with os.path.normcase. That folds case on Windows and leaves it alone on macOS, and os.path.samefile only answers when both paths already exist. A carve folder named Movies and --out movies/index.json are one file on APFS, and the manifest does not exist yet, so the check let --out write <target>/index.json.

The tool now uses tools/report_paths.py. bink_names.py calls the same function, so it gets the same answer.

Tested

python -I tests/test_bink_index.py (35 tests) and python -I tests/test_bink_names.py (36 tests), on macOS APFS. The new test refuses movies/index.json for a folder created as Movies. 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/1430) `Dashhhhhhhh:fix/bink-index-report-path` → `main` · +22 −10 · 2 files · 1 commits · open Claimed in the coordination issue as: BINK-INDEX-SHARED-REPORT-PATH ### What and why `tools/bink_index.py` compared report paths with `os.path.normcase`. That folds case on Windows and leaves it alone on macOS, and `os.path.samefile` only answers when both paths already exist. A carve folder named `Movies` and `--out movies/index.json` are one file on APFS, and the manifest does not exist yet, so the check let `--out` write `<target>/index.json`. The tool now uses `tools/report_paths.py`. `bink_names.py` calls the same function, so it gets the same answer. ### Tested `python -I tests/test_bink_index.py` (35 tests) and `python -I tests/test_bink_names.py` (36 tests), on macOS APFS. The new test refuses `movies/index.json` for a folder created as `Movies`. 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 Movies/index.json and movies/index.json as two paths, so --out could write the carve manifest. The shared report-path check refuses that spelling.

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

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

Reviewed fb43ae7: Ran tests/test_bink_index.py (35 OK, 1 skip: the new test needs a case-insensitive
volume), tests/test_bink_names.py, tests/test_report_paths.py and tests/test_report_path_case.py
on both trees — all OK. With the repo's own folding-volume mock, bink_index <t>/Movies --out <t>/movies/index.json writes the report and returns rc=0 on main, and refuses here with exit 2 "would
overwrite the carve manifest"; case-sensitive behaviour is unchanged. Non-blocking: consider adding
bink_index to HELPERS in test_report_path_case.py and giving the new test that mock so Linux CI runs it.
AI-assisted review.

Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 14:23 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1430#issuecomment-7165196529) Reviewed fb43ae7: Ran `tests/test_bink_index.py` (35 OK, 1 skip: the new test needs a case-insensitive volume), `tests/test_bink_names.py`, `tests/test_report_paths.py` and `tests/test_report_path_case.py` on both trees — all OK. With the repo's own folding-volume mock, `bink_index <t>/Movies --out <t>/movies/index.json` writes the report and returns rc=0 on main, and refuses here with exit 2 "would overwrite the carve manifest"; case-sensitive behaviour is unchanged. Non-blocking: consider adding bink_index to HELPERS in `test_report_path_case.py` and giving the new test that mock so Linux CI runs it. 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/1430/head:github-bot/gh-1430'
git switch 'github-bot/gh-1430'

Merge

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