make_game: gta6rt.sh resolves a relative WINE before changing to the game folder (OLD-10028) #1233

Merged
IlyassRS3 merged 2 commits from upstream-pr/1233 into main 2026-11-29 00:53:57 +00:00
IlyassRS3 commented 2026-11-24 20:39:38 +00:00 (Migrated from github.com)

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


What changed

Carries forward old-pr/10028 (draft #296, original commit by @SkippySteve) rebased cleanly onto current main (2e026b03e), preserving the original author commit and adapting the new assertion for main's macOS physical-path comparison:

  1. Original commit (@SkippySteve):
    • make_game.py (wine_launcher): before cd "${game%.}", anchor any relative WINE path containing / (case ${WINE-} in /*) ;; */*) WINE=$PWD/$WINE ;; esac) against the caller's $PWD, leaving absolute paths and bare PATH names (e.g. wine) unchanged.
    • tests/test_make_game_platform.py: exercise a relative WINE="Proton 9.0/files/bin/wine" symlink from the caller's working directory.
  2. Follow-up commit (IlyassRS3):
    • tests/test_make_game_platform.py: compare real(self.game) and real(self.out) in the new assertion (matching main's real(...) helper in the same test) so the test also passes when TMPDIR is under a symlinked path such as macOS's /var/folders -> /private/var/folders.

Item ID

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

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_make_game_platform.py -v -> 46/46 OK (note: without the real(...) follow-up commit, TMPDIR=/var/tmp failed because /var/tmp resolves to /private/var/tmp)
  • python3 -I tests/test_make_game_platform.py -> 46/46 OK
  • Revert-source mutation check (reverting make_game.py to upstream/main while keeping tests/test_make_game_platform.py) -> FAILED (errors=1) with gta6rt.sh: ... /game/Proton 9.0/files/bin/wine: No such file or directory (exit 126); restoring the fix returns to 46/46 OK.
  • python3 -m compileall -q make_game.py tests/test_make_game_platform.py -> OK
  • python3 -I scripts/check_no_game_data.py make_game.py tests/test_make_game_platform.py -> OK
  • python3 -I tests/test_ci_registration.py -> 15/15 OK
  • python3 -I tests/test_text_write_line_endings.py -> 3/3 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, fixed macOS symlinked-TMPDIR assertion, and regression-verified with AI assistance; original commit by @SkippySteve preserved)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5479958626 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1233). Originally posted by [IlyassRS3](https://github.com/IlyassRS3) on 2026-11-24T20:39:38Z. --- ## What changed Carries forward `old-pr/10028` (draft #296, original commit by @SkippySteve) rebased cleanly onto current `main` (`2e026b03e`), preserving the original author commit and adapting the new assertion for `main`'s macOS physical-path comparison: 1. **Original commit (`@SkippySteve`)**: - `make_game.py` (`wine_launcher`): before `cd "${game%.}"`, anchor any relative `WINE` path containing `/` (`case ${WINE-} in /*) ;; */*) WINE=$PWD/$WINE ;; esac`) against the caller's `$PWD`, leaving absolute paths and bare `PATH` names (e.g. `wine`) unchanged. - `tests/test_make_game_platform.py`: exercise a relative `WINE="Proton 9.0/files/bin/wine"` symlink from the caller's working directory. 2. **Follow-up commit (`IlyassRS3`)**: - `tests/test_make_game_platform.py`: compare `real(self.game)` and `real(self.out)` in the new assertion (matching `main`'s `real(...)` helper in the same test) so the test also passes when `TMPDIR` is under a symlinked path such as macOS's `/var/folders -> /private/var/folders`. ## Item ID - Coordination issue #14 item: `OLD-10028` (carries forward `old-pr/10028` / draft #296, #17) - Depends on: none ## 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_make_game_platform.py -v` -> **46/46 OK** (note: without the `real(...)` follow-up commit, `TMPDIR=/var/tmp` failed because `/var/tmp` resolves to `/private/var/tmp`) - `python3 -I tests/test_make_game_platform.py` -> **46/46 OK** - Revert-source mutation check (reverting `make_game.py` to `upstream/main` while keeping `tests/test_make_game_platform.py`) -> **FAILED (errors=1)** with `gta6rt.sh: ... /game/Proton 9.0/files/bin/wine: No such file or directory` (exit 126); restoring the fix returns to 46/46 OK. - `python3 -m compileall -q make_game.py tests/test_make_game_platform.py` -> OK - `python3 -I scripts/check_no_game_data.py make_game.py tests/test_make_game_platform.py` -> OK - `python3 -I tests/test_ci_registration.py` -> **15/15 OK** - `python3 -I tests/test_text_write_line_endings.py` -> **3/3 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, fixed macOS symlinked-`TMPDIR` assertion, and regression-verified with AI assistance; original commit by @SkippySteve preserved)
copilot-pull-request-reviewer[bot] commented 2026-11-24 20:39:53 +00:00 (Migrated from github.com)

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

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:6047043855 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1233#pullrequestreview-6047043855). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-11-24T20:39:53Z. **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.
zmasi commented 2026-11-29 00:28:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T00:28:54Z.


#1233 | head bb2cd5a9e2 (merged cleanly onto origin/main 48bae6cade) | Windows 11 (10.0.26200.9974), Python 3.12.10, Git Bash | AI-assisted: yes

Independent Verification (Windows 11)

  • Diff & safety audit: Inspected 100% of the diff (+14/-0 across make_game.py and tests/test_make_game_platform.py). python -I scripts/check_no_game_data.py make_game.py tests/test_make_game_platform.py passed (rc=0).
  • Red -> Green on Windows 11 (origin/main 48bae6cade vs #1233 + origin/main):
    • Red (origin/main): Generated gta6rt.sh via make_game.runtime(...) with spaces in caller, game, and output folder names and ran sh gta6rt.sh --dry-run from the caller folder with WINE="Proton 9.0/files/bin/wine" -> exited 127 (.../game dir/Proton 9.0/files/bin/wine: No such file or directory) because cd "${game%.}" ran before resolving relative $WINE.
    • Green (#1233 + origin/main): The case ${WINE-} guard (/*) ;; */*) WINE=$PWD/$WINE ;;) resolves relative paths containing / against caller $PWD prior to cd "${game%.}" while leaving absolute paths (/*) and bare PATH command names (wine) unchanged -> sh gta6rt.sh --dry-run exited 0 with CWD in the game folder and expected --dry-run ./fake_title.exe --overlay ... arguments.
  • Test suites run on Windows 11:
    • python -I tests/test_make_game_platform.py -> 48 ran, OK (skipped=4)
    • python -I tests/test_make_game_argparse.py -> 38/38 passed (OK).
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248141691 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1233#issuecomment-7248141691). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T00:28:54Z. --- #1233 | head bb2cd5a9e2e6730dc2b6a5abde0f882fa52ea218 (merged cleanly onto origin/main 48bae6cade) | Windows 11 (10.0.26200.9974), Python 3.12.10, Git Bash | AI-assisted: yes ### Independent Verification (Windows 11) - **Diff & safety audit**: Inspected 100% of the diff (`+14/-0` across `make_game.py` and `tests/test_make_game_platform.py`). `python -I scripts/check_no_game_data.py make_game.py tests/test_make_game_platform.py` passed (`rc=0`). - **Red -> Green on Windows 11 (`origin/main` `48bae6cade` vs `#1233 + origin/main`)**: - **Red (`origin/main`)**: Generated `gta6rt.sh` via `make_game.runtime(...)` with spaces in caller, game, and output folder names and ran `sh gta6rt.sh --dry-run` from the caller folder with `WINE="Proton 9.0/files/bin/wine"` -> exited `127` (`.../game dir/Proton 9.0/files/bin/wine: No such file or directory`) because `cd "${game%.}"` ran before resolving relative `$WINE`. - **Green (`#1233 + origin/main`)**: The `case ${WINE-}` guard (`/*) ;; */*) WINE=$PWD/$WINE ;;`) resolves relative paths containing `/` against caller `$PWD` prior to `cd "${game%.}"` while leaving absolute paths (`/*`) and bare `PATH` command names (`wine`) unchanged -> `sh gta6rt.sh --dry-run` exited `0` with `CWD` in the game folder and expected `--dry-run ./fake_title.exe --overlay ...` arguments. - **Test suites run on Windows 11**: - `python -I tests/test_make_game_platform.py` -> `48 ran, OK (skipped=4)` - `python -I tests/test_make_game_argparse.py` -> `38/38` passed (`OK`).
enlight3d commented 2026-11-29 00:44:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T00:44:41Z.


Independent run of #1233 (python -I, no build, no game; GPU not used).

  • PR head: bb2cd5a9e2
  • main: 829530dbd0 (PR merged into it locally with git merge --no-ff, clean, make_game.py and tests/test_make_game_platform.py only)
  • Machine: Windows 11 Pro 10.0.26300, CPython 3.13.12 for the Windows runs. The changed assertion sits in a test that is skipped on Windows (skipIf(os.name == "nt", "executes the generated POSIX launcher")), so that test was also run in WSL2 Ubuntu (Linux 5.15, CPython 3.12.3, python3 -I) on a copy of each tree.

Commands: python -I tests/test_make_game_platform.py (Windows, then the same under WSL), plus the 46 other test files that mention make_game and test_ci_registration.py, test_text_write_line_endings.py, test_tool_stdout_encoding.py, test_check_no_game_data.py, test_docs_cli_flags.py, test_docs_env_vars.py, one process each.

  • Red (WSL only): with make_game.py reverted (to main, merged tree; and to the merge-base, head tree) and the test kept: test_wine_first_boot_uses_the_packaged_game_and_shader_paths errors, the generated launcher exits 127 (command not found, the relative WINE is resolved from the game folder). 1 error, 46 or 48 tests run. On native Windows there is no red, the test is skipped there.
  • Green at head: Windows 46 run, OK (2 skipped); WSL 46 run, OK.
  • Green merged into main: Windows 48 run, OK (4 skipped); WSL 48 run, OK. Plain main in WSL: 48 run, OK.
  • Merged vs plain main, all 48 files on Windows: same results. Failing on both, so pre-existing: test_make_game_pipelines.py (3), test_make_game_preflight.py (1), test_progress_dashboard.py (1), test_tool_stdout_encoding.py (1), test_docs_cli_flags.py (1). Nothing new fails merged.
  • The PR adds no test method (a new block inside an existing one), so a native Windows run cannot show the fix; it needs a POSIX shell.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248321397 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1233#issuecomment-7248321397). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T00:44:41Z. --- Independent run of #1233 (python -I, no build, no game; GPU not used). - PR head: bb2cd5a9e2e6730dc2b6a5abde0f882fa52ea218 - main: 829530dbd0196aa817dbec74aaafc79407b94b57 (PR merged into it locally with `git merge --no-ff`, clean, `make_game.py` and `tests/test_make_game_platform.py` only) - Machine: Windows 11 Pro 10.0.26300, CPython 3.13.12 for the Windows runs. The changed assertion sits in a test that is skipped on Windows (`skipIf(os.name == "nt", "executes the generated POSIX launcher")`), so that test was also run in WSL2 Ubuntu (Linux 5.15, CPython 3.12.3, `python3 -I`) on a copy of each tree. Commands: `python -I tests/test_make_game_platform.py` (Windows, then the same under WSL), plus the 46 other test files that mention `make_game` and `test_ci_registration.py`, `test_text_write_line_endings.py`, `test_tool_stdout_encoding.py`, `test_check_no_game_data.py`, `test_docs_cli_flags.py`, `test_docs_env_vars.py`, one process each. - Red (WSL only): with `make_game.py` reverted (to main, merged tree; and to the merge-base, head tree) and the test kept: `test_wine_first_boot_uses_the_packaged_game_and_shader_paths` errors, the generated launcher exits 127 (command not found, the relative WINE is resolved from the game folder). 1 error, 46 or 48 tests run. On native Windows there is no red, the test is skipped there. - Green at head: Windows 46 run, OK (2 skipped); WSL 46 run, OK. - Green merged into main: Windows 48 run, OK (4 skipped); WSL 48 run, OK. Plain main in WSL: 48 run, OK. - Merged vs plain main, all 48 files on Windows: same results. Failing on both, so pre-existing: `test_make_game_pipelines.py` (3), `test_make_game_preflight.py` (1), `test_progress_dashboard.py` (1), `test_tool_stdout_encoding.py` (1), `test_docs_cli_flags.py` (1). Nothing new fails merged. - The PR adds no test method (a new block inside an existing one), so a native Windows run cannot show the fix; it needs a POSIX shell.
MoonEyes commented 2026-11-29 00:53:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T00:53:59Z.


Merged after enlight3d's red/green check (check) (RTX 3090, driver 621.40, Windows 11) and a local re-check here. Merged after local re-verification: this PR merged onto main 87a39df94 without conflict, and its test file(s) (tests/test_make_game_platform.py) pass there. Earlier today the same tests failed on main without the PR (red/green) and a bundle with other open PRs showed no new failures. check_no_game_data.py is clean. Windows 11, Python 3.14; no GPU needed for these tests.

AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248428236 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1233#issuecomment-7248428236). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T00:53:59Z. --- Merged after **enlight3d**'s red/green check ([check](https://github.com/ProjectLeonida/mandy/pull/1233#issuecomment-7248321397)) (RTX 3090, driver 621.40, Windows 11) and a local re-check here. Merged after local re-verification: this PR merged onto `main` 87a39df94 without conflict, and its test file(s) (`tests/test_make_game_platform.py`) pass there. Earlier today the same tests failed on `main` without the PR (red/green) and a bundle with other open PRs showed no new failures. `check_no_game_data.py` is clean. Windows 11, Python 3.14; no GPU needed for these tests. _AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes._
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!1233
No description provided.