Resolve relative smoke launcher path #2662

Open
luckyteagirl wants to merge 1 commit from upstream-pr/2672 into main
luckyteagirl commented 2026-11-26 05:44:07 +00:00 (Migrated from github.com)

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


smoke.ps1 checks a relative -Xcl path against PowerShell's current location. The process launcher can resolve that same string from a different working directory after Push-Location, so the launcher fails to start or starts the wrong file.

What is in it

  • Resolve -Xcl to a filesystem path before passing it to the process launcher.
  • Add a mock launcher regression that changes PowerShell's location and passes -Xcl .\xcl.cmd.

Tested

  • The relative launcher fixture failed against main b49be183 on PowerShell 5.1 and 7.6.9, and passed with the patch.
  • scripts/test-smoke-relative-xcl.tests.ps1 and scripts/test-smoke-artifacts.tests.ps1 passed on both shells. A separate run with spaces in the mock launcher directory also passed on both.
  • git diff --check passed.

Regression run

  • Not applicable. This changes only the smoke script and its test.

Not tested

  • A retail run or the Rust/GPU suite. The regression runs a mock .cmd launcher.

AI use

  • Codex (GPT-6.2 Sol) implemented the change and test, verified behavior against main, and drafted this description.
<!-- greyfinch-sync:ivall/xcl:issue:5504717376 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2672). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T05:44:07Z. --- `smoke.ps1` checks a relative `-Xcl` path against PowerShell's current location. The process launcher can resolve that same string from a different working directory after `Push-Location`, so the launcher fails to start or starts the wrong file. **What is in it** - Resolve `-Xcl` to a filesystem path before passing it to the process launcher. - Add a mock launcher regression that changes PowerShell's location and passes `-Xcl .\xcl.cmd`. **Tested** - The relative launcher fixture failed against main `b49be183` on PowerShell 5.1 and 7.6.9, and passed with the patch. - `scripts/test-smoke-relative-xcl.tests.ps1` and `scripts/test-smoke-artifacts.tests.ps1` passed on both shells. A separate run with spaces in the mock launcher directory also passed on both. - `git diff --check` passed. **Regression run** - Not applicable. This changes only the smoke script and its test. **Not tested** - A retail run or the Rust/GPU suite. The regression runs a mock `.cmd` launcher. **AI use** - Codex (GPT-6.2 Sol) implemented the change and test, verified behavior against main, and drafted this description.
github-actions[bot] commented 2026-12-01 02:33:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:33:13Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7298739883 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2672#issuecomment-7298739883). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-12-01T02:33:13Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 08:38:54 +00:00 (Migrated from github.com)

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


Triage (#1607) – head da68350

No open or merged PR resolves -Xcl. #2684 fixes the same kind of problem for -Game, and #2351 resolves -Xcl only to infer the build profile and still passes the relative path to the process. Its shared lines with #2667, #2684 and #2654 are test fixture boilerplate. ProcessStartInfo resolves a relative FileName (and cmd /c its argument) against the process's current directory, not the PowerShell location. Resolving $Xcl after the Test-Path check fixes that.
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:7305595430 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2672#issuecomment-7305595430). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:38:54Z. --- **Triage (#1607)** – head da68350 No open or merged PR resolves `-Xcl`. #2684 fixes the same kind of problem for `-Game`, and #2351 resolves `-Xcl` only to infer the build profile and still passes the relative path to the process. Its shared lines with #2667, #2684 and #2654 are test fixture boilerplate. `ProcessStartInfo` resolves a relative `FileName` (and `cmd /c` its argument) against the process's current directory, not the PowerShell location. Resolving `$Xcl` after the `Test-Path` check fixes that. 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:19 +00:00 (Migrated from github.com)

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


merge-check
base: 1c8b551475
head: da683503aa
merge: clean (git merge --no-edit onto 1c8b5514, git diff --check clean; scripts/smoke.ps1 +1, scripts/test-smoke-relative-xcl.tests.ps1 +23)
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-xcl.tests.ps1 -> ok (smoke-relative-xcl: 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:36, scripts/test-smoke-relative-xcl.tests.ps1). Resolving $Xcl = (Resolve-Path -LiteralPath $Xcl).ProviderPath right after the Test-Path check ensures ProcessStartInfo receives an absolute path anchored to the PowerShell session location even when the process working directory differs. The new test exercises Push-Location with -Xcl '.\xcl.cmd' and verifies the smoke output. 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:7340585142 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2672#issuecomment-7340585142). Originally posted by [Decodere](https://github.com/Decodere) on 2026-12-02T09:14:19Z. --- merge-check base: 1c8b551475e1e7bfe48f94448492a4c3544a2e0f head: da683503aab15e09aef38dc6183b8709e843b3ca merge: clean (`git merge --no-edit` onto `1c8b5514`, `git diff --check` clean; `scripts/smoke.ps1` +1, `scripts/test-smoke-relative-xcl.tests.ps1` +23) 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-xcl.tests.ps1` -> ok (`smoke-relative-xcl: 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:36`, `scripts/test-smoke-relative-xcl.tests.ps1`). Resolving `$Xcl = (Resolve-Path -LiteralPath $Xcl).ProviderPath` right after the `Test-Path` check ensures `ProcessStartInfo` receives an absolute path anchored to the PowerShell session location even when the process working directory differs. The new test exercises `Push-Location` with `-Xcl '.\xcl.cmd'` and verifies the smoke output. 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)
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2672:upstream-pr/2672'
git switch 'upstream-pr/2672'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2672'
git switch 'upstream-pr/2672'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2672'
git switch 'upstream-pr/2672'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2672'
git switch 'main'
git merge --squash 'upstream-pr/2672'
git switch 'main'
git merge --ff-only 'upstream-pr/2672'
git switch 'main'
git merge 'upstream-pr/2672'
git push origin 'main'
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!2662
No description provided.