run_wine_session: initialize and stop the prefix with $WINE (OLD-9952) #1241

Merged
IlyassRS3 merged 1 commit from upstream-pr/1241 into main 2026-11-28 19:35:57 +00:00
IlyassRS3 commented 2026-11-24 20:43:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by IlyassRS3 on 2026-11-24T20:43:31Z.


What changed

Carries forward old-pr/9952 (draft #221, original commit by @SkippySteve) rebased cleanly onto current main (2e026b03e), preserving the original author commit.

  • scripts/run_wine_session.sh: resolve $WINE (default wine) via command -v (reporting missing Wine with exit status 127), run "$wine_path" wineboot --init instead of bare wineboot, and shut down the prefix with $WINESERVER, else the sibling wineserver next to $wine_path, else wineserver on PATH.
  • docs/testing.md: document $WINE / sibling wineserver / $WINESERVER prefix handling for Proton and UMU-Proton builds without a system Wine.
  • tests/test_run_wine_session.py: add 4 unit tests covering Proton $WINE + sibling wineserver, default wine on PATH, $WINESERVER override + PATH fallback, and missing $WINE exit 127 reporting.

Item ID

  • Coordination issue #14 item: OLD-9952 (carries forward old-pr/9952 / draft #221, #17)
  • Depends on: none

Verification

Tested on macOS 27.2.1 (Apple M5 arm64), Python 3.14, bash + /usr/bin/timeout (no game files, no GPU, standard library only):

  • TMPDIR=/var/tmp python3 -I tests/test_run_wine_session.py -v -> 4/4 OK
  • Revert-source mutation check (reverting scripts/run_wine_session.sh to upstream/main while keeping tests/test_run_wine_session.py) -> FAILED (failures=4) (all 4 tests fail); restoring the fix returns to 4/4 OK.
  • All 12 tests/test_docs_*.py suites -> all OK
  • python3 -I tests/test_ci_registration.py -> 15/15 OK (new test file selected by CI stdlib loop)
  • python3 -I tests/test_text_write_line_endings.py -> 3/3 OK
  • python3 -m compileall -q tests/test_run_wine_session.py -> OK
  • python3 -I scripts/check_no_game_data.py docs/testing.md scripts/run_wine_session.sh tests/test_run_wine_session.py -> OK

Checklist

  • No game files, binaries, shaders, textures, audio, or logs quoting them
  • No keys, decryption, or online services
  • Claimed in the coordination issue (#14) before opening this PR
  • AI-assisted: yes (carried forward, audited, rebased, and regression-verified with AI assistance; original commit by @SkippySteve preserved)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5480010412 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1241). Originally posted by [IlyassRS3](https://github.com/IlyassRS3) on 2026-11-24T20:43:31Z. --- ## What changed Carries forward `old-pr/9952` (draft #221, original commit by @SkippySteve) rebased cleanly onto current `main` (`2e026b03e`), preserving the original author commit. - `scripts/run_wine_session.sh`: resolve `$WINE` (default `wine`) via `command -v` (reporting missing Wine with exit status 127), run `"$wine_path" wineboot --init` instead of bare `wineboot`, and shut down the prefix with `$WINESERVER`, else the sibling `wineserver` next to `$wine_path`, else `wineserver` on `PATH`. - `docs/testing.md`: document `$WINE` / sibling `wineserver` / `$WINESERVER` prefix handling for Proton and UMU-Proton builds without a system Wine. - `tests/test_run_wine_session.py`: add 4 unit tests covering Proton `$WINE` + sibling `wineserver`, default `wine` on `PATH`, `$WINESERVER` override + `PATH` fallback, and missing `$WINE` exit 127 reporting. ## Item ID - Coordination issue #14 item: `OLD-9952` (carries forward `old-pr/9952` / draft #221, #17) - Depends on: none ## Verification Tested on macOS 27.2.1 (Apple M5 arm64), Python 3.14, bash + `/usr/bin/timeout` (no game files, no GPU, standard library only): - `TMPDIR=/var/tmp python3 -I tests/test_run_wine_session.py -v` -> **4/4 OK** - Revert-source mutation check (reverting `scripts/run_wine_session.sh` to `upstream/main` while keeping `tests/test_run_wine_session.py`) -> **FAILED (failures=4)** (all 4 tests fail); restoring the fix returns to **4/4 OK**. - All 12 `tests/test_docs_*.py` suites -> **all OK** - `python3 -I tests/test_ci_registration.py` -> **15/15 OK** (new test file selected by CI stdlib loop) - `python3 -I tests/test_text_write_line_endings.py` -> **3/3 OK** - `python3 -m compileall -q tests/test_run_wine_session.py` -> OK - `python3 -I scripts/check_no_game_data.py docs/testing.md scripts/run_wine_session.sh tests/test_run_wine_session.py` -> OK ## Checklist - [x] No game files, binaries, shaders, textures, audio, or logs quoting them - [x] No keys, decryption, or online services - [x] Claimed in the coordination issue (#14) before opening this PR - [x] AI-assisted: yes (carried forward, audited, rebased, and regression-verified with AI assistance; original commit by @SkippySteve preserved)
copilot-pull-request-reviewer[bot] commented 2026-11-24 20:43:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-24T20:43:41Z.

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.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6047092254 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1241#pullrequestreview-6047092254). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-11-24T20:43:41Z. **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.
MoonEyes commented 2026-11-28 19:35:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T19:35:54Z.


Red/green: tests/test_run_wine_session.py fails 4 assertions on main (the prefix is started and stopped with the PATH wine/wineserver, not $WINE) and passes with the PR (Linux cloud run on main 7daa4a4; skipped 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)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7244664294 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1241#issuecomment-7244664294). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T19:35:54Z. --- Red/green: tests/test_run_wine_session.py fails 4 assertions on main (the prefix is started and stopped with the PATH wine/wineserver, not $WINE) and passes with the PR (Linux cloud run on main 7daa4a4; skipped 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)
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
ProjectLeonida/mandy!1241
No description provided.