report_paths: probe missing output parents on folding volumes #2080

Closed
whoalin1 wants to merge 1 commit from upstream-pr/2080 into main
whoalin1 commented 2026-11-25 19:41:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T19:41:19Z.


Summary

  • fix same_report_path/same_name_on_folding_volume for report paths checked before the writer creates their output parent
  • probe case folding beside the nearest existing directory instead of returning false when the output folder is missing
  • keep the probe non-invasive: it does not create the missing output folder and still leaves no scratch directory behind
  • update the synthetic regression so the missing-parent answer follows the host volume's case behavior

Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172553128 (REPORT-PATHS-MISSING-PARENT-CASEFOLD)

No game data, keys, decryption, or online services.

Test plan

  • python -I tests/test_report_paths.py — 22 tests, OK (1 skipped) on Windows 11
  • focused missing-parent regression failed before the fix (False != True on this case-folding volume) and passes after it
  • python -m compileall -q tools tests
  • git diff --check

AI-assisted with Devin.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5497955123 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2080). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-25T19:41:19Z. --- ## Summary - fix `same_report_path`/`same_name_on_folding_volume` for report paths checked before the writer creates their output parent - probe case folding beside the nearest existing directory instead of returning false when the output folder is missing - keep the probe non-invasive: it does not create the missing output folder and still leaves no scratch directory behind - update the synthetic regression so the missing-parent answer follows the host volume's case behavior Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7172553128 (`REPORT-PATHS-MISSING-PARENT-CASEFOLD`) No game data, keys, decryption, or online services. #### Test plan - [x] `python -I tests/test_report_paths.py` — 22 tests, OK (1 skipped) on Windows 11 - [x] focused missing-parent regression failed before the fix (`False != True` on this case-folding volume) and passes after it - [x] `python -m compileall -q tools tests` - [x] `git diff --check` AI-assisted with Devin.
whoalin1 commented 2026-11-25 20:57:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T20:57:42Z.


Re-verified locally on the current head 8a7dcdfe1 while CI is queued: python -I tests/test_report_paths.py — 22 tests, all pass (1 skipped), Windows 11, Python 3.14. AI-assisted with Devin.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7174422622 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2080#issuecomment-7174422622). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-25T20:57:42Z. --- Re-verified locally on the current head `8a7dcdfe1` while CI is queued: `python -I tests/test_report_paths.py` — 22 tests, all pass (1 skipped), Windows 11, Python 3.14. AI-assisted with Devin.
DeadlyChirp commented 2026-11-26 10:00:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DeadlyChirp on 2026-11-26T10:00:55Z.


Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.

  • tests/test_report_paths.py: 23 passed, 1 skipped, 22 subtests passed. The skip is the symlink case (Developer Mode is off here, WinError 1314), not related to this change.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7188791775 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/2080#issuecomment-7188791775). Originally posted by [DeadlyChirp](https://github.com/DeadlyChirp) on 2026-11-26T10:00:55Z. --- Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main. - `tests/test_report_paths.py`: 23 passed, 1 skipped, 22 subtests passed. The skip is the symlink case (Developer Mode is off here, WinError 1314), not related to this change. (AI-assisted test run; output checked by hand.)
TheGeogeo commented 2026-11-29 04:50:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T04:50:27Z.


Checked 8a7dcdfe1 against main ef3299584 on Windows 11 10.0.26300: it does not merge (git merge-tree --write-tree), so I ran no tests.

  • Conflicts: tools/report_paths.py and tests/test_report_paths.py.
  • Already in main (ALREADY-IN-MAIN): 25323b2a2 (2026-11-25, "reports: detect case-folded aliases before creating output folders") made same_name_on_folding_volume probe at the nearest existing parent (_existing_parent) without creating the output folder. That is what this PR does. 2130199f1 (2026-11-26) then edited the same lines.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7250892629 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2080#issuecomment-7250892629). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T04:50:27Z. --- Checked `8a7dcdfe1` against `main` `ef3299584` on Windows 11 10.0.26300: it does not merge (`git merge-tree --write-tree`), so I ran no tests. - Conflicts: `tools/report_paths.py` and `tests/test_report_paths.py`. - Already in `main` (ALREADY-IN-MAIN): `25323b2a2` (2026-11-25, "reports: detect case-folded aliases before creating output folders") made `same_name_on_folding_volume` probe at the nearest existing parent (`_existing_parent`) without creating the output folder. That is what this PR does. `2130199f1` (2026-11-26) then edited the same lines. AI-assisted (Claude Code).
MoonEyes commented 2026-11-29 12:53:32 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T12:53:32Z.


Closing: already on main. tools/report_paths.py now probes the nearest existing parent (_existing_parent in _same_resolved_name), and tests/test_report_paths.py:197-200 has this exact assertion. Reopen if something is still missing.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7256137575 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2080#issuecomment-7256137575). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T12:53:32Z. --- Closing: already on main. tools/report_paths.py now probes the nearest existing parent (_existing_parent in _same_resolved_name), and tests/test_report_paths.py:197-200 has this exact assertion. Reopen if something is still missing.

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