instance_lists: ask report_paths for the report-path guard (INSTANCE-LISTS-SHARED-REPORT-PATH) #1435

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

@⁠Dashhhhhhhh on GitHub · 2026-11-25 00:10 UTC · original
Dashhhhhhhh:fix/instance-lists-report-path → main · +19 −9 · 2 files · 1 commits · open

Claimed in the coordination issue as: INSTANCE-LISTS-SHARED-REPORT-PATH

What and why

tools/instance_lists.py compared report paths with os.path.normcase, which does not fold case on macOS, and os.path.samefile, which only answers when both paths already exist. Two spellings of a report that has not been created are one file on APFS, and the private check treated them as different.

The tool now uses tools/report_paths.py.

Tested

python -I tests/test_instance_lists.py (17 tests) and python -I tools/instance_lists.py --help, on macOS APFS. The new test treats Reports/out.json and reports/out.json as one path before either file exists. 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:10 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1435) `Dashhhhhhhh:fix/instance-lists-report-path` → `main` · +19 −9 · 2 files · 1 commits · open Claimed in the coordination issue as: INSTANCE-LISTS-SHARED-REPORT-PATH ### What and why `tools/instance_lists.py` compared report paths with `os.path.normcase`, which does not fold case on macOS, and `os.path.samefile`, which only answers when both paths already exist. Two spellings of a report that has not been created are one file on APFS, and the private check treated them as different. The tool now uses `tools/report_paths.py`. ### Tested `python -I tests/test_instance_lists.py` (17 tests) and `python -I tools/instance_lists.py --help`, on macOS APFS. The new test treats `Reports/out.json` and `reports/out.json` as one path before either file exists. 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 two spellings of a report that has not been created as two paths. The shared report-path check folds that case.

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

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

Reviewed 7fb61fe3f: instance_lists' overwrite guard now aliases tools/report_paths.same_report_path instead of its private realpath/normcase/samefile copy, plus a regression test that skips on case-sensitive volumes. On this arm64 Linux box I ran python -I tests/test_instance_lists.py on both trees (17 tests, 1 skip: the new test skips itself, "volume keeps case") and a probe on both: on a simulated case-insensitive volume the PR folds case (Reports/out.json vs reports/out.json, neither written) and NFC/NFD accents where main answers "two paths"; identity, distinct files, hard links and the case-sensitive-volume answers are unchanged. No findings; no game data touched.
AI-assisted review.
Recommendation: Merge

**@⁠PierreEbele** on GitHub · 2026-11-25 15:25 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1435#issuecomment-7166816909) Reviewed 7fb61fe3f: instance_lists' overwrite guard now aliases tools/report_paths.same_report_path instead of its private realpath/normcase/samefile copy, plus a regression test that skips on case-sensitive volumes. On this arm64 Linux box I ran `python -I tests/test_instance_lists.py` on both trees (17 tests, 1 skip: the new test skips itself, "volume keeps case") and a probe on both: on a simulated case-insensitive volume the PR folds case (`Reports/out.json` vs `reports/out.json`, neither written) and NFC/NFD accents where main answers "two paths"; identity, distinct files, hard links and the case-sensitive-volume answers are unchanged. No findings; no game data touched. 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/1435/head:github-bot/gh-1435'
git switch 'github-bot/gh-1435'

Merge

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