sandbox_scene: protect the placement input from output aliases #2442
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!2442
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/sandbox-scene-entities-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: SANDBOX-SCENE-ENTITIES-ALIAS
What and why
The entities JSONL is consumed before the scene is opened for writing. An output path naming that input, including a hard link with another extension, silently replaced the placements with an LSB1 file. Check both paths with the repository’s shared identity helper before building. The CLI regression verifies exit status 2 and preserves the source bytes for both spellings.
Tested
Windows, Python 3.14.7, synthetic fixtures.
python -I tests/test_sandbox_scene.pypython -I tests/test_sandbox_scene_build.pygit diff --checkpassed.GPUs tested: N/A (CPU-only).
AI-assisted: Yes.
Checklist
#2442 | head 096fce1d45ec49420a61a03987f3b45e2dc06cab (merged cleanly with main 09c153948) |
python -I tests/test_sandbox_scene.py| red on main:FAILED (failures=2)(test_scene_output_cannot_replace_placements:AssertionError: 0 != 2on direct--entitiespath and hardlink alias) | green on PR+main:13 tests OK(-k test_scene_output_cannot_replace_placements:1 test OK) | Windows 11, Python 3.12.10 | AI-assisted: yesAudited
main()intools/sandbox_scene.py(same_report_path(args.out, args.entities)guard before opening output), and verified bothPR + main(09c153948) and combined sibling mergesmain + #2443 + #2442andmain + #2444 + #2443 + #2442(0conflicts;14 tests OKintests/test_sandbox_scene.py,9 tests OKintests/test_sandbox_scene_build.py). 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.py.Red/green: tests/test_sandbox_scene.py fails 2 subtests on main (--out equal to or hard-linked to --entities overwrites the placements) and passes with the PR (cloud run on main 7daa4a4, re-run on Windows against main 8b318bd).
Targeted batch (PR tests, tests importing the changed modules, docs tests, translator when touched) merged on main 7daa4a4a5 in GitHub Actions: no new failure.
AI-assisted (Claude Code, Claude Opus 5.5)