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

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

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


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

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

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T15:25:20Z.


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

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

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


Verified by OreoFR

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

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


#1435 | head 7fb61fe3f0 (merged cleanly onto origin/main a3484ceebc) | 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/instance_lists.py and tests/test_instance_lists.py aliasing same_output_path = same_report_path. python -I scripts/check_no_game_data.py tools/instance_lists.py tests/test_instance_lists.py passed (rc=0).
  • Native Windows 11 NTFS execution:
    • python -I tests/test_instance_lists.py -> 22/22 passed (OK, 0 skipped) on a real case-insensitive NTFS volume, including test_case_only_spelling_of_a_missing_report_is_one_path (Reports\out.json vs reports\out.json before out.json exists).
    • Live NTFS directory junction + missing-report probe: Created Reports and an NTFS directory junction mklink /J ReportsJunc Reports, confirming same_output_path("...\\Reports\\out.json", "...\\ReportsJunc\\OUT.JSON") == True and same_output_path("...\\Reports\\out.json", "...\\Reports\\other.json") == False.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248443874 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1435#issuecomment-7248443874). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T00:55:25Z. --- #1435 | head 7fb61fe3f064e4bee64fb2ceee703b2f96d172cd (merged cleanly onto origin/main a3484ceebc) | 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/instance_lists.py` and `tests/test_instance_lists.py` aliasing `same_output_path = same_report_path`. `python -I scripts/check_no_game_data.py tools/instance_lists.py tests/test_instance_lists.py` passed (`rc=0`). - **Native Windows 11 NTFS execution**: - `python -I tests/test_instance_lists.py` -> **`22/22` passed (`OK`, `0` skipped)** on a real case-insensitive NTFS volume, including `test_case_only_spelling_of_a_missing_report_is_one_path` (`Reports\out.json` vs `reports\out.json` before `out.json` exists). - **Live NTFS directory junction + missing-report probe**: Created `Reports` and an NTFS directory junction `mklink /J ReportsJunc Reports`, confirming `same_output_path("...\\Reports\\out.json", "...\\ReportsJunc\\OUT.JSON") == True` and `same_output_path("...\\Reports\\out.json", "...\\Reports\\other.json") == False`.
TheGeogeo commented 2026-11-29 14:17:19 +00:00 (Migrated from github.com)

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


Correction: not in main. Its squash commit fe63ca464 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/instance_lists.py and tests/test_instance_lists.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/instance_lists.py and tests/test_instance_lists.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 fe63ca464 (2026-11-27, "PR #1435: instance_lists: ask report_paths for the report-path guard (INSTANCE-LISTS-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:7257186551 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1435#issuecomment-7257186551). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T14:17:19Z. --- **Correction: not in `main`.** Its squash commit `fe63ca464` 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/instance_lists.py` and `tests/test_instance_lists.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/instance_lists.py` and `tests/test_instance_lists.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 `fe63ca464` (2026-11-27, "PR #1435: instance_lists: ask report_paths for the report-path guard (INSTANCE-LISTS-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:16 +00:00 (Migrated from github.com)

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


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

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

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


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:7257715318 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1435#issuecomment-7257715318). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T14:58:07Z. --- 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!1435
No description provided.