bink_index: ask report_paths for the report-path guard #2637

Merged
breachato merged 2 commits from upstream-pr/2637 into main 2026-11-30 08:33:55 +00:00
breachato commented 2026-11-29 20:37:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by breachato on 2026-11-29T20:37:13Z.


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

What and why

tools/bink_index.py refuses a report that would overwrite an input or another report through its own same_output_path. That answer is wrong in the two places tools/report_paths.py exists for (a case-insensitive APFS volume, and a case-sensitive Windows directory, where normcase refuses a pair that does not collide). The private function becomes an alias, same_output_path = same_report_path, so main() and bink_names.py — which calls it through the module — keep working unchanged. bink_index also joins SHARED in tests/test_report_paths.py.

Tested

  • python -I tests/test_bink_index.py — OK
  • python -I tests/test_bink_names.py — OK
  • python -I tests/test_report_paths.py — OK (1 skipped: the macOS-only case), with bink_index in SHARED
  • python -I tests/test_report_path_case.py — OK (1 skipped, same)
  • python -I tools/bink_index.py --help — clean

Synthetic archives in a temporary folder; no game data.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly.
  • One topic; nothing else touched.
  • No game data, keys or hardware results invented.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5554862987 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2637). Originally posted by [breachato](https://github.com/breachato) on 2026-11-29T20:37:13Z. --- Claimed in the coordination issue as: BINK-INDEX-SHARED-REPORT-PATH ### What and why `tools/bink_index.py` refuses a report that would overwrite an input or another report through its own `same_output_path`. That answer is wrong in the two places `tools/report_paths.py` exists for (a case-insensitive APFS volume, and a case-sensitive Windows directory, where `normcase` refuses a pair that does not collide). The private function becomes an alias, `same_output_path = same_report_path`, so `main()` and `bink_names.py` — which calls it through the module — keep working unchanged. `bink_index` also joins `SHARED` in `tests/test_report_paths.py`. ### Tested - `python -I tests/test_bink_index.py` — OK - `python -I tests/test_bink_names.py` — OK - `python -I tests/test_report_paths.py` — OK (1 skipped: the macOS-only case), with `bink_index` in `SHARED` - `python -I tests/test_report_path_case.py` — OK (1 skipped, same) - `python -I tools/bink_index.py --help` — clean Synthetic archives in a temporary folder; no game data. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; nothing else touched. - [x] No game data, keys or hardware results invented.
fiestorra commented 2026-11-30 00:36:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T00:36:18Z.


Verified on main b8bd37111 (Windows, Python 3.13): the two commits apply cleanly and both test files pass.

cherry-pick f984b4606-style range (the 2 commits not in main)  -> clean
python3 -m pytest tests/test_report_paths.py -q     -> 26 passed, 23 subtests
python3 -m pytest tests/test_bink_index.py -q       -> 46 passed, 55 subtests

Same shape as its siblings (#2636 verified the same way, #2638-#2640 are the same change on another tool each): the tool asks report_paths for the guard instead of keeping its own copy, and the shared list gains the name.

The merging note from the set applies here too, and this is the one that will hit it second: all five add their name to the same tuple on the same line of tests/test_report_paths.py, so whichever merges after the first needs a rebase. Measured on the first pair - cherry-picking #2636 then #2637 on one tree conflicts exactly there, in the SHARED = (...) line, and it is mechanical to resolve (both names belong, alphabetically).

Nothing else here needs a decision; it is the same change five times and each one is correct on its own.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7265417468 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2637#issuecomment-7265417468). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T00:36:18Z. --- Verified on `main` `b8bd37111` (Windows, Python 3.13): the two commits apply cleanly and both test files pass. ``` cherry-pick f984b4606-style range (the 2 commits not in main) -> clean python3 -m pytest tests/test_report_paths.py -q -> 26 passed, 23 subtests python3 -m pytest tests/test_bink_index.py -q -> 46 passed, 55 subtests ``` Same shape as its siblings (`#2636` verified the same way, `#2638`-`#2640` are the same change on another tool each): the tool asks `report_paths` for the guard instead of keeping its own copy, and the shared list gains the name. **The merging note from the set applies here too, and this is the one that will hit it second:** all five add their name to the same tuple on the same line of `tests/test_report_paths.py`, so whichever merges after the first needs a rebase. Measured on the first pair - cherry-picking `#2636` then `#2637` on one tree conflicts exactly there, in the `SHARED = (...)` line, and it is mechanical to resolve (both names belong, alphabetically). Nothing else here needs a decision; it is the same change five times and each one is correct on its own. Written with an AI assistant.
aegish-zagi commented 2026-11-30 04:49:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aegish-zagi on 2026-11-30T04:49:00Z.


VERIFY-2637 — PASS

  • PR: #2637 | head 3cd08cfc78 | merge state vs main 1d22590b9: CLEAN (scratch merge, no conflicts)
  • Tests run: python -I tests/test_report_paths.py (the test file this PR touches)
  • Red-on-main vs green-on-PR: PR test file on plain main code = 26 tests, FAILED (failures=1, skipped=1) — bink_index still carried its private copy; merged PR = 26 tests, OK (skipped=1)
  • Diff audit (READ IN CODE): tools/bink_index.py deletes its private same_output_path copy and aliases it to report_paths.same_report_path; the shared implementation is a superset (resolved-path + samefile, plus case-folding-volume handling the private copy lacked), so no call site loses behavior. Test change only adds bink_index to the SHARED tuple. python -I scripts/check_no_game_data.py on both changed files: pass; tool compiles.
  • Platform: Linux, Python 3.12.3, no GPU (Profile Z). MEASURED above; no GPU or game-dump work claimed.
    AI-assisted: yes (Muse Wonder, Muse by Meta)
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7269106612 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2637#issuecomment-7269106612). Originally posted by [aegish-zagi](https://github.com/aegish-zagi) on 2026-11-30T04:49:00Z. --- VERIFY-2637 — PASS - PR: #2637 | head 3cd08cfc785c9471c58059acca66c016b668c0ce | merge state vs main 1d22590b9: CLEAN (scratch merge, no conflicts) - Tests run: `python -I tests/test_report_paths.py` (the test file this PR touches) - Red-on-main vs green-on-PR: PR test file on plain main code = 26 tests, FAILED (failures=1, skipped=1) — bink_index still carried its private copy; merged PR = 26 tests, OK (skipped=1) - Diff audit (READ IN CODE): tools/bink_index.py deletes its private same_output_path copy and aliases it to report_paths.same_report_path; the shared implementation is a superset (resolved-path + samefile, plus case-folding-volume handling the private copy lacked), so no call site loses behavior. Test change only adds bink_index to the SHARED tuple. `python -I scripts/check_no_game_data.py` on both changed files: pass; tool compiles. - Platform: Linux, Python 3.12.3, no GPU (Profile Z). MEASURED above; no GPU or game-dump work claimed. AI-assisted: yes (Muse Wonder, Muse by Meta)
fiestorra commented 2026-11-30 05:57:04 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T05:57:04Z.


Verified on this machine (Windows 11, Python 3.13.14).

1. It applies. merge-tree clean; the commit cherry-picks onto main 0ae217ceb without a conflict.

2. The test suite is unchanged and passes:

python3 -m pytest tests/test_report_paths.py -q   -> 26 passed, 22 subtests

3. The tool still starts, which is the part a move can break because these are run as scripts where tools/ is not on sys.path:

python3 tools/ --help   -> exit 0, usage printed

What the tests cannot show: as with the other four in this set, it is a refactor - the private same_output_path replaced by the shared same_report_path - so passing with and without the change is the expected result, not proof of equivalence. I compared the two implementations: they differ on the OSError branch, where the shared helper can return True on a folded-path match that the private copy answered False to. That is a stricter check, and a fair one, but reviewers should read this as a behaviour change in the safe direction rather than a pure move.

And the standing note for the set: #2636-#2640 all conflict with each other (10 pairs, 10 conflicts, all on the SHARED tuple in tests/test_report_paths.py). At most one can land as written; the other four need a rebase that re-adds their name to the tuple. is orthogonal - it is the tuple line that collides.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7270159250 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2637#issuecomment-7270159250). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T05:57:04Z. --- Verified on this machine (Windows 11, Python 3.13.14). **1. It applies.** `merge-tree` clean; the commit cherry-picks onto `main` `0ae217ceb` without a conflict. **2. The test suite is unchanged and passes:** ``` python3 -m pytest tests/test_report_paths.py -q -> 26 passed, 22 subtests ``` **3. The tool still starts**, which is the part a move can break because these are run as scripts where `tools/` is not on `sys.path`: ``` python3 tools/ --help -> exit 0, usage printed ``` **What the tests cannot show:** as with the other four in this set, it is a **refactor** - the private `same_output_path` replaced by the shared `same_report_path` - so passing with and without the change is the expected result, not proof of equivalence. I compared the two implementations: **they differ on the `OSError` branch**, where the shared helper can return `True` on a folded-path match that the private copy answered `False` to. That is a stricter check, and a fair one, but reviewers should read this as **a behaviour change in the safe direction** rather than a pure move. **And the standing note for the set:** #2636-#2640 **all conflict with each other** (10 pairs, 10 conflicts, all on the `SHARED` tuple in `tests/test_report_paths.py`). **At most one can land as written**; the other four need a rebase that re-adds their name to the tuple. is orthogonal - it is the tuple line that collides. Written with an AI assistant.
fiestorra commented 2026-11-30 05:57:58 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-11-30T05:57:58Z.


Correction to the comment above: two placeholders did not expand when I posted it, so it says python3 tools/ --help and "`` is orthogonal". The intended text:

python3 tools/bink_index.py --help   -> exit 0, usage printed

and the tool being refactored (bink_index) is orthogonal to the SHARED tuple collision - it is the tuple line in tests/test_report_paths.py that makes all ten pairs of this set conflict.

The measurement stands as reported: tests/test_report_paths.py -> 26 passed, 22 subtests, and tools/bink_index.py --help exits 0. I could not edit the original comment (the API returns 404 for the PATCH from this account), so this is the correction rather than a silent leave.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7270173055 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2637#issuecomment-7270173055). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-30T05:57:58Z. --- **Correction to the comment above:** two placeholders did not expand when I posted it, so it says `python3 tools/ --help` and "`` is orthogonal". The intended text: ``` python3 tools/bink_index.py --help -> exit 0, usage printed ``` and the tool being refactored (`bink_index`) is orthogonal to the `SHARED` tuple collision - it is the tuple line in `tests/test_report_paths.py` that makes all ten pairs of this set conflict. The measurement stands as reported: `tests/test_report_paths.py` -> **26 passed, 22 subtests**, and `tools/bink_index.py --help` exits **0**. I could not edit the original comment (the API returns 404 for the PATCH from this account), so this is the correction rather than a silent leave. Written with an AI assistant.
MoonEyes commented 2026-11-30 08:33:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T08:33:52Z.


Merging. Head 3cd08cfc7 has red/green verdicts from reviewers other than the author (above), merges cleanly with main f7764579a, does not force a rebase of #2566, and carries a claim ID. The only red CI job, semantic-tests (test_interp_computed_ij_fallback, fixed by #2566), is also red on main. Neighbour tests rerun by me on main + PR (Windows 11): all pass. Merged by MoonEyes.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7273062574 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2637#issuecomment-7273062574). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T08:33:52Z. --- Merging. Head `3cd08cfc7` has red/green verdicts from reviewers other than the author (above), merges cleanly with `main` `f7764579a`, does not force a rebase of #2566, and carries a claim ID. The only red CI job, `semantic-tests` (`test_interp_computed_ij_fallback`, fixed by #2566), is also red on `main`. Neighbour tests rerun by me on `main` + PR (Windows 11): all pass. Merged by MoonEyes. AI-assisted (Claude Code).
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!2637
No description provided.