Scripts: smoke.ps1 finds xcl.exe without -Xcl when started with -File #593
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!593
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-593"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@SpaghettiMaster545 on GitHub · 2026-11-24 02:13 UTC · original
SpaghettiMaster545:scripts-smoke-default-xcl→main· +30 −1 · 2 files · 1 commits · openscripts/smoke.ps1started withpowershell -File(or dot-sourced) under Windows PowerShell 5.1 stopped before doing anything when-Xclwas left out:Windows PowerShell 5.1 leaves
$PSScriptRootempty in the parameter defaults of a script that has[Parameter()]attributes when the script is started with-File, and the default was-Xcl (Join-Path $PSScriptRoot '..\target\release\xcl.exe'). Started with&from an open PowerShell session it works, so the usage line in the script's header was not affected. #451's description mentions the same problem ("Windows PowerShell 5.1 does not set$PSScriptRootin the parameter default, hence-Xcl"), and the tests in #282 and #521 pass-Xclexplicitly.I searched open and closed PRs and issues for "PSScriptRoot", "smoke.ps1 PowerShell 5.1" and "smoke.ps1 -Xcl". #318 (merged) fixed the other Windows PowerShell 5.1 problems of this script (New-TemporaryFile, Start-Process), not this one.
What is in it
scripts/smoke.ps1:-Xclhas no default inparam(); the script sets it right after, where$PSScriptRootis always set. Nothing else changes.scripts/smoke-default-xcl.tests.ps1: runs a copy ofsmoke.ps1outside the repository through-Filewithout-Xcland checks that it looks fortarget\release\xcl.exenext to its own folder (the copy finds noxcl.exe, so nothing runs). It compares the child's error text without whitespace, ANSI escapes and the|that PowerShell 7 puts before wrapped error lines (reported by @fladit123 and @Alpha325 in review).Tested
powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts\smoke-default-xcl.tests.ps1on this PR's head (0a5f23c): exit 0. Withscripts/smoke.ps1put back to9ce2070's, the same test fails with theJoin-Patherror above (exit 1), so it still catches the bug.0a5f23cis the one @fladit123 and @Alpha325 checked on those versions; I could not run PowerShell 7 here.cargo build --workspace, thencargo test --workspace -- --test-threads=4at3766ff0: 684 passed, 0 failed, 41 ignored (lib 644 / 0 / 21).0a5f23cchanges only the.ps1test since.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).powershell.exe -NoProfile -File <repo>\scripts\smoke.ps1 -Game <retail title> -Seconds 30without-Xcl, release build of this PR (at ed85053, before the rebase onto9ce2070, which changed only Rust files): the script foundtarget\release\xcl.exeand printed itsxcl-smokeblock (590 frames shown, 0 crashes, 0 device removals). Onmainthe same command stops at theJoin-Patherror.Not tested
crates/xcl/src.AI use
🤖 Generated with Claude Code
@futurepro62 on GitHub · 2026-11-24 02:32 UTC · original
Tested exact head
3766ff0.Tested
powershell -NoProfile -File scripts/smoke-default-xcl.tests.ps1on3766ff0: passed (exit 0).scripts/smoke.ps1of the parent commit9ce2070: fails (exit 1) with aJoin-Patherror (ParameterArgumentValidationErrorEmptyStringNotAllowed): the defaultxcl.exepath is built from an empty string when started with-File. So the test catches what the PR fixes.scripts/test-native-stderr.tests.ps1on3766ff0: passed.Not tested
pwsh), a realscripts/smoke.ps1run on a title (no title on this machine), the Rust suite (the PR changes no Rust).AI use
@NAbobo101 on GitHub · 2026-11-24 03:22 UTC · original
Ran this end to end with a retail title, on the exact head
3766ff0f392d7ededab642bfd3a5c8926995d22e(it merges cleanly ontomaindd2ae9a).I ran into the bug myself before finding this PR. I was making regression runs for another change, and on
maindd2ae9athis command stopped right away:powershell -NoProfile -File scripts/smoke.ps1 -Game <title folder>(My Windows is in Portuguese, so that's the English wording of the same error.) It's line 11, the
-Xcldefault. Passing-Xclby hand worked around it.Tested
cargo build --release -p xclon the PR head.powershell -NoProfile -File scripts/smoke-default-xcl.tests.ps1passes (exit 0).smoke.ps1command as above, still without-Xcland with-Seconds 15, now findstarget\release\xcl.exe, runs the title and prints its block:Not tested
&from an open session. That path didn't change.AI use
@fladit123 on GitHub · 2026-11-24 03:25 UTC · original
Found a small issue with the regression test on PowerShell 7.6.10. The actual smoke.ps1 fix works, but the test fails because PowerShell 7 inserts formatting characters into the exception output.
Tested
9ce2070eccf436d7bd38601c90407da447df34f33766ff0f392d7ededab642bfd3a5c8926995d22eRunning
pwsh -NoProfile -NonInteractive -File scripts/smoke-default-xcl.tests.ps1on the unmodified PR returns exit 1, even though the correct executable path appears in the output.Suggested fix
In
smoke-default-xcl.tests.ps1, replace:with:
I validated this change using temporary copies of the scripts:
The baseline still fails with the expected Join-Path empty-string error on PS 5.1. The proposed normalization preserves detection of the original bug while fixing the false negative
@Alpha325 on GitHub · 2026-11-24 03:29 UTC · original
I also hit the fixture’s formatting failure on PowerShell 7.6.9. To check executable selection separately, I ran
smoke.ps1with-Filefrom an unrelated working directory and put distinguishable stub executables at both the default path and the explicit override path. The checkout and override paths contained spaces.-Xcl-Xcl9ce2070Join-Pathempty-path error, exit 13766ff09ce20703766ff0The default stub reported 7 synthetic frames and the override reported 11, so each successful run confirmed which executable launched. The original fixture passed on 5.1 and failed on 7.6.9. Stripping the leading
|prefixes from wrapped error lines made it pass on both, and the patched fixture still caught the original 5.1 failure against the base script.Scope: Windows 11 build 26200, synthetic executables only. AI use: OpenAI Codex (GPT-6) wrote and ran the probe and drafted this report.
@SpaghettiMaster545 on GitHub · 2026-11-24 03:34 UTC · original
Thanks @fladit123 and @Alpha325: you're right, the fix worked on PowerShell 7 but the test's comparison did not.
0a5f23c(folded into the PR's one commit) takes your normalisation: the child's output is compared without whitespace, ANSI escapes and the|before wrapped error lines, and the expected text without whitespace and|.On Windows PowerShell 5.1 here, the test passes on
0a5f23c, and withscripts/smoke.ps1put back to9ce2070's it still fails with theJoin-Patherror. I could not run PowerShell 7 on this machine, so for 7.x the PR relies on your two checks; the description says so.(Claude Code, Claude Opus 5.5.)
@SpaghettiMaster545 on GitHub · 2026-11-24 11:45 UTC · original
The required
CIworkflow on this PR is waiting for maintainer approval (action_required, my first PR from a fork), so onlyPR checkshas run. The suite counts under Tested come from my own GPU run.@tiagonleal on GitHub · 2026-11-24 12:59 UTC · original
Tested #593 (
0a5f23c) and #629 (7728d19) on Windows PowerShell 5.1 (powershell.exe, Windows 11 Pro 26300), eachsmoke.ps1started with-Fileand no-Xclfrom a checkout without a release build:smoke.ps1frommain47efa2eJoin-Path : Cannot bind argument to parameter 'Path' because it is an empty string.no …\scripts\..\target\release\xcl.exe - build it first (…)#593's
scripts/smoke-default-xcl.tests.ps1on 5.1: exits 1 withmain'ssmoke.ps1, 0 with #593's. Thesmoke.ps1change is the same in both PRs (#593 was opened first and adds the test).Not tested: PowerShell 7; a full smoke run through either default (I pass
-Xclfor those).AI-assisted (Claude Code).
@omeyasawant on GitHub · 2026-11-24 20:38 UTC · original
Independent Windows PowerShell 5.1 check of this fix at
0a5f23c3b5ddc331ea941e19ccfaae30b9eb529a.Tested
powershell.exe), i7-14700K / RTX 5090.b9b6ea62080cc62fc19e212033372d01c6214e5c: invokingsmoke.ps1viapowershell.exe -NoProfile -ExecutionPolicy Bypass -File, without-Xcl, fails at the parameter default withJoin-Path: Cannot bind argument to parameter Path because it is an empty string.powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/smoke-default-xcl.tests.ps1exits 0.-Xclworkaround runs the smoke harness successfully. No runtime source changes were made for this check.Not tested
PowerShell 7, or this PR's complete workspace (this check is limited to the script regression). Main's full workspace was tested separately and reported in #42.
AI use
OpenAI Codex executed these checks and drafted the report at the account owner's request; exact runtime model identifier unavailable.
@JJAutoCompare on GitHub · 2026-11-25 06:43 UTC · original
Empirical test report (0a5f23c3)
Hardware / environment
0a5f23c3b5ddc331ea941e19ccfaae30b9eb529a, detached and clean.Commands and results
[System.Management.Automation.Language.Parser]::ParseFile($source, [ref]$tokens, [ref]$errors)on the checked-out smoke script returned 0 parse errors.powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts\smoke.ps1 -Game .from the fixture root reported the missing default.powershell.exe -NoProfile -ExecutionPolicy Bypass -File ..\scripts\smoke.ps1 -Game .reported the missing default with a decoy in the caller's directory and reached process launch when the script-relative default existed.powershell.exe -NoProfile -ExecutionPolicy Bypass -File ..\scripts\smoke.ps1 -Game . -Xcl .\custom.exereached process launch with the default absent.powershell.exe -NoProfile -ExecutionPolicy Bypass -File ..\scripts\smoke.ps1 -Game . -Xcl .\missing.exereported the missing override with the default present.powershell.exe -NoProfile -ExecutionPolicy Bypass -File baseline\scripts\smoke.ps1 -Game .reproduced the emptyJoin-Pathargument on merge base9ce2070e.Observed behavior
Omitting
-Xclselects the release executable relative to the script directory across working directories. Explicit-Xcltakes precedence. Windows rejected both invalid executables at process start.Not tested
Real game smoke run and Rust workspace GPU tests.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr593-focused.log and published.
@DavidM1911 on GitHub · 2026-11-25 13:07 UTC · original
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.@SpaghettiMaster545 on GitHub · 2026-11-25 13:29 UTC · original
Rebased onto
main1a0bbe3(nowf35fc87). The conflict was insmoke.ps1'sparam():mainadded-Titleand-OutDirnext to-Xcl(9683e7a,9c8c048). Both are kept, and-Xclstill has no default there; it is set afterparam()as before.main'ssmoke.ps1still has theJoin-Pathdefault, so the bug is still onmain.Tested on
f35fc87(Windows 11 10.0.26100, Windows PowerShell 5.1.26100.9818, RTX 5070 Ti):powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts\smoke-default-xcl.tests.ps1: exit 0.main's (1a0bbe3)smoke.ps1in place: exit 1, withJoin-Path : Cannot bind argument to parameter 'Path' because it is an empty string.scripts\test-native-stderr.tests.ps1: exit 0.Not tested: PowerShell 7, a smoke run on a title after the rebase, and the Rust suite (the PR changes no Rust).
AI use: Claude Code did the rebase, ran the checks above and drafted this comment.
@RavenCurseBurg on GitHub · 2026-11-25 13:36 UTC · original · edited 2026-11-25 13:43 UTC
Verified the rebased head
f35fc877abc7e35928f6018d2688082b4d81065eon Windows 11 build 26100.9711 (i7-13700, RTX 4060). In Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9,<shell> -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts\smoke-default-xcl.tests.ps1exited 0.I also started
smoke.ps1by absolute path from an unrelated directory with-Game SyntheticFolder -Title fixture -OutDir <unused-path>. In each shell, omitting-Xclproduced the missing-executable diagnostic for the release path relative to the script. Passing an explicit, missing-Xclpath containing a space reported that exact path. All four invocations exited 1 as expected before launching a process.Scope was path selection in the scripts. No XCL build, GPU workload or game run. OpenAI Codex (GPT-6) ran the checks and wrote this report.
@SpaghettiMaster545 on GitHub · 2026-11-25 15:56 UTC · original
@DavidM1911 the merge conflict you hit is resolved: the branch is rebased onto
main(headf35fc87, details in the comment above) and GitHub shows it as mergeable with today'smaintoo, so it's ready for your RTX 3060 Ti check.AI use: drafted with Claude Code.
@DavidM1911 on GitHub · 2026-11-26 03:00 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.