run_guest_scene: take the Wine from $WINE when --wine is not given (OLD-10047) #1239
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1239"
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 IlyassRS3 on 2026-11-24T20:42:04Z.
What changed
Carries forward
old-pr/10047(draft #313, original commit by @SkippySteve) rebased cleanly ontomain(2e026b03e), preserving the original author commit and adding a follow-up fix for native Windows:@SkippySteve):scripts/run_guest_scene.py: default--wineto$WINEwhen--wineis omitted (blank counts as unset;--winestill overrides), include the missing binary path in--wine: not found: ..., and update CLI/docstring messages.tests/test_run_guest_scene_wine.py: 5 unit tests covering$WINEpickup,--wine-argwith$WINE,--wineoverriding$WINE, missing/empty$WINErefusal outside Windows, and nonexistent$WINEreporting.df763ce9f, addressing @xel1uz's review):scripts/run_guest_scene.py: only read$WINEas the default outside Windows (os.name != "nt"), qualify the docstring /--winehelp text (default: $WINE outside Windows), and keep--wine-arg requires --wineon Windows.tests/test_run_guest_scene_wine.py: addRunGuestSceneWindowsEnvTest(3 tests, runs on every platform via aSimpleNamespacestub onrunner.os) confirming ambientWINE(existing or missing) is ignored on Windows, explicit--winestill works, and--wine-argrequires explicit--wine.Item ID
OLD-10047(carries forwardold-pr/10047/ draft #313, #17)Verification
Tested on macOS 27.2.1 (Apple M5 arm64), Python 3.14 (no game files, no GPU, standard library only):
TMPDIR=/var/tmp python3 -I tests/test_run_guest_scene_wine.py -v-> 8/8 OK (5 POSIX + 3 Windows-mode tests)python3 -I tests/test_guest_scene_reference.py -v-> 6/6 OKHEAD~1(without the Windows guard) -> FAILED (3 failures) across all 3 Windows ambient-WINEchecks; mutation check vsmain-> FAILED (3 failures, 2 errors); restoringHEADreturns to 8/8 OK.python3 -m compileall -q scripts/run_guest_scene.py tests/test_run_guest_scene_wine.py-> OKpython3 -I scripts/check_no_game_data.py scripts/run_guest_scene.py tests/test_run_guest_scene_wine.py-> OKpython3 -I tests/test_ci_registration.py-> 15/15 OKpython3 -I tests/test_text_write_line_endings.py-> 3/3 OKChecklist
Imported from ubiquitarianism/leonida. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-24T20:42:13Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from ubiquitarianism/leonida. Originally posted by xel1uz on 2026-11-24T20:48:19Z.
Review: CHANGES_REQUESTED
The Linux precedence cases pass, but on native Windows an ambient
WINEnow changes a launch even when the caller omits--wine. With a missing binary the parser exits 2; with an existing one, the guest path builder prefixes an already native drive path withZ:. All five new Wine tests skip on Windows.The inline change restored native paths in the Windows check while preserving the five Wine tests and six reference tests on Ubuntu. Please add a native-Windows regression case and qualify the CLI help accordingly. The original Wine change is draft #313; the description currently points to #312. AI-assisted review, CPU only.
Imported from ubiquitarianism/leonida. Originally posted by xel1uz on 2026-11-24T20:48:19Z.
Code review location:
scripts/run_guest_scene.py; line 329Read the environment default on hosts that use Wine for the guest. An explicit
--winestill takes precedence.Imported from ubiquitarianism/leonida. Originally posted by IlyassRS3 on 2026-11-24T21:00:27Z.
Thank you for catching that, @xel1uz! Pushed follow-up commit
df763ce9f(preserving @SkippySteve's original commit):$WINEdefault toos.name != "nt", updated the docstring and--winehelp text (default: $WINE outside Windows), and kept--wine-arg requires --wineon Windows.RunGuestSceneWindowsEnvTest(3 tests, runs on both POSIX and Windows via aSimpleNamespacestub forrunner.os) verifying that ambientWINE(existing or missing) is ignored on Windows, explicit--winestill takes precedence, and--wine-argrequires explicit--wine(verified 3 failures againstHEAD~1, 8/8 OK onHEAD).#313).Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-25T05:33:31Z.
Review: COMMENTED
Rechecked the follow-up at
df763ce9on native Windows and Ubuntu under WSL. With the same inheritedWINEpointing to a missing path and no explicit flag, the first PR head exited 2 on native Windows and the follow-up left the native launch selected. The three Windows cases passed, and all eight tests passed under Ubuntu. A separate CLI run on Ubuntu launched a synthetic wrapper from a relativeWINEpath containing spaces, forwarded--wine-arg, and preserved an explicit--wineoverride. The wrapper was launched after the runner switched into its output overlay.AI-assisted review. CPU-only checks with synthetic inputs and launchers.
Imported from ubiquitarianism/leonida. Originally posted by xel1uz on 2026-11-25T19:35:16Z.
Review: APPROVED
Approving
df763ce9: the follow-up resolves what I requested.WINEset to a missing path, no--wine):tests/test_run_guest_scene_wine.py8 tests OK (the 3 Windows-mode cases pass, the 5 POSIX cases skip),tests/test_guest_scene_reference.py6/6 OK.scripts/run_guest_scene.pyfrom the first head (f3cd82af), the 3 Windows-mode cases fail.main(merges without conflicts).AI-assisted review, CPU only.
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:48:12Z.
Verified by OreoFR
5cb45921e+ PR headdf763ce9fpython -I tests/test_run_guest_scene_wine.pyAI-assisted (Claude Code, Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T01:12:20Z.
#1239 | head
df763ce9fb(merged cleanly onto origin/main818d881b1f) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yesIndependent Verification (Windows 11)
scripts/run_guest_scene.pyandtests/test_run_guest_scene_wine.py.python -I scripts/check_no_game_data.py scripts/run_guest_scene.py tests/test_run_guest_scene_wine.pypassed (rc=0).os.name == "nt") verification:python -I tests/test_run_guest_scene_wine.py->8 ran, OK (skipped=5)(RunGuestSceneWindowsEnvTest3/3 passed; POSIX-onlyRunGuestSceneWineTest5/5 skipped cleanly onnt).parse_args()check: Executedscripts/run_guest_scene.py'sparse_args()directly on Windows 11 (os.name == "nt", without mockingos) withWINEset inos.environto a nonexistent.exe->args.wine is None, confirming an ambientWINEenvironment variable cannot hijack or break native Windows launches while explicit--wine <path>still resolves as expected.Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T01:26:09Z.
Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, main
53b77df14: red 3 failures + 2 errors (test_wine_from_environment, test_wine_args_with_wine_from_environment, test_wine_from_environment_that_does_not_exist, test_missing_wine_still_refused_outside_windows x2 subtests) / green 8 OK.df763ce9f,python -I tests/test_run_guest_scene_wine.py.$WINEis not read (AttributeError: 'int' object has no attribute 'wine') and the error says--wine is required outside Windowswhere the tests expect--wine (or WINE) is required outside Windows/--wine: not found. MEASURED, 3 runs, 3/3 fail.Red = main + only the test file from this PR (
git checkout pr-N -- <test>); green = main +git merge --no-ffof this PR, no conflict. Green runs more tests than red because the merge keeps the tests main added to this file since the PR branched; that is the method, not a finding.AI-assisted: Claude Code (Claude Opus 5.5).
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T01:32:30Z.
Merged after OreoFR's red/green check (check) (macOS 27.2.1, Apple M5, APFS case-insensitive, Python 3.12) and a local re-check here. Merged after local re-verification: this PR merged onto
main35159222awithout conflict, and its test file(s) (tests/test_run_guest_scene_wine.py) pass there. Earlier today the same tests failed onmainwithout the PR (red/green) and a bundle with other open PRs showed no new failures.check_no_game_data.pyis clean. Windows 11, Python 3.14; no GPU needed for these tests.AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.