report_paths: respect case-sensitive Windows directories (OLD-9412) #490

Merged
sodove merged 2 commits from upstream-pr/490 into main 2026-11-25 19:45:34 +00:00
sodove commented 2026-11-24 06:15:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-24T06:15:15Z.


Claimed in the coordination issue as: OLD-9412 (claim)

What and why

On Windows the shared report-path guard currently folds case even in an NTFS directory that preserves it. A tool can refuse distinct input and output names before either report is written.

This carries over both commits by IsidroEmirPelli from the former PR #9412, retaining their authorship. Existing files are compared by identity. For missing Windows paths the case-only name comparison follows the actual parent directory, or the nearest existing ancestor. Hard links and the usual case-insensitive NTFS aliases still collide.

Tested

  • Windows 11 x64 build 26100, Python 3.12, synthetic files on real NTFS. The same 10-case probe went from 4/10 on main 8f481cf to 10/10 with the patch. It covers two existing files, one or both missing, missing parent components, a hard link, and case-insensitive controls.
  • 35 report-path and collision tests passed, with the APFS-only case skipped. Another 34 related CLI tests passed.
  • The user_sgpr_census folding-volume mock assertion failed on both main and this branch. The rest of that file passed on both (43 tests). The separate test fix in #368 passed all 44 tests on both branches (Windows comparison).
  • git diff --check and check_no_game_data.py on the changed files passed.

GPUs tested: n/a, CPU-only.

AI-assisted: yes, carryover and verification.

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5467140695 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/490). Originally posted by [sodove](https://github.com/sodove) on 2026-11-24T06:15:15Z. --- Claimed in the coordination issue as: OLD-9412 ([claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7123692773)) ### What and why On Windows the shared report-path guard currently folds case even in an NTFS directory that preserves it. A tool can refuse distinct input and output names before either report is written. This carries over both commits by IsidroEmirPelli from the former PR #9412, retaining their authorship. Existing files are compared by identity. For missing Windows paths the case-only name comparison follows the actual parent directory, or the nearest existing ancestor. Hard links and the usual case-insensitive NTFS aliases still collide. ### Tested - Windows 11 x64 build 26100, Python 3.12, synthetic files on real NTFS. The same 10-case probe went from 4/10 on main 8f481cf to 10/10 with the patch. It covers two existing files, one or both missing, missing parent components, a hard link, and case-insensitive controls. - 35 report-path and collision tests passed, with the APFS-only case skipped. Another 34 related CLI tests passed. - The user_sgpr_census folding-volume mock assertion failed on both main and this branch. The rest of that file passed on both (43 tests). The separate test fix in #368 passed all 44 tests on both branches ([Windows comparison](https://github.com/ubiquitarianism/leonida/pull/368#issuecomment-7123795172)). - git diff --check and check_no_game_data.py on the changed files passed. GPUs tested: n/a, CPU-only. AI-assisted: yes, carryover and verification. ### Checklist - [x] Based on current main and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption.
sodove commented 2026-11-24 10:04:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-24T10:04:54Z.


Rechecked the published head 448dae0 on upstream main 21625bc. On Windows 11 and Python 3.12, applying only this PR's tests reproduced one ordinary failure and four failed subtests, including the real case-sensitive NTFS directory. With the whole PR, test_report_paths and test_runtime_paths passed all 29 tests and 22 subtests. The PR applies cleanly. AI-assisted verification, synthetic inputs only.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7128288253 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/490#issuecomment-7128288253). Originally posted by [sodove](https://github.com/sodove) on 2026-11-24T10:04:54Z. --- Rechecked the published head 448dae0 on upstream main 21625bc. On Windows 11 and Python 3.12, applying only this PR's tests reproduced one ordinary failure and four failed subtests, including the real case-sensitive NTFS directory. With the whole PR, test_report_paths and test_runtime_paths passed all 29 tests and 22 subtests. The PR applies cleanly. AI-assisted verification, synthetic inputs only.
DeadlyChirp commented 2026-11-25 15:23:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DeadlyChirp on 2026-11-25T15:23:52Z.


Tested on Windows 11, Python 3.12.10, with this PR merged onto upstream main b0f3d3998 (merge commit e8d05ad62).

python -I tests/test_report_paths.py:

  • PR: 24 tests OK (1 skipped). main: 22 tests OK (1 skipped).
  • The skip is the existing symlink test: [WinError 1314] A required privilege is not held by the client (Developer Mode is off). Both new tests run and pass.

(AI-assisted test run; output checked by hand.)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7166778423 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/490#issuecomment-7166778423). Originally posted by [DeadlyChirp](https://github.com/DeadlyChirp) on 2026-11-25T15:23:52Z. --- Tested on Windows 11, Python 3.12.10, with this PR merged onto upstream main b0f3d3998 (merge commit e8d05ad62). `python -I tests/test_report_paths.py`: - PR: 24 tests OK (1 skipped). main: 22 tests OK (1 skipped). - The skip is the existing symlink test: `[WinError 1314] A required privilege is not held by the client` (Developer Mode is off). Both new tests run and pass. (AI-assisted test run; output checked by hand.)
aslan2142 commented 2026-11-25 19:45:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T19:45:37Z.


Merged, thanks! The new test fails on main and passes with this.

  • Checked on main 5da72d19f + 448dae0f8: the semantic suite passes (491 files, 6,312 tests, 0 files failed); test_report_paths pass; the 15 docs and writer tests pass; check_no_game_data.py is clean on the 2 changed files.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7172729867 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/490#issuecomment-7172729867). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-25T19:45:37Z. --- Merged, thanks! The new test fails on `main` and passes with this. - **Checked on `main` `5da72d19f` + `448dae0f8`:** the semantic suite passes (491 files, 6,312 tests, 0 files failed); `test_report_paths` pass; the 15 docs and writer tests pass; `check_no_game_data.py` is clean on the 2 changed files. AI-assisted (Claude Code, Claude Opus 5.5).
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!490
No description provided.