Resolve relative game path in smoke runs #2674

Merged
luckyteagirl merged 1 commit from upstream-pr/2684 into main 2026-12-03 05:53:39 +00:00
luckyteagirl commented 2026-11-26 06:12:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T06:12:12Z.


smoke.ps1 passes -Game to a native launcher. When the caller has changed PowerShell's location, a relative game path can resolve differently in the child, and the same folder can get a different title hash.

What is in it

  • Resolve relative -Game paths against the caller's PowerShell location before computing the title hash and launching XCL.
  • Add a stand-in launcher fixture for a path with spaces and for -Game ..

Tested

  • The focused fixture failed on main b49be183 and passed at this patch on Windows PowerShell 5.1 and PowerShell 7. Absolute, relative, and . forms of the same folder produced the same title hash.
  • The existing smoke title and artifact fixtures passed on both shells.
  • Combined cleanly with open #2672, which resolves relative -Xcl; both focused fixtures and a temporary case with both arguments relative passed on both shells.
  • git diff --check passed.

Regression run

  • Not applicable. The change affects only the smoke script and uses a stand-in launcher.

Not tested

  • A retail title, native xcl.exe, or GPU tests.

AI use

  • Codex (GPT-6.2 Sol) implemented and reviewed the fix and ran the PowerShell fixtures.
<!-- greyfinch-sync:ivall/xcl:issue:5505001866 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2684). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T06:12:12Z. --- `smoke.ps1` passes `-Game` to a native launcher. When the caller has changed PowerShell's location, a relative game path can resolve differently in the child, and the same folder can get a different title hash. **What is in it** - Resolve relative `-Game` paths against the caller's PowerShell location before computing the title hash and launching XCL. - Add a stand-in launcher fixture for a path with spaces and for `-Game .`. **Tested** - The focused fixture failed on main `b49be183` and passed at this patch on Windows PowerShell 5.1 and PowerShell 7. Absolute, relative, and `.` forms of the same folder produced the same title hash. - The existing smoke title and artifact fixtures passed on both shells. - Combined cleanly with open #2672, which resolves relative `-Xcl`; both focused fixtures and a temporary case with both arguments relative passed on both shells. - `git diff --check` passed. **Regression run** - Not applicable. The change affects only the smoke script and uses a stand-in launcher. **Not tested** - A retail title, native `xcl.exe`, or GPU tests. **AI use** - Codex (GPT-6.2 Sol) implemented and reviewed the fix and ran the PowerShell fixtures.
luckyteagirl commented 2026-11-27 05:26:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-27T05:26:35Z.

Review: COMMENTED


On a9d11d6c6f85367c10c77e3b5275987405b50904, the new relative-path resolution turns -Game . into a drive-root path when the caller is at that root (for example C:\). The unchanged native argument assembly then appends run "C:\"; under Windows command-line parsing, that trailing backslash escapes the closing quote, so XCL receives C:" rather than the root path. A small native argv probe using this exact resolution/assembly reproduced the difference: base-style . arrives as ., while the new resolved root arrives with an extra quote. Could this PR include the trailing-backslash escaping from #2721, or land after that fix, and add a native -Game . fixture from a drive root? The .cmd-only fixture does not exercise this native path. This is a CPU-only argument probe, not a title run.

AI use: OpenAI Codex (GPT-6.2 Sol) found and probed the interaction; OpenAI Codex (GPT-6.2 Astra) checked the current source and drafted this review.

<!-- greyfinch-sync:ivall/xcl:review:6083855074 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2684#pullrequestreview-6083855074). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-27T05:26:35Z. **Review:** COMMENTED --- On `a9d11d6c6f85367c10c77e3b5275987405b50904`, the new relative-path resolution turns `-Game .` into a drive-root path when the caller is at that root (for example `C:\`). The unchanged native argument assembly then appends `run "C:\"`; under Windows command-line parsing, that trailing backslash escapes the closing quote, so XCL receives `C:"` rather than the root path. A small native argv probe using this exact resolution/assembly reproduced the difference: base-style `.` arrives as `.`, while the new resolved root arrives with an extra quote. Could this PR include the trailing-backslash escaping from #2721, or land after that fix, and add a native `-Game .` fixture from a drive root? The `.cmd`-only fixture does not exercise this native path. This is a CPU-only argument probe, not a title run. AI use: OpenAI Codex (GPT-6.2 Sol) found and probed the interaction; OpenAI Codex (GPT-6.2 Astra) checked the current source and drafted this review.
Foniass commented 2026-12-01 08:42:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:42:40Z.


Triage (#1607) – head a9d11d6

#2672 resolves a relative -Xcl path in the same script; this PR resolves a relative -Game, which is a different parameter, so the two are complementary, not duplicates (#2667 shares only test-fixture lines). Resolving -Game before the title hash also makes -Game . hash the folder name instead of .. No problems found in the diff.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7305676565 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2684#issuecomment-7305676565). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:42:40Z. --- **Triage (#1607)** – head a9d11d6 #2672 resolves a relative `-Xcl` path in the same script; this PR resolves a relative `-Game`, which is a different parameter, so the two are complementary, not duplicates (#2667 shares only test-fixture lines). Resolving `-Game` before the title hash also makes `-Game .` hash the folder name instead of `.`. No problems found in the diff. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Decodere commented 2026-12-02 09:14:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T09:14:37Z.


merge-check
base: 1c8b551475
head: a9d11d6c6f
merge: clean (git merge --no-edit onto 1c8b5514, git diff --check clean; scripts/smoke.ps1 +5, scripts/test-smoke-relative-game.tests.ps1 +38)
build: not run (Tier 0 PowerShell script diff touching only scripts/; no Rust code changed)
tests: Windows PowerShell 5.1 (5.1.26100.8457): scripts/test-smoke-relative-game.tests.ps1 -> ok (smoke-relative-game: ok); other passing scripts (perf-compare.tests.ps1, perf-run.tests.ps1, smoke-title.tests.ps1, test-smoke-artifacts.tests.ps1) -> 4/4 ok. test-native-stderr.tests.ps1 fails with exit 127 identically on clean base 1c8b5514 (pre-existing mock cargo.cmd mismatch with cargo bench in scripts/test.ps1). Rust workspace tests not run (Tier 0); PowerShell 7 not installed here.
review: Read the full merged diff (scripts/smoke.ps1:24-27, scripts/test-smoke-relative-game.tests.ps1). Resolving non-rooted -Game paths via $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Game) before the title-hash computation and child launch ensures both the title: SHA-256 leaf hash (including -Game '.') and the native child process receive the real directory path relative to PowerShell's current location. The new test verifies consistent title hashes and clean runs for absolute, relative with spaces, and . paths. Clean, minimal, no regressions.
performance: none (script-only change in scripts/; zero runtime impact)
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Windows PowerShell 5.1.26100.8457, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)

<!-- greyfinch-sync:ivall/xcl:comment:7340592135 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2684#issuecomment-7340592135). Originally posted by [Decodere](https://github.com/Decodere) on 2026-12-02T09:14:37Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: a9d11d6c6f85367c10c77e3b5275987405b50904 merge: clean (`git merge --no-edit` onto `1c8b5514`, `git diff --check` clean; `scripts/smoke.ps1` +5, `scripts/test-smoke-relative-game.tests.ps1` +38) build: not run (Tier 0 PowerShell script diff touching only `scripts/`; no Rust code changed) tests: Windows PowerShell 5.1 (`5.1.26100.8457`): `scripts/test-smoke-relative-game.tests.ps1` -> ok (`smoke-relative-game: ok`); other passing scripts (`perf-compare.tests.ps1`, `perf-run.tests.ps1`, `smoke-title.tests.ps1`, `test-smoke-artifacts.tests.ps1`) -> 4/4 ok. `test-native-stderr.tests.ps1` fails with exit 127 identically on clean base `1c8b5514` (pre-existing mock `cargo.cmd` mismatch with `cargo bench` in `scripts/test.ps1`). Rust workspace tests not run (Tier 0); PowerShell 7 not installed here. review: Read the full merged diff (`scripts/smoke.ps1:24-27`, `scripts/test-smoke-relative-game.tests.ps1`). Resolving non-rooted `-Game` paths via `$ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Game)` before the title-hash computation and child launch ensures both the `title:` SHA-256 leaf hash (including `-Game '.'`) and the native child process receive the real directory path relative to PowerShell's current location. The new test verifies consistent title hashes and clean runs for absolute, relative with spaces, and `.` paths. Clean, minimal, no regressions. performance: none (script-only change in `scripts/`; zero runtime impact) verdict: safe to merge hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Windows PowerShell 5.1.26100.8457, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)
grathepic commented 2026-12-03 02:24:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by grathepic on 2026-12-03T02:24:35Z.


merge-check
base: 078358a058
head: a9d11d6c6f
merge: clean (git diff --check exit 0)
build: not needed (Tier 0 PowerShell script and test change; no Rust files touched)
tests: Windows PowerShell 5.1.26100.9818: new fixture scripts/test-smoke-relative-game.tests.ps1 fails on unmerged origin/main 078358a0 (smoke.ps1 throws because the child process cannot resolve the relative -Game path after Push-Location) and passes on the merged tree (smoke-relative-game: ok). Other PowerShell tests on merged tree: smoke-title.tests.ps1 -> ok, test-smoke-artifacts.tests.ps1 -> ok, perf-compare.tests.ps1 -> ok, perf-run.tests.ps1 -> ok (5/5 passed). PowerShell 7 and Rust workspace suite not run (Tier 0).
title run: none (Tier 0 script/test change)
review: Read full diff (scripts/smoke.ps1 +5, scripts/test-smoke-relative-game.tests.ps1 +38). No findings. Non-rooted -Game paths (excluding drive-rooted X:\... / X:/... and UNC \\... / //...) are resolved via $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Game) before both the title: leaf SHA-256 hash (so -Game '.' hashes the actual directory name) and launching $Xcl. Does not expand PowerShell wildcards. All CI checks are green. Not tested: PowerShell 7 (pwsh).
performance: none (smoke helper script only)
verdict: safe to merge
hardware / tool and model: AMD Ryzen 7 5800X3D, Windows 11 (10.0.26300.0), Windows PowerShell 5.1.26100.9818 / Antigravity, Gemini 4 Neon

<!-- greyfinch-sync:ivall/xcl:comment:7365429535 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2684#issuecomment-7365429535). Originally posted by [grathepic](https://github.com/grathepic) on 2026-12-03T02:24:35Z. --- merge-check base: 078358a058f7ba5d16690dba8dc4e55d2c88ae0a head: a9d11d6c6f85367c10c77e3b5275987405b50904 merge: clean (`git diff --check` exit 0) build: not needed (Tier 0 PowerShell script and test change; no Rust files touched) tests: Windows PowerShell `5.1.26100.9818`: new fixture `scripts/test-smoke-relative-game.tests.ps1` fails on unmerged `origin/main` `078358a0` (`smoke.ps1` throws because the child process cannot resolve the relative `-Game` path after `Push-Location`) and passes on the merged tree (`smoke-relative-game: ok`). Other PowerShell tests on merged tree: `smoke-title.tests.ps1` -> ok, `test-smoke-artifacts.tests.ps1` -> ok, `perf-compare.tests.ps1` -> ok, `perf-run.tests.ps1` -> ok (5/5 passed). PowerShell 7 and Rust workspace suite not run (Tier 0). title run: none (Tier 0 script/test change) review: Read full diff (`scripts/smoke.ps1` +5, `scripts/test-smoke-relative-game.tests.ps1` +38). No findings. Non-rooted `-Game` paths (excluding drive-rooted `X:\...` / `X:/...` and UNC `\\...` / `//...`) are resolved via `$ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Game)` before both the `title:` leaf SHA-256 hash (so `-Game '.'` hashes the actual directory name) and launching `$Xcl`. Does not expand PowerShell wildcards. All CI checks are green. Not tested: PowerShell 7 (`pwsh`). performance: none (smoke helper script only) verdict: safe to merge hardware / tool and model: AMD Ryzen 7 5800X3D, Windows 11 (10.0.26300.0), Windows PowerShell 5.1.26100.9818 / Antigravity, Gemini 4 Neon
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
xcl-dev/xcl!2674
No description provided.