navmesh_cell_fit: protect scanned vehicle documents from output aliases #2445
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2445
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/navmesh-cell-fit-carve-alias"
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?
Pull request successfully merged and closed
Claimed in the coordination issue as: NAVMESH-CELL-FIT-CARVE-ALIAS
Depends on: #952 (textual conflict in argument handling if both branches land; this change builds directly on main).
What and why
The archive was protected from output collisions, but scanned vehicle documents under --common could still be overwritten. Refuse output aliases of those files before reading the carve. A readable synthetic archive reproduced exit 0 with the vehicle document replaced via its hard link. The fixed CLI returns 2 and preserves its bytes. The regression also covers a direct path.
Tested
Windows, Python 3.14.7, synthetic fixtures.
python -I tests/test_navmesh_cell_fit.pypython -I tests/test_report_paths.pygit diff --checkpassed.GPUs tested: N/A (CPU-only).
AI-assisted: Yes.
Checklist
#2445 | head 20fbb6cf5098dceeca236bfb9f7feeffea190d9d (merged cleanly with main 3ca0707dd) |
python -I tests/test_navmesh_cell_fit.py| red on main:FAILED (failures=2)(test_output_cannot_overwrite_a_common_carve_input:AssertionError: 0 != 2on direct--common.bininput and hardlink alias) | green on PR+main:5 tests OK(-k test_output_cannot_overwrite_a_common_carve_input:1 test OK) | Windows 11, Python 3.12.10 | AI-assisted: yesAudited
_carve_inputs(glob.escape(carve)) andmain()intools/navmesh_cell_fit.py(same_report_path(a.out, p)check across--common.bininputs before writing output, merging cleanly with currentmain3ca0707dd). Also passedtests/test_report_paths.py(24 OK, skipped=1),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.Red/green: classified READY by oreo-lot3 (red on main b1619e0a3, green on head merged with main); head 20fbb6cf5098 unchanged since 2026-11-27, before that run.
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)