reports: detect case-folded aliases before creating output folders #1403

Merged
PyZikYG merged 1 commit from upstream-pr/1403 into main 2026-11-28 14:39:12 +00:00
PyZikYG commented 2026-11-24 23:29:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PyZikYG on 2026-11-24T23:29:39Z.


Claimed as REPORT-PATH-MISSING-PARENT.

On a case-folding volume that needs a filesystem probe, the shared report guard could miss two outputs such as New/reports/R.json and new/Reports/r.JSON when neither parent existed. Exporters can create both parents later and write both reports to the same file.

Probe relative path spellings from their nearest existing parent in a temporary directory. This catches aliases before creating the output tree and leaves the requested directories untouched. The change is separate from the Windows case-sensitive-directory handling in #490.

Tested

  • python -I tests/test_report_paths.py
  • python -I tests/test_character_census.py
  • python -I tests/test_navmesh_index.py
  • python -I tests/test_text_write_line_endings.py

AI-assisted: yes.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5482103025 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1403). Originally posted by [PyZikYG](https://github.com/PyZikYG) on 2026-11-24T23:29:39Z. --- Claimed as [REPORT-PATH-MISSING-PARENT](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7147436243). On a case-folding volume that needs a filesystem probe, the shared report guard could miss two outputs such as New/reports/R.json and new/Reports/r.JSON when neither parent existed. Exporters can create both parents later and write both reports to the same file. Probe relative path spellings from their nearest existing parent in a temporary directory. This catches aliases before creating the output tree and leaves the requested directories untouched. The change is separate from the Windows case-sensitive-directory handling in #490. ### Tested - `python -I tests/test_report_paths.py` - `python -I tests/test_character_census.py` - `python -I tests/test_navmesh_index.py` - `python -I tests/test_text_write_line_endings.py` AI-assisted: yes.
PierreEbele commented 2026-11-25 09:27:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T09:27:00Z.


Reviewed 25323b2: ran tests/test_report_paths.py (23 OK) and the report-path neighbours on the PR and, with
the PR's test file copied in, on main — all pass on both; the tests compare against volume_folds_case(), so
on this case-sensitive host they pass on main too, and I checked the folding branch with a probe simulating
a case-folding volume: two not-yet-created nested outputs differing only by case give (False, []) on main
and (True, []) on the PR, with no folders created and no scratch left. No finding.
AI-assisted review.

Recommendation: Merge

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7158344893 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1403#issuecomment-7158344893). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-25T09:27:00Z. --- Reviewed 25323b2: ran tests/test_report_paths.py (23 OK) and the report-path neighbours on the PR and, with the PR's test file copied in, on main — all pass on both; the tests compare against volume_folds_case(), so on this case-sensitive host they pass on main too, and I checked the folding branch with a probe simulating a case-folding volume: two not-yet-created nested outputs differing only by case give (False, []) on main and (True, []) on the PR, with no folders created and no scratch left. No finding. AI-assisted review. **Recommendation:** Merge
MoonEyes commented 2026-11-28 14:39:07 +00:00 (Migrated from github.com)

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


Red/green: pytest tests/test_report_paths.py fails on main (2 failed, 20 passed, 1 skipped, 18 subtests passed) and passes on head 25323b2a25 merged with main (24 passed, 1 skipped, 22 subtests passed).
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main d48a957bb in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7240828806 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1403#issuecomment-7240828806). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T14:39:07Z. --- Red/green: `pytest tests/test_report_paths.py` fails on main (2 failed, 20 passed, 1 skipped, 18 subtests passed) and passes on head 25323b2a2521 merged with main (24 passed, 1 skipped, 22 subtests passed). Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main d48a957bb in GitHub Actions: no new failure. 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!1403
No description provided.