conformance: reject diff heatmap path collisions #2410
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2410"
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 iliko123456789 on 2026-11-26T22:13:58Z.
Claimed in the coordination issue as:
CONFORMANCE-DIFF-OUTPUT-COLLISION
What and why
compare.py diffcould overwrite a manifest, an input image, or another heatmap. Overwriting an image needed by a later scene could also produce a false pixel mismatch.Plan every path before writing heatmaps. Index possible aliases and confirm collisions with the shared
same_report_pathhelper. A collision exits 2 and names both paths. Existing heatmaps at distinct destinations can still be replaced.Tested
Verified commit
2130199f1on upstreame5a7c8942.Performance
Synthetic preflight benchmark (seconds):
Benchmarks used synthetic 1x1 PNGs. Results for 6 and 30 scenes are medians of three runs. Larger results are single runs.
Known limitations
Windows skipped symlink tests due to insufficient privileges. Ubuntu skipped Windows-specific and case-insensitive-volume tests. Both skipped APFS/HFS+ and five native-renderer tests.
All seven PowerShell conformance tests passed on Windows and were skipped on Ubuntu.
Validation assumes paths and links remain stable during comparison. Many paths sharing an alias key can still trigger repeated comparisons. Legacy Windows code pages may require Python UTF-8 mode for redirected CLI output.
GPUs tested: n/a (CPU-only synthetic tests)
AI-assisted: yes, with Codex
Checklist
Imported from ubiquitarianism/leonida. Originally posted by tiguan26 on 2026-11-27T04:43:35Z.
Review: APPROVED
Approving
2130199f1.Every scene's paths are planned and checked before the first heatmap is written, so a collision fails the run without overwriting an input.
find_report_path_collision's candidate keys cover each waysame_report_pathcan match: the resolved path, the normalized key, the case-folded basename (which any case-folding match shares) and the file identity for hard links with unrelated names, so the index cannot miss a pair the pairwise check would catch, and inputs are checked before earlier outputs. Moving the basename test ahead of the split in_same_resolved_namekeeps its meaning.Merged onto
maind1dff7949together with #2403, #2299, #2297, #2330 and #2286 (no conflicts), on Linux with Python 3.13.tests/test_conformance_diff_output_paths.py9 passed, 1 skipped;tests/test_report_paths.py24 passed, 1 skipped (main: 23). AI-assisted (Claude Code, Claude Opus 5.5).Imported from ubiquitarianism/leonida. Originally posted by iliko123456789 on 2026-11-27T19:44:06Z.
Thanks for reviewing and testing my fix! I noticed that the PR is still open, and I couldn't find the changes on the current main branch after the repository move. Does it still need to be merged, or is there anything I need to update on my side?
Imported from ubiquitarianism/leonida. Originally posted by tiguan26 on 2026-11-28T01:41:42Z.
@iliko123456789 nothing to update on your side. The repository move kept the open pull requests as they were, so this one is still waiting to be merged; it is not on main yet. I just checked: your head
2130199f1still merges cleanly onto the current main (431ceba4f), with no conflicts. Per #2464, the maintainer merges in batches by area (tools first), merging main into each branch and running the suites himself, so it should get picked up in a tools batch. AI-assisted (Claude Code, Claude Opus 5.5).Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T10:03:41Z.
#2410 | head
2130199f1b(merged cleanly with main33db04a70) |python -I tests/test_conformance_diff_output_paths.py && python -I tests/test_report_paths.py| red on main:FAILED (failures=9, skipped=2)(0 != 2across NTFS case-insensitive, manifest, and hardlink heatmap collisions) andFAILED (errors=7, skipped=1)(AttributeError: find_report_path_collision) | green on PR+main:10 tests OK (skipped=2)and25 tests OK (skipped=1)| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
find_report_path_collisionintools/report_paths.pyandcheck_heatmap_paths/command_diffintools/conformance/compare.pyon Windows 11 NTFS (exercising native case-insensitive volume folding andos.linkhardlink alias detection before any heatmap is written). Also passedtests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK),tests/test_runner_calls_all_tests.py(3 OK), andscripts/check_no_game_data.pyon the merged tree.Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T10:58:25Z.
Merged, thank you @iliko123456789! This PR (conformance: reject diff heatmap path collisions) was checked by zmasi or sodove and then by our own local run of its tests with main merged in, and it passed cleanly, so it went in with its reviewed batch.
AI-assisted (Claude Code, Claude Opus 5.5), posted for the maintainers.