[PR #1958] Reserve synthetic guest scene output before writing reports (GUEST-SCENE-OUTPUT-OWNERSHIP) #1965

Open
opened 2026-11-26 21:19:34 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1958
Author: @alexandersato0830
Created: 11/25/2026
Status: 🔄 Open

Base: main ← Head: codex/guest-scene-output-ownership


📝 Commits (1)

  • ab3eb20 Reserve synthetic guest scene output before writing reports

📊 Changes

2 files changed (+28 additions, -2 deletions)

View changed files

📝 scripts/run_guest_scene.py (+3 -2)
📝 tests/test_guest_scene_reference.py (+25 -0)

📄 Description

Claimed in the coordination issue as: GUEST-SCENE-OUTPUT-OWNERSHIP

What and why

Two invocations can both see an empty --out during argument parsing. When the second invocation sees the first run's logs/ during setup, it can write a failure report into the shared directory. The active invocation then fails when it tries to publish its own report.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.py passed all 7 tests. The new regression fails before the fix because the competing run creates report.json.
  • python -I tests/test_dev_guest_scene.py passed all 4 tests.
  • A separate two-process repro let both invocations pass the real argument check before either entered execute(). On 9e7720c9e, the second invocation wrote the report and the active invocation raised FileExistsError. With the patch, the second invocation returned 1 and the active invocation recorded the synthetic loader's exit code 7.
  • git diff --check and 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

  • Based on current main.
  • One topic.
  • No game data, keys or decryption.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1958 **Author:** [@alexandersato0830](https://github.com/alexandersato0830) **Created:** 11/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/guest-scene-output-ownership` --- ### 📝 Commits (1) - [`ab3eb20`](https://github.com/ubiquitarianism/leonida/commit/ab3eb20e6d7663a004aaf953861afefb76cb38d6) Reserve synthetic guest scene output before writing reports ### 📊 Changes **2 files changed** (+28 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `scripts/run_guest_scene.py` (+3 -2) 📝 `tests/test_guest_scene_reference.py` (+25 -0) </details> ### 📄 Description Claimed in the coordination issue as: [GUEST-SCENE-OUTPUT-OWNERSHIP](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7168448353) ### What and why Two invocations can both see an empty `--out` during argument parsing. When the second invocation sees the first run's `logs/` during setup, it can write a failure report into the shared directory. The active invocation then fails when it tries to publish its own `report.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.py` passed all 7 tests. The new regression fails before the fix because the competing run creates `report.json`. - `python -I tests/test_dev_guest_scene.py` passed all 4 tests. - A separate two-process repro let both invocations pass the real argument check before either entered `execute()`. On `9e7720c9e`, the second invocation wrote the report and the active invocation raised `FileExistsError`. With the patch, the second invocation returned 1 and the active invocation recorded the synthetic loader's exit code 7. - `git diff --check` and 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 - [x] Based on current `main`. - [x] One topic. - [x] No game data, keys or decryption. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#1965
No description provided.