reports: detect case-folded aliases before creating output folders #1403
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1403"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.pypython -I tests/test_character_census.pypython -I tests/test_navmesh_index.pypython -I tests/test_text_write_line_endings.pyAI-assisted: yes.
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, withthe 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
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T14:39:07Z.
Red/green:
pytest tests/test_report_paths.pyfails on main (2 failed, 20 passed, 1 skipped, 18 subtests passed) and passes on head25323b2a25merged 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
d48a957bbin GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)