Scripts: keep smoke runs on the JIT path #3453

Merged
bmjask merged 1 commit from upstream-pr/3453 into main 2026-11-29 20:19:22 +00:00
bmjask commented 2026-11-29 19:04:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-29T19:04:22Z.


Smoke is a bounded runtime regression check, but it inherited XCL_PREPARE from the caller and could spend its startup timeout preparing a full corpus. Force XCL_PREPARE=0 only in the launched child process so smoke consistently exercises the runtime/JIT path without changing the caller's environment.

What is in it

  • scripts/smoke.ps1: launch smoke runs with startup preparation disabled and document the intended split between smoke and AOT testing.
  • scripts/test-smoke-artifacts.tests.ps1: prove the child receives XCL_PREPARE=0 while the caller's existing value remains unchanged.

Tested

  • Windows 11 build 26200, NVIDIA GeForce RTX 4090, Rust 1.100.0.
  • ./scripts/test-smoke-artifacts.tests.ps1: all assertions passed.
  • ./scripts/smoke-title.tests.ps1: passed.
  • ./scripts/test.ps1: 2,737 passed, 0 failed, 49 ignored; 29 GPU tests explicitly reported SKIPPED for unsupported adapter/configuration features.

Not tested

  • No retail-title smoke run: this changes the smoke harness rather than crates/xcl/src, and the child environment is covered with the mock launcher.
  • No full AOT corpus preparation was run; smoke intentionally disables it, and AOT behavior remains covered separately.

AI use

  • Codex with GPT-5 implemented the change and tests, ran the test suite, and prepared this description.
<!-- greyfinch-sync:ivall/xcl:issue:5554062180 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3453). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-29T19:04:22Z. --- Smoke is a bounded runtime regression check, but it inherited `XCL_PREPARE` from the caller and could spend its startup timeout preparing a full corpus. Force `XCL_PREPARE=0` only in the launched child process so smoke consistently exercises the runtime/JIT path without changing the caller's environment. **What is in it** - `scripts/smoke.ps1`: launch smoke runs with startup preparation disabled and document the intended split between smoke and AOT testing. - `scripts/test-smoke-artifacts.tests.ps1`: prove the child receives `XCL_PREPARE=0` while the caller's existing value remains unchanged. **Tested** - Windows 11 build 26200, NVIDIA GeForce RTX 4090, Rust 1.100.0. - `./scripts/test-smoke-artifacts.tests.ps1`: all assertions passed. - `./scripts/smoke-title.tests.ps1`: passed. - `./scripts/test.ps1`: 2,737 passed, 0 failed, 49 ignored; 29 GPU tests explicitly reported `SKIPPED` for unsupported adapter/configuration features. **Not tested** - No retail-title smoke run: this changes the smoke harness rather than `crates/xcl/src`, and the child environment is covered with the mock launcher. - No full AOT corpus preparation was run; smoke intentionally disables it, and AOT behavior remains covered separately. **AI use** - Codex with GPT-5 implemented the change and tests, ran the test suite, and prepared this description.
andrewDoing commented 2026-11-29 19:12:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-29T19:12:42Z.


I ran the same mock launcher through clean main 0fe06eb0 and PR head 3ad7e458 on PowerShell 7.6.9 and Windows PowerShell 5.1.26100.10068. The caller started with XCL_PREPARE=1 XCL_NETWORK=1 XCL_RUN_SECONDS=777 XCL_ACTIVITY=0 and requested a five-second smoke.

Script Child XCL_PREPARE Child XCL_NETWORK Child XCL_RUN_SECONDS Child XCL_ACTIVITY
Main 1 0 5 1
PR head 0 1 777 0
Companion fix 0 0 5 1

Accessing ProcessStartInfo.EnvironmentVariables to set XCL_PREPARE snapshots the caller's environment. The later $env: writes therefore change the caller without reaching the child. Leaving the three other settings inherited can enable networking, lose the guest's exit timer, and suppress activity samples during a smoke.

I put all four overrides in the same child environment in this companion commit, with assertions for the child and caller. The new assertion failed as expected against the unchanged PR script. The companion passed both scripts/test-smoke-artifacts.tests.ps1 and scripts/smoke-title.tests.ps1 on both shells. It also clarifies the staged-corpus exception in the header. The runtime honors XCL_PREPARE=0 only when the title lacks .xcl/pso-corpus.

Windows 11 build 26300.10075, RTX 5070, Ryzen 7 5700X3D. The tests launched only a mock process. No title, network request, or AOT preparation ran. Codex with GPT-6.2 Sol wrote and tested the fixture and companion change.

<!-- greyfinch-sync:ivall/xcl:comment:7261097839 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3453#issuecomment-7261097839). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-29T19:12:42Z. --- I ran the same mock launcher through clean main `0fe06eb0` and PR head `3ad7e458` on PowerShell 7.6.9 and Windows PowerShell 5.1.26100.10068. The caller started with `XCL_PREPARE=1 XCL_NETWORK=1 XCL_RUN_SECONDS=777 XCL_ACTIVITY=0` and requested a five-second smoke. | Script | Child `XCL_PREPARE` | Child `XCL_NETWORK` | Child `XCL_RUN_SECONDS` | Child `XCL_ACTIVITY` | | --- | ---: | ---: | ---: | ---: | | Main | 1 | 0 | 5 | 1 | | PR head | 0 | **1** | **777** | **0** | | Companion fix | 0 | 0 | 5 | 1 | Accessing `ProcessStartInfo.EnvironmentVariables` to set `XCL_PREPARE` snapshots the caller's environment. The later `$env:` writes therefore change the caller without reaching the child. Leaving the three other settings inherited can enable networking, lose the guest's exit timer, and suppress activity samples during a smoke. I put all four overrides in the same child environment in this [companion commit](https://github.com/andrewDoing/xcl/commit/498a98f77ce9d7b9462a6dbd76bd54acf349020c), with assertions for the child and caller. The new assertion failed as expected against the unchanged PR script. The companion passed both `scripts/test-smoke-artifacts.tests.ps1` and `scripts/smoke-title.tests.ps1` on both shells. It also clarifies the staged-corpus exception in the header. The runtime honors `XCL_PREPARE=0` only when the title lacks `.xcl/pso-corpus`. Windows 11 build 26300.10075, RTX 5070, Ryzen 7 5700X3D. The tests launched only a mock process. No title, network request, or AOT preparation ran. Codex with GPT-6.2 Sol wrote and tested the fixture and companion change.
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!3453
No description provided.