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

Closed
Dashhhhhhhh wants to merge 1 commit from upstream-pr/1430 into main
Dashhhhhhhh commented 2026-11-25 00:07:08 +00:00 (Migrated from github.com)

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


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

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5482528997 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1430). Originally posted by [Dashhhhhhhh](https://github.com/Dashhhhhhhh) on 2026-11-25T00:07:08Z. --- 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)
PierreEbele commented 2026-11-25 14:23:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T14:23:10Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7165196529 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1430#issuecomment-7165196529). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-25T14:23:10Z. --- 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
OreoFR commented 2026-11-28 21:50:25 +00:00 (Migrated from github.com)

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


Verified by OreoFR

  • Base: main 3408969a7 + PR head fb43ae7e5
  • Test: python -I tests/test_bink_index.py
  • Red on main: 39 OK
  • Green with the PR: 39 OK
  • 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:7246311524 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1430#issuecomment-7246311524). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T21:50:25Z. --- **Verified by OreoFR** - Base: main `3408969a7` + PR head `fb43ae7e5` - Test: `python -I tests/test_bink_index.py` - Red on main: 39 OK - Green with the PR: 39 OK - 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:46:56 +00:00 (Migrated from github.com)

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


#1430 | head fb43ae7e5a (merged cleanly onto origin/main e66c65b950) | 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/bink_index.py and tests/test_bink_index.py delegating same_output_path to report_paths.same_report_path. python -I scripts/check_no_game_data.py tools/bink_index.py tests/test_bink_index.py passed (rc=0).
  • Native Windows 11 NTFS execution (including previously skipped case-insensitive test):
    • python -I tests/test_bink_index.py -> 47/47 passed (OK, 0 skipped) on a real case-insensitive NTFS volume, executing test_output_cannot_create_the_manifest_under_another_case (Movies vs movies/index.json before index.json exists; skipped on case-sensitive Linux filesystems in earlier reviews).
    • Live NTFS directory junction + case-alias probe: Created a directory Movies and an NTFS directory junction mklink /J MoviesJunc Movies, then invoked bink_index.main([Movies, "--out", "MoviesJunc\\INDEX.JSON"]) before any index.json existed -> exited 2 with --out would overwrite the carve manifest and left Movies\index.json uncreated.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248346339 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1430#issuecomment-7248346339). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T00:46:56Z. --- #1430 | head fb43ae7e5a7685f11acd2076e5228033b6e359ec (merged cleanly onto origin/main e66c65b950) | 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/bink_index.py` and `tests/test_bink_index.py` delegating `same_output_path` to `report_paths.same_report_path`. `python -I scripts/check_no_game_data.py tools/bink_index.py tests/test_bink_index.py` passed (`rc=0`). - **Native Windows 11 NTFS execution (including previously skipped case-insensitive test)**: - `python -I tests/test_bink_index.py` -> **`47/47` passed (`OK`, `0` skipped)** on a real case-insensitive NTFS volume, executing `test_output_cannot_create_the_manifest_under_another_case` (`Movies` vs `movies/index.json` before `index.json` exists; skipped on case-sensitive Linux filesystems in earlier reviews). - **Live NTFS directory junction + case-alias probe**: Created a directory `Movies` and an NTFS directory junction `mklink /J MoviesJunc Movies`, then invoked `bink_index.main([Movies, "--out", "MoviesJunc\\INDEX.JSON"])` before any `index.json` existed -> exited `2` with `--out would overwrite the carve manifest` and left `Movies\index.json` uncreated.
TheGeogeo commented 2026-11-29 14:17:23 +00:00 (Migrated from github.com)

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


Correction: not in main. Its squash commit 12f2b6e00 landed on 2026-11-27, but 00131bb85 ("main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia") restored tools/bink_index.py and tests/test_bink_index.py the same day, so main does not have this change. I took the earlier verdict from the history (git cherry and the squash title), not from the tree. Re-checked on main c22a0a732: git merge-tree --write-tree of main and this branch gives a tree that still differs from main in tools/bink_index.py and tests/test_bink_index.py.

New verdict: ready for testing. It merges cleanly with main c22a0a732.

This pull request was closed on the basis of our earlier, wrong verdict. Its change is not on main, so the author or a maintainer can reopen it.

AI-assisted (Claude Code).


Earlier comment, superseded by the correction above:

Already in main: squashed as 12f2b6e00 (2026-11-27, "PR #1430: bink_index: ask report_paths for the report-path guard (BINK-INDEX-SHARED-REPORT-PATH)"), which is in main 3535eb5c4. git cherry finds this branch's commit there, so nothing is left to merge here.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257187459 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1430#issuecomment-7257187459). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T14:17:23Z. --- **Correction: not in `main`.** Its squash commit `12f2b6e00` landed on 2026-11-27, but `00131bb85` ("main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia") restored `tools/bink_index.py` and `tests/test_bink_index.py` the same day, so `main` does not have this change. I took the earlier verdict from the history (`git cherry` and the squash title), not from the tree. Re-checked on `main` `c22a0a732`: `git merge-tree --write-tree` of `main` and this branch gives a tree that still differs from `main` in `tools/bink_index.py` and `tests/test_bink_index.py`. New verdict: ready for testing. It merges cleanly with `main` `c22a0a732`. This pull request was closed on the basis of our earlier, wrong verdict. Its change is not on main, so the author or a maintainer can reopen it. AI-assisted (Claude Code). --- *Earlier comment, superseded by the correction above:* Already in main: squashed as `12f2b6e00` (2026-11-27, "PR #1430: bink_index: ask report_paths for the report-path guard (BINK-INDEX-SHARED-REPORT-PATH)"), which is in `main` `3535eb5c4`. `git cherry` finds this branch's commit there, so nothing is left to merge here. AI-assisted (Claude Code).
MoonEyes commented 2026-11-29 14:30:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T14:30:25Z.


Closing: this landed on main as 12f2b6e00 ("PR #1430: bink_index: ask report_paths for the report-path guard"), checked in main just now. Thanks!

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257355725 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1430#issuecomment-7257355725). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T14:30:25Z. --- Closing: this landed on main as 12f2b6e00 ("PR #1430: bink_index: ask report_paths for the report-path guard"), checked in main just now. Thanks!
MoonEyes commented 2026-11-29 14:58:11 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T14:58:11Z.


Correction: I closed this as already on main, and that was wrong. Its commit did land, but 00131bb85 (27/11, "main keeps its own runtime, tools and tests") removed those lines again, so main does not have this change today. I tried to reopen it, but GitHub refuses: you are at this repository's open pull request limit. You can reopen it yourself once one of your PRs is merged or closed, or say here if you want a maintainer to carry it forward with your commits. Sorry for the noise.

AI-assisted: yes (checked line by line against current main)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257716313 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1430#issuecomment-7257716313). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T14:58:11Z. --- Correction: I closed this as already on main, and that was wrong. Its commit did land, but 00131bb85 (27/11, "main keeps its own runtime, tools and tests") removed those lines again, so main does not have this change today. I tried to reopen it, but GitHub refuses: you are at this repository's open pull request limit. You can reopen it yourself once one of your PRs is merged or closed, or say here if you want a maintainer to carry it forward with your commits. Sorry for the noise. AI-assisted: yes (checked line by line against current main)

Pull request closed

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!1430
No description provided.