Scripts: preserve trailing backslashes in native smoke paths #2721

Open
github-bot wants to merge 1 commit from github-bot/gh-2721 into main AGit
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 08:26 UTC · original
luckyteagirl:codex/smoke-native-game-quoting → main · +40 −1 · 2 files · 1 commits · draft

For a native xcl.exe launcher, scripts/smoke.ps1 constructs a quoted run argument. If the -Game path ends in a backslash, that backslash escapes the closing quote in Windows argument parsing: the executable receives a trailing " instead of the requested path. Double only the terminal backslashes before the closing quote.

What is in it

  • scripts/smoke.ps1: escape terminal backslashes in the native .exe argument path; keep the separate .cmd/.bat launch path intact.
  • scripts/smoke-native-arguments.tests.ps1: use a real Python executable as a synthetic launcher and check the exact received path for zero, one, and two terminal backslashes and a drive root.

Tested

  • Windows 11 Home build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M (driver 30.0.13002.13003), Rust 1.99.0 MSVC, Python 3.11.9; PowerShell 5.1.26100 and 7.6.9. The synthetic tests do not use the GPU.
  • Failing-first native launcher fixture on the parent commit: one terminal slash and a drive root were received as a trailing quote, and two terminal slashes were received as one, in both PowerShell versions.
  • powershell.exe -NoProfile -File .\scripts\smoke-native-arguments.tests.ps1 and pwsh.exe -NoProfile -File .\scripts\smoke-native-arguments.tests.ps1: both passed on this head.
  • scripts/test-smoke-artifacts.tests.ps1 and scripts/smoke-title.tests.ps1: each passed in both PowerShell versions (six focused invocations passed in total).
  • git diff HEAD^ HEAD --check: passed.

Not tested

  • The workspace GPU suite or a retail-title smoke for this script-only change. The new native-argument fixture requires Python on PATH.

AI use

  • OpenAI Codex (GPT-6.2 Sol) reproduced the native argument issue, implemented the fix and fixture, and ran the PowerShell checks. OpenAI Codex (GPT-6.2 Astra) reviewed the diff and reran all six focused invocations; a second GPT-6.2 Sol agent checked the quoting and interaction with #2714/#2716.
**@⁠luckyteagirl** on GitHub · 2026-11-26 08:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/2721) `luckyteagirl:codex/smoke-native-game-quoting` → `main` · +40 −1 · 2 files · 1 commits · draft For a native `xcl.exe` launcher, `scripts/smoke.ps1` constructs a quoted `run` argument. If the `-Game` path ends in a backslash, that backslash escapes the closing quote in Windows argument parsing: the executable receives a trailing `"` instead of the requested path. Double only the terminal backslashes before the closing quote. **What is in it** - `scripts/smoke.ps1`: escape terminal backslashes in the native `.exe` argument path; keep the separate `.cmd`/`.bat` launch path intact. - `scripts/smoke-native-arguments.tests.ps1`: use a real Python executable as a synthetic launcher and check the exact received path for zero, one, and two terminal backslashes and a drive root. **Tested** - Windows 11 Home build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M (driver 30.0.13002.13003), Rust 1.99.0 MSVC, Python 3.11.9; PowerShell 5.1.26100 and 7.6.9. The synthetic tests do not use the GPU. - Failing-first native launcher fixture on the parent commit: one terminal slash and a drive root were received as a trailing quote, and two terminal slashes were received as one, in both PowerShell versions. - `powershell.exe -NoProfile -File .\scripts\smoke-native-arguments.tests.ps1` and `pwsh.exe -NoProfile -File .\scripts\smoke-native-arguments.tests.ps1`: both passed on this head. - `scripts/test-smoke-artifacts.tests.ps1` and `scripts/smoke-title.tests.ps1`: each passed in both PowerShell versions (six focused invocations passed in total). - `git diff HEAD^ HEAD --check`: passed. **Not tested** - The workspace GPU suite or a retail-title smoke for this script-only change. The new native-argument fixture requires Python on `PATH`. **AI use** - OpenAI Codex (GPT-6.2 Sol) reproduced the native argument issue, implemented the fix and fixture, and ran the PowerShell checks. OpenAI Codex (GPT-6.2 Astra) reviewed the diff and reran all six focused invocations; a second GPT-6.2 Sol agent checked the quoting and interaction with #2714/#2716.
Escape terminal backslashes before the closing quote for the native launcher. Verify what a real executable receives for paths with spaces and a drive root.

Assisted-by: OpenAI Codex (GPT-6.2 Sol)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:29:26 +00:00
Author
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-26 08:42 UTC · original

I’ll compare native argument delivery here with #588, then exercise how it combines with #2684 when PowerShell’s working location differs from the process directory. The native stand-in will record its actual argv without accessing the game paths.

Target 18d6817af3786fa8570c8c8a0fe56c54ae4a6f14. OpenAI Codex (GPT-6) will run these synthetic Windows checks.

**@⁠RavenCurseBurg** on GitHub · 2026-11-26 08:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/2721#issuecomment-7186916704) I’ll compare native argument delivery here with #588, then exercise how it combines with #2684 when PowerShell’s working location differs from the process directory. The native stand-in will record its actual argv without accessing the game paths. Target `18d6817af3786fa8570c8c8a0fe56c54ae4a6f14`. OpenAI Codex (GPT-6) will run these synthetic Windows checks.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2721/head:github-bot/gh-2721'
git switch 'github-bot/gh-2721'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2721'
git switch 'github-bot/gh-2721'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2721'
git switch 'github-bot/gh-2721'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2721'
git switch 'main'
git merge --squash 'github-bot/gh-2721'
git switch 'main'
git merge --ff-only 'github-bot/gh-2721'
git switch 'main'
git merge 'github-bot/gh-2721'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.