run_guest_scene: take the Wine from $WINE when --wine is not given (OLD-10047) #1239
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!1239
Loading…
Reference in a new issue
No description provided.
Delete branch "carry/old-10047-run-guest-scene-wine"
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
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
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).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.
Verified by OreoFR
5cb45921e+ PR headdf763ce9fpython -I tests/test_run_guest_scene_wine.pyAI-assisted (Claude Code, Claude Opus 5.5).
#1239 | head df763ce9fbf1e4b4e3fc59391385286ebd7847ab (merged cleanly onto origin/main 818d881b1f) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes
Independent 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.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.
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).
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
main35159222a without 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.