Scripts: keep smoke settings out of the calling shell #2714

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

@⁠luckyteagirl on GitHub · 2026-11-26 08:05 UTC · original
luckyteagirl:codex/smoke-child-environment → main · +24 −4 · 3 files · 1 commits · draft

scripts/smoke.ps1 currently changes the calling PowerShell session: it leaves XCL_NETWORK=0 and removes any pre-existing XCL_RUN_SECONDS and XCL_ACTIVITY after a run. Set these three overrides on the launched XCL process instead, so repeated or interactive smoke runs do not change the caller's settings.

What is in it

  • scripts/smoke.ps1: put the three run settings in ProcessStartInfo.EnvironmentVariables.
  • scripts/test-smoke-artifacts.tests.ps1: check that the mock child receives 0,5,1 while the caller retains its original settings. This assertion failed on the parent commit before the fix.
  • README.md: document the launcher's environment scope.

Tested

  • Windows 11 Home build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M (driver 30.0.13002.13003), Rust 1.99.0 MSVC; PowerShell 5.1.26100 and 7.6.9.
  • powershell.exe -NoProfile -File .\scripts\test-smoke-artifacts.tests.ps1: passed.
  • pwsh.exe -NoProfile -File .\scripts\test-smoke-artifacts.tests.ps1: passed.
  • powershell.exe -NoProfile -File .\scripts\smoke-title.tests.ps1: passed.
  • pwsh.exe -NoProfile -File .\scripts\smoke-title.tests.ps1: passed.
  • .\scripts\test.ps1: workspace build passed; the unfiltered xcl --lib run aborted with 0xc0000005 in the known RX 6800M DXIL test path, so it produced no complete suite count. A subsequent run with --skip gpu::dxil::core_tests::raw_loads_in_root_windows_respect_exec_and_bounds completed its library harness with 1111 passed, 197 failed, 27 ignored, 1 filtered out; many failures reported an unavailable D3D12 device and a suspect driver state after the abort. These runs do not establish a passing GPU suite.

Not tested

  • A passing full GPU suite or retail-title smoke after the driver failure. No runtime source changed.

AI use

  • OpenAI Codex (GPT-6.2 Sol) reproduced the caller-environment bug, implemented the patch and test, and ran the focused PowerShell checks. OpenAI Codex (GPT-6.2 Astra) reviewed the diff and ran the workspace attempt.
**@⁠luckyteagirl** on GitHub · 2026-11-26 08:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/2714) `luckyteagirl:codex/smoke-child-environment` → `main` · +24 −4 · 3 files · 1 commits · draft `scripts/smoke.ps1` currently changes the calling PowerShell session: it leaves `XCL_NETWORK=0` and removes any pre-existing `XCL_RUN_SECONDS` and `XCL_ACTIVITY` after a run. Set these three overrides on the launched XCL process instead, so repeated or interactive smoke runs do not change the caller's settings. **What is in it** - `scripts/smoke.ps1`: put the three run settings in `ProcessStartInfo.EnvironmentVariables`. - `scripts/test-smoke-artifacts.tests.ps1`: check that the mock child receives `0,5,1` while the caller retains its original settings. This assertion failed on the parent commit before the fix. - `README.md`: document the launcher's environment scope. **Tested** - Windows 11 Home build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M (driver 30.0.13002.13003), Rust 1.99.0 MSVC; PowerShell 5.1.26100 and 7.6.9. - `powershell.exe -NoProfile -File .\scripts\test-smoke-artifacts.tests.ps1`: passed. - `pwsh.exe -NoProfile -File .\scripts\test-smoke-artifacts.tests.ps1`: passed. - `powershell.exe -NoProfile -File .\scripts\smoke-title.tests.ps1`: passed. - `pwsh.exe -NoProfile -File .\scripts\smoke-title.tests.ps1`: passed. - `.\scripts\test.ps1`: workspace build passed; the unfiltered `xcl --lib` run aborted with `0xc0000005` in the known RX 6800M DXIL test path, so it produced no complete suite count. A subsequent run with `--skip gpu::dxil::core_tests::raw_loads_in_root_windows_respect_exec_and_bounds` completed its library harness with **1111 passed, 197 failed, 27 ignored, 1 filtered out**; many failures reported an unavailable D3D12 device and a suspect driver state after the abort. These runs do not establish a passing GPU suite. **Not tested** - A passing full GPU suite or retail-title smoke after the driver failure. No runtime source changed. **AI use** - OpenAI Codex (GPT-6.2 Sol) reproduced the caller-environment bug, implemented the patch and test, and ran the focused PowerShell checks. OpenAI Codex (GPT-6.2 Astra) reviewed the diff and ran the workspace attempt.
Set run overrides in the launcher environment so existing caller settings survive. Verify the child overrides and caller values with the synthetic launcher.

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

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

On e07279eb34ae634f863b88d15f9b99fd85953067, the caller kept its original environment across a successful launch, a process-start failure and a child that returned without a log path. I checked absent and pre-existing values in both shells, plus present-but-empty values in PowerShell 7 (15 cases). On runs that started a child, its actual environment contained XCL_NETWORK=0, XCL_RUN_SECONDS=3 and XCL_ACTIVITY=1.

The artifact test fixture itself had a separate caller-visible effect. In PowerShell 7.6.9 I removed all three variables, invoked scripts/test-smoke-artifacts.tests.ps1 in that same process, then read them back. Its assertions passed, but cleanup recreated all three as empty strings. On 5.1 they stayed absent. The fixture cleanup fix explicitly removes previously absent entries and restores saved strings. All five restoration cases passed on the candidate (absent/seeded on both shells and empty on 7). The smoke launcher is unchanged by this commit. I also exercised the debug-switch interaction on the #2039 rebase.

Windows PowerShell 5.1 and PowerShell 7.6.9 on Windows 11. OpenAI Codex (GPT-6) prepared and ran the fixtures. Synthetic logs, reports and immediately exiting launchers only; no game, GPU workload or workspace build.

**@⁠RavenCurseBurg** on GitHub · 2026-11-26 08:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/2714#issuecomment-7186914657) · edited 2026-11-26 09:06 UTC On `e07279eb34ae634f863b88d15f9b99fd85953067`, the caller kept its original environment across a successful launch, a process-start failure and a child that returned without a log path. I checked absent and pre-existing values in both shells, plus present-but-empty values in PowerShell 7 (15 cases). On runs that started a child, its actual environment contained `XCL_NETWORK=0`, `XCL_RUN_SECONDS=3` and `XCL_ACTIVITY=1`. The artifact **test fixture itself** had a separate caller-visible effect. In PowerShell 7.6.9 I removed all three variables, invoked `scripts/test-smoke-artifacts.tests.ps1` in that same process, then read them back. Its assertions passed, but cleanup recreated all three as empty strings. On 5.1 they stayed absent. The [fixture cleanup fix](https://github.com/RavenCurseBurg/xcl/commit/9f48d39fc42d957cd7bd01e648afab93c78012d2) explicitly removes previously absent entries and restores saved strings. All five restoration cases passed on the candidate (absent/seeded on both shells and empty on 7). The smoke launcher is unchanged by this commit. I also exercised the debug-switch interaction on the [#2039 rebase](https://github.com/RavenCurseBurg/xcl/commit/c53c23fe9c41acc0795265d1641c2ec71498f721). Windows PowerShell 5.1 and PowerShell 7.6.9 on Windows 11. OpenAI Codex (GPT-6) prepared and ran the fixtures. Synthetic logs, reports and immediately exiting launchers only; no game, GPU workload or workspace build.
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/2714/head:github-bot/gh-2714'
git switch 'github-bot/gh-2714'

Merge

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