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

Merged
leonida/mandy
PyZikYG merged 1 commit from report-path-missing-parent into main 2026-11-28 14:39:12 +00:00

Pull request successfully merged and closed

PyZikYG commented 2026-11-24 23:29:39 +00:00

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.

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

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

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

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)

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 description provided.