Reserve synthetic guest scene output before writing reports (GUEST-SCENE-OUTPUT-OWNERSHIP) #1958
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!1958
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/guest-scene-output-ownership"
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: GUEST-SCENE-OUTPUT-OWNERSHIP
What and why
Two invocations can both see an empty
--outduring argument parsing. When the second invocation sees the first run'slogs/during setup, it can write a failure report into the shared directory. The active invocation then fails when it tries to publish its ownreport.json.Create
logs/exclusively before input hashing or report handling. If another run owns the directory, the later invocation exits through the existing setup-error handling and leaves the first run's logs and report alone.Tested
python -I tests/test_guest_scene_reference.pypassed all 7 tests. The new regression fails before the fix because the competing run createsreport.json.python -I tests/test_dev_guest_scene.pypassed all 4 tests.execute(). On9e7720c9e, the second invocation wrote the report and the active invocation raisedFileExistsError. With the patch, the second invocation returned 1 and the active invocation recorded the synthetic loader's exit code 7.git diff --checkand the source-only check passed. Tested on Windows 11 with Python 3.11.17.GPUs tested: n/a (CPU-only synthetic fixtures)
AI-assisted: yes (Codex)
Checklist
main.#1958 | head ab3eb20e6d7663a004aaf953861afefb76cb38d6 (merged cleanly with main d48a957bb) |
python -I tests/test_guest_scene_reference.py| red on main:FAILED (failures=1)(wrotereport.jsoninto a competing run'soutput/directory) | green on PR+main:7 tests OK| Windows 11, Python 3.12.10 | AI-assisted: yesAudited
executeinscripts/run_guest_scene.py(reservingsession.logs.mkdir()withoutexist_okinside the initialOSErrorguard before entering thefinallyblock that writesreport.json, so a concurrent run that already claimedout/logsfails cleanly with exit1without overwritingreport.jsonor logs). Also verifiedtests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK), andscripts/check_no_game_data.py.Red/green: tests/test_guest_scene_reference.py fails on main (writes report.json into a competing run's output directory) and passes with the PR merged, on GitHub Actions Linux and natively on Windows.
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)
Verified by OreoFR
4a54aedcb+ PR headab3eb20e6python -I tests/test_guest_scene_reference.pyAI-assisted (Claude Code, Claude Opus 5.5).