Skip to content

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

Draft
luckyteagirl wants to merge 2 commits into
xcl-dev:mainfrom
luckyteagirl:codex/smoke-child-environment
Draft

luckyteagirl wants to merge 2 commits into
xcl-dev:mainfrom
luckyteagirl:codex/smoke-child-environment

Conversation

@luckyteagirl

@luckyteagirl luckyteagirl commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Follow-up fixture cleanup: same-process absent, seeded, and present-empty environment values restored on PowerShell 5.1 and 7.6.9; both smoke fixtures passed in each shell.
  • 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

  • RavenCurseBurg supplied the fixture cleanup in commit 9f48d39f, assisted by OpenAI Codex (GPT-6) for implementation and Windows CPU verification.
  • 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)
@RavenCurseBurg

RavenCurseBurg commented Nov 26, 2026 •

Copy link
Copy Markdown

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.

Retest on 9f48d39fc42d957cd7bd01e648afab93c78012d2

The head now includes the fixture cleanup commit tested above. I reran scripts/test-smoke-artifacts.tests.ps1 in the same shell and read back all three caller settings after each run. All five restoration cases passed: absent and seeded values on Windows PowerShell 5.1 and PowerShell 7, plus present-empty values on PowerShell 7. The checked-in fixture also verified the child received 0,5,1.

OpenAI Codex (GPT-6) ran the synthetic fixtures on Windows 11. No retail title, GPU workload or Rust workspace build was used.

AI-assisted with OpenAI Codex (GPT-6) for implementation and Windows CPU verification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants