Reserve synthetic guest scene output before writing reports (GUEST-SCENE-OUTPUT-OWNERSHIP) #1958
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1958"
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 alexandersato0830 on 2026-11-25T16:46:33Z.
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.Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T12:21:43Z.
#1958 | head
ab3eb20e6d(merged cleanly with maind48a957bb) |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.Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:29:41Z.
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
7daa4a4a5in GitHub Actions: no new failure.AI-assisted (Claude Code, Claude Opus 5.5)
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:56:35Z.
Verified by OreoFR
4a54aedcb+ PR headab3eb20e6python -I tests/test_guest_scene_reference.pyAI-assisted (Claude Code, Claude Opus 5.5).