Scripts: reproducible XCL-cold and XCL-warm performance runs #2887

Open
KOLESNiii wants to merge 7 commits from upstream-pr/2887 into main
KOLESNiii commented 2026-11-26 21:35:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-26T21:35:15Z.


Fixes for scripts/perf-run.ps1, which runs from a clean commit, build xcl in release and run one title twice, first with fresh ephemeral XCL caches (XCL-cold), then with those same caches (XCL-warm). The output folder keeps only the two xcl.log / report.json files and a versioned manifest.json (commit, run order, hardware and toolchain, every inherited XCL_* setting, workload fingerprint, durations, exit codes). GPU driver caches are not controlled and the manifest says so. Existing user caches are never read or touched.

Part of #2787 (item 8). The script itself (5bdaa54e and dfcd4bbb from #2778 by @bmjask) is now on main as c1d62da1 and f202460d, so after the rebase onto main 336fddda this PR holds only the fixes: three found running it on a retail game and four from review on this PR. The comparator fixes are #2888, stacked on this one.

Help wanted: a full run on a retail game. I could not finish one (see Tested). If you have a title and a stable machine, please run this on this PR's head and post the manifest.json here, without the logs, which name your paths:

.\scripts\perf-run.ps1 -Game '<your game folder>' -OutDir '<empty folder>' -Seconds 90 -StartupTimeoutSeconds 21600

The cold run prepares every shader of the title before the guest starts, and the last shaders are the slowest. Here it reached 22,800 of 26,503 shaders after 6,722 s, so give it a large -StartupTimeoutSeconds.

What is in it

  • Scripts: perf-run keeps going when cargo writes to stderr (79a3b7a2): under Windows PowerShell with redirected output (a queued or logged run), cargo's first Compiling line on stderr became a terminating error and the run ended before the title started. git, cargo and rustc now run with Continue and their exit codes are checked, as scripts/test.ps1 does.

  • Scripts: perf-run gives an XCL-cold run time to prepare its shaders (b12c1f41): -StartupTimeoutSeconds, with the same range and default as smoke.ps1. The fixed 120 s allowance killed the cold run during shader preparation. When XCL prints no log path, the error now shows its exit code and output.

  • Scripts: perf-run keeps the log of a run that crashes before its report (5998d4e7): a crashed XCL prints No report – see the log: instead of Log:. The script stopped and deleted the ephemeral data root, and the crash log with it. Now the log is kept and the exit code recorded.

  • Scripts: perf-run records every inherited XCL setting (3e9f05bf): the manifest listed a fixed set of XCL_* variables, so a switch such as XCL_PREPARE_ALL reached the runs without being recorded. Now every inherited XCL_* variable is recorded, except the per-run cache paths.

  • Scripts: perf-run passes a game folder with a trailing separator intact (62daa86c): -Game 'D:\Some Game\' reached xcl as D:\Some Game". The trailing backslashes are now doubled before the closing quote.

  • Scripts: a perf-run timeout ends the run's whole process tree (d538c19e): on a timeout only the launcher was killed; a child holding its output pipes kept running and could write the log after the run was timed. Each run's launcher is now in a kill-on-close job object that is terminated when it exits or times out, and reading its output is bounded to 30 s.

  • Scripts: perf-run's fixture checks XCL_PREPARE_ALL reaches the manifest (3b8a7d7a): fixture check and README.

  • Left out after the rebase: Scripts: perf-run launches the executable cargo reports building (47e12388). main's 833d2676 now builds with an explicit --target-dir and launches the executable from it, which fixes the same stale-build case.

Each fix comes with a fixture case that fails without it.

Tested

  • Windows 11 build 26300, AMD Ryzen 5 3600XT, NVIDIA RTX 2070 SUPER (driver 32.0.16.2140), Rust 1.100.0 MSVC, Windows PowerShell 5.1.
  • powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\perf-run.tests.ps1: all assertions passed on 99acc436 (mock cargo and mock XCL, no game is run).
  • After the rebase onto main 336fddda, on 3b8a7d7a (debug): cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 2122 passed, 9 failed, 48 ignored. The 9 failures are the ones in #3093 (3 e2e title tests, 6 split / wave64 GPU tests); main 336fddda fails the same 9 tests with the same counts on this machine. This PR changes no Rust code. SKIPPED on this adapter: 21 × no wave64, 3 f16/f32 per-lane forms refused per #1426, 1 × no heap windows.
  • Retail game (release build of c94cdbce, -Seconds 90 -StartupTimeoutSeconds 7200, XCL_PRESS_AT=25:A): the runner built, created the ephemeral caches and started the cold run. XCL then died with 0xc0000005 after 1,497 s of shader preparation (12,600 of 26,503 shaders). It looks like #2751, a crash in dxcompiler.dll during parallel compiles that is tied to this machine's RAM, not to this script. That run found the last fix: its log was lost.
  • Retail game again after the RAM was fixed (release build of 128ee21f, same settings): no crash this time, but 7,200 s was not enough. Shader preparation reached 22,800 of 26,503 after 6,722 s, then the script killed XCL at the time limit. I did not rerun it with a longer limit.

Not tested

  • A complete XCL-cold → XCL-warm pair on a retail game, so there are no real cold/warm numbers yet. That is the help asked for above.
  • PowerShell 7, AMD and Intel GPUs.
  • The timeout fix with a real launcher and title (tested with a mock launcher and child only).

AI use

  • Claude Code (Claude Opus 5.5) cherry-picked and ported the two source commits, wrote the three fixes and their fixture cases, ran the tests and the retail run, and drafted this description; after the rebase it reran the suite and the fixture and updated this description. The source commits were written with Codex (GPT-5.6-sol), per their trailers.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5517450778 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2887). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-26T21:35:15Z. --- Fixes for `scripts/perf-run.ps1`, which runs from a clean commit, build `xcl` in release and run one title twice, first with fresh ephemeral XCL caches (**XCL-cold**), then with those same caches (**XCL-warm**). The output folder keeps only the two `xcl.log` / `report.json` files and a versioned `manifest.json` (commit, run order, hardware and toolchain, every inherited `XCL_*` setting, workload fingerprint, durations, exit codes). GPU driver caches are not controlled and the manifest says so. Existing user caches are never read or touched. Part of #2787 (item 8). The script itself (`5bdaa54e` and `dfcd4bbb` from #2778 by @bmjask) is now on `main` as `c1d62da1` and `f202460d`, so after the rebase onto `main` `336fddda` this PR holds only the fixes: three found running it on a retail game and four from review on this PR. The comparator fixes are #2888, stacked on this one. **Help wanted: a full run on a retail game.** I could not finish one (see **Tested**). If you have a title and a stable machine, please run this on this PR's head and post the `manifest.json` here, without the logs, which name your paths: ```powershell .\scripts\perf-run.ps1 -Game '<your game folder>' -OutDir '<empty folder>' -Seconds 90 -StartupTimeoutSeconds 21600 ``` The cold run prepares every shader of the title before the guest starts, and the last shaders are the slowest. Here it reached 22,800 of 26,503 shaders after 6,722 s, so give it a large `-StartupTimeoutSeconds`. **What is in it** - `Scripts: perf-run keeps going when cargo writes to stderr` (`79a3b7a2`): under Windows PowerShell with redirected output (a queued or logged run), cargo's first `Compiling` line on stderr became a terminating error and the run ended before the title started. git, cargo and rustc now run with `Continue` and their exit codes are checked, as `scripts/test.ps1` does. - `Scripts: perf-run gives an XCL-cold run time to prepare its shaders` (`b12c1f41`): `-StartupTimeoutSeconds`, with the same range and default as `smoke.ps1`. The fixed 120 s allowance killed the cold run during shader preparation. When XCL prints no log path, the error now shows its exit code and output. - `Scripts: perf-run keeps the log of a run that crashes before its report` (`5998d4e7`): a crashed XCL prints `No report – see the log:` instead of `Log:`. The script stopped and deleted the ephemeral data root, and the crash log with it. Now the log is kept and the exit code recorded. - `Scripts: perf-run records every inherited XCL setting` (`3e9f05bf`): the manifest listed a fixed set of `XCL_*` variables, so a switch such as `XCL_PREPARE_ALL` reached the runs without being recorded. Now every inherited `XCL_*` variable is recorded, except the per-run cache paths. - `Scripts: perf-run passes a game folder with a trailing separator intact` (`62daa86c`): `-Game 'D:\Some Game\'` reached xcl as `D:\Some Game"`. The trailing backslashes are now doubled before the closing quote. - `Scripts: a perf-run timeout ends the run's whole process tree` (`d538c19e`): on a timeout only the launcher was killed; a child holding its output pipes kept running and could write the log after the run was timed. Each run's launcher is now in a kill-on-close job object that is terminated when it exits or times out, and reading its output is bounded to 30 s. - `Scripts: perf-run's fixture checks XCL_PREPARE_ALL reaches the manifest` (`3b8a7d7a`): fixture check and README. - Left out after the rebase: `Scripts: perf-run launches the executable cargo reports building` (`47e12388`). `main`'s `833d2676` now builds with an explicit `--target-dir` and launches the executable from it, which fixes the same stale-build case. Each fix comes with a fixture case that fails without it. **Tested** - Windows 11 build 26300, AMD Ryzen 5 3600XT, NVIDIA RTX 2070 SUPER (driver 32.0.16.2140), Rust 1.100.0 MSVC, Windows PowerShell 5.1. - `powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\perf-run.tests.ps1`: all assertions passed on `99acc436` (mock cargo and mock XCL, no game is run). - After the rebase onto `main` `336fddda`, on `3b8a7d7a` (debug): `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4`: 2122 passed, 9 failed, 48 ignored. The 9 failures are the ones in #3093 (3 e2e title tests, 6 split / wave64 GPU tests); `main` `336fddda` fails the same 9 tests with the same counts on this machine. This PR changes no Rust code. SKIPPED on this adapter: 21 × `no wave64`, 3 f16/f32 per-lane forms refused per #1426, 1 × `no heap windows`. - Retail game (release build of `c94cdbce`, `-Seconds 90 -StartupTimeoutSeconds 7200`, `XCL_PRESS_AT=25:A`): the runner built, created the ephemeral caches and started the cold run. XCL then died with `0xc0000005` after 1,497 s of shader preparation (12,600 of 26,503 shaders). It looks like #2751, a crash in `dxcompiler.dll` during parallel compiles that is tied to this machine's RAM, not to this script. That run found the last fix: its log was lost. - Retail game again after the RAM was fixed (release build of `128ee21f`, same settings): no crash this time, but 7,200 s was not enough. Shader preparation reached 22,800 of 26,503 after 6,722 s, then the script killed XCL at the time limit. I did not rerun it with a longer limit. **Not tested** - A complete XCL-cold → XCL-warm pair on a retail game, so there are no real cold/warm numbers yet. That is the help asked for above. - PowerShell 7, AMD and Intel GPUs. - The timeout fix with a real launcher and title (tested with a mock launcher and child only). **AI use** - Claude Code (Claude Opus 5.5) cherry-picked and ported the two source commits, wrote the three fixes and their fixture cases, ran the tests and the retail run, and drafted this description; after the rebase it reran the suite and the fixture and updated this description. The source commits were written with Codex (GPT-5.6-sol), per their trailers. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ettehn commented 2026-11-27 02:48:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ettehn on 2026-11-27T02:48:32Z.


I reproduced a build-to-run mismatch in scripts/perf-run.ps1 at 128ee21f on Windows. The script builds with Cargo, then launches the hard-coded target\release\xcl.exe. With CARGO_TARGET_DIR redirected and an older executable still at the default path, both arms ran the old executable even though manifest.json recorded the current clean commit. I verified this using a tiny clean Rust repository: both captured logs contained the stale binary’s marker while the redirected release build contained the new marker.

A local candidate requests --bin xcl --message-format=json-render-diagnostics and launches the executable reported by the matching compiler-artifact message. With both executables present, cold and warm ran the newly built one in Windows PowerShell 5.1 and PowerShell 7. The existing perf-run.tests.ps1 assertions also passed on both. This is real Cargo and the PR’s runner with a synthetic executable and input folder. No retail title was launched.

OpenAI Codex (6.2sol) assisted with verification.

<!-- greyfinch-sync:ivall/xcl:comment:7208454764 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2887#issuecomment-7208454764). Originally posted by [ettehn](https://github.com/ettehn) on 2026-11-27T02:48:32Z. --- I reproduced a build-to-run mismatch in `scripts/perf-run.ps1` at `128ee21f` on Windows. The script builds with Cargo, then launches the hard-coded `target\release\xcl.exe`. With `CARGO_TARGET_DIR` redirected and an older executable still at the default path, both arms ran the old executable even though `manifest.json` recorded the current clean commit. I verified this using a tiny clean Rust repository: both captured logs contained the stale binary’s marker while the redirected release build contained the new marker. A local candidate requests `--bin xcl --message-format=json-render-diagnostics` and launches the executable reported by the matching `compiler-artifact` message. With both executables present, cold and warm ran the newly built one in Windows PowerShell 5.1 and PowerShell 7. The existing `perf-run.tests.ps1` assertions also passed on both. This is real Cargo and the PR’s runner with a synthetic executable and input folder. No retail title was launched. OpenAI Codex (6.2sol) assisted with verification.
andrewDoing commented 2026-11-27 02:53:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-27T02:53:56Z.


On Windows at head 128ee21fcafdec1ecfd3e3f8bc496e6174aff617, both benchmark arms marked a two-second timeout, yet both captured a log message written by a child process five seconds after launch.

I ran the unchanged perf-run.ps1 with -Seconds 1 -StartupTimeoutSeconds 1 in a clean synthetic Rust workspace containing a package named xcl and a one-file workload. The script built the release executable itself. The synthetic launcher printed its log path, started a child inheriting stdout and stderr, and waited. The child slept five seconds, wrote a known marker to the log, and exited on its own.

The manifest recorded 2,056 ms cold and 2,010 ms warm, with timed_out=true in both arms. Both captured logs contained the five-second marker. The full invocation took 11,025 ms, including build and manifest work. A separate paired run also captured both post-timeout markers. No game or GPU was used.

The elapsed fields measure the launcher through its termination. The script calls Kill() on that process, stops its stopwatch, then waits for the redirected streams to finish. A surviving descendant with an inherited pipe can hold that read open and continue writing the workload log. XCL's production launcher also creates its host with Windows handle inheritance enabled. A benchmark timeout should contain the launched process tree and bound output draining before collecting that arm’s artifacts. Benchmark timeout handling

AI use: OpenAI Codex with GPT-6.2 Astra prepared the synthetic launcher and child, ran the paired checks, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7208528372 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2887#issuecomment-7208528372). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-27T02:53:56Z. --- On Windows at head `128ee21fcafdec1ecfd3e3f8bc496e6174aff617`, both benchmark arms marked a two-second timeout, yet both captured a log message written by a child process five seconds after launch. I ran the unchanged `perf-run.ps1` with `-Seconds 1 -StartupTimeoutSeconds 1` in a clean synthetic Rust workspace containing a package named `xcl` and a one-file workload. The script built the release executable itself. The synthetic launcher printed its log path, started a child inheriting stdout and stderr, and waited. The child slept five seconds, wrote a known marker to the log, and exited on its own. The manifest recorded **2,056 ms cold** and **2,010 ms warm**, with `timed_out=true` in both arms. Both captured logs contained the five-second marker. The full invocation took **11,025 ms**, including build and manifest work. A separate paired run also captured both post-timeout markers. No game or GPU was used. The elapsed fields measure the launcher through its termination. The script calls `Kill()` on that process, stops its stopwatch, then waits for the redirected streams to finish. A surviving descendant with an inherited pipe can hold that read open and continue writing the workload log. XCL's production launcher also creates its host with Windows handle inheritance enabled. A benchmark timeout should contain the launched process tree and bound output draining before collecting that arm’s artifacts. [Benchmark timeout handling](https://github.com/xcl-dev/xcl/blob/128ee21fcafdec1ecfd3e3f8bc496e6174aff617/scripts/perf-run.ps1#L168-L179) AI use: OpenAI Codex with GPT-6.2 Astra prepared the synthetic launcher and child, ran the paired checks, and wrote this report.
andrewDoing commented 2026-11-27 03:00:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-27T03:00:37Z.


I tested a local Windows process-tree cleanup candidate against the two-second timeout reproduction on 128ee21fcafdec1ecfd3e3f8bc496e6174aff617. Each benchmark arm owns an unnamed kill-on-close job. A gate process waits for assignment and a start message before launching the workload. The driver closes the job on timeout, normal exit, and errors. It bounds launcher exit and redirected-output completion separately and records elapsed time through cleanup. A readiness handshake excludes gate startup from the requested run deadline.

I ran three synthetic scenarios twice in Windows PowerShell 5.1 and twice in PowerShell 7, once per cold/warm arm in each shell. Four timeout arms finished in 2,010–2,034 ms. Four normal exits with a lingering child preserved exit code 0, and four normal exits without a child preserved exit code 7. The eight expected child-start markers appeared. After every child's five-second write deadline, none had written its delayed marker, and a separately launched sentinel remained alive.

The original script captured the child's five-second write in both two-second timeout arms. The candidate adds a helper process and some launch/cleanup overhead even after the readiness handshake. These were synthetic process-lifetime tests. Retail timing, restrictive Windows job policies, and a deliberately stuck external pipe holder were not exercised.

AI use: OpenAI Codex with GPT-6.2 Astra implemented and tested the candidate. A separate coding agent reviewed its process ownership, gate synchronization and error paths.

<!-- greyfinch-sync:ivall/xcl:comment:7208621096 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2887#issuecomment-7208621096). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-27T03:00:37Z. --- I tested a local Windows process-tree cleanup candidate against the two-second timeout reproduction on `128ee21fcafdec1ecfd3e3f8bc496e6174aff617`. Each benchmark arm owns an unnamed kill-on-close job. A gate process waits for assignment and a start message before launching the workload. The driver closes the job on timeout, normal exit, and errors. It bounds launcher exit and redirected-output completion separately and records elapsed time through cleanup. A readiness handshake excludes gate startup from the requested run deadline. I ran three synthetic scenarios twice in Windows PowerShell 5.1 and twice in PowerShell 7, once per cold/warm arm in each shell. Four timeout arms finished in 2,010–2,034 ms. Four normal exits with a lingering child preserved exit code 0, and four normal exits without a child preserved exit code 7. The eight expected child-start markers appeared. After every child's five-second write deadline, none had written its delayed marker, and a separately launched sentinel remained alive. The original script captured the child's five-second write in both two-second timeout arms. The candidate adds a helper process and some launch/cleanup overhead even after the readiness handshake. These were synthetic process-lifetime tests. Retail timing, restrictive Windows job policies, and a deliberately stuck external pipe holder were not exercised. AI use: OpenAI Codex with GPT-6.2 Astra implemented and tested the candidate. A separate coding agent reviewed its process ownership, gate synchronization and error paths.
andrewDoing commented 2026-11-27 03:04:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-27T03:04:25Z.


On 128ee21f, the paired-run manifest omits XCL_PREPARE_ALL. When a title has a used-shader list, setting this switch to 1 requests preparation of every record. Two benchmark manifests can therefore describe the same workload and recorded environment while the launcher receives different preparation settings.

I ran the unchanged scripts/perf-run.ps1 twice on Windows with its test-workload hook. The workload wrote the value it received into its log. The game folder, build, durations and other configured environment settings were the same for both invocations.

Inherited setting Cold log Warm log Manifest environment
XCL_PREPARE_ALL=0 0 0 Setting absent
XCL_PREPARE_ALL=1 1 1 Setting absent

The two environment objects and workload_id values matched exactly. Recording XCL_PREPARE_ALL alongside the other selected runtime switches would make this difference visible when comparing runs. This check measured manifest coverage with a synthetic workload. It did not measure startup time or use a retail title.

AI use: OpenAI Codex with GPT-6.2 Astra prepared the synthetic workload and compared the manifests; Codex coordinated and prepared this report.

<!-- greyfinch-sync:ivall/xcl:comment:7208682145 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2887#issuecomment-7208682145). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-27T03:04:25Z. --- On `128ee21f`, the paired-run manifest omits `XCL_PREPARE_ALL`. When a title has a used-shader list, setting this switch to `1` requests preparation of every record. Two benchmark manifests can therefore describe the same workload and recorded environment while the launcher receives different preparation settings. I ran the unchanged `scripts/perf-run.ps1` twice on Windows with its test-workload hook. The workload wrote the value it received into its log. The game folder, build, durations and other configured environment settings were the same for both invocations. | Inherited setting | Cold log | Warm log | Manifest environment | | --- | --- | --- | --- | | `XCL_PREPARE_ALL=0` | `0` | `0` | Setting absent | | `XCL_PREPARE_ALL=1` | `1` | `1` | Setting absent | The two `environment` objects and `workload_id` values matched exactly. Recording `XCL_PREPARE_ALL` alongside the other selected runtime switches would make this difference visible when comparing runs. This check measured manifest coverage with a synthetic workload. It did not measure startup time or use a retail title. AI use: OpenAI Codex with GPT-6.2 Astra prepared the synthetic workload and compared the manifests; Codex coordinated and prepared this report.
luckyteagirl commented 2026-11-27 05:44:16 +00:00 (Migrated from github.com)

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

Review: COMMENTED


perf-run.ps1 accepts a game directory ending in a backslash, but the native launch puts that backslash immediately before the closing quote. The Windows argument parser turns it into a literal quote in the filename. I ran the exact script from 128ee21f against a minimal Rust executable built by the script. With an existing Test Game\ folder, the executable received a path ending in a literal quote and the cold arm failed. Removing the trailing separator let both cold and warm arms finish. Could the native launch quote arguments correctly on Windows PowerShell 5.1 as well as PowerShell 7, with a regression for a folder containing spaces and a trailing separator? Native launch · Windows argument parsing

AI use: OpenAI Codex (GPT-6.2 Sol) reviewed the source, ran the synthetic Windows fixture, and drafted this comment. No retail title or GPU was used.

<!-- greyfinch-sync:ivall/xcl:review:6083974261 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2887#pullrequestreview-6083974261). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-27T05:44:16Z. **Review:** COMMENTED --- `perf-run.ps1` accepts a game directory ending in a backslash, but the native launch puts that backslash immediately before the closing quote. The Windows argument parser turns it into a literal quote in the filename. I ran the exact script from `128ee21f` against a minimal Rust executable built by the script. With an existing `Test Game\` folder, the executable received a path ending in a literal quote and the cold arm failed. Removing the trailing separator let both cold and warm arms finish. Could the native launch quote arguments correctly on Windows PowerShell 5.1 as well as PowerShell 7, with a regression for a folder containing spaces and a trailing separator? [Native launch](https://github.com/xcl-dev/xcl/blob/128ee21fcafdec1ecfd3e3f8bc496e6174aff617/scripts/perf-run.ps1#L145-L154) · [Windows argument parsing](https://learn.microsoft.com/en-us/cpp/c-language/parsing-c-command-line-arguments) AI use: OpenAI Codex (GPT-6.2 Sol) reviewed the source, ran the synthetic Windows fixture, and drafted this comment. No retail title or GPU was used.
KOLESNiii commented 2026-11-27 10:16:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-27T10:16:37Z.


Thanks for the reproductions. All four are fixed on the branch (head 99acc436):

@ettehn, executable from a different build: 47e12388. The build is now cargo build --locked --release -p xcl --bin xcl --message-format=json-render-diagnostics, and the runner launches the executable from the matching compiler-artifact message instead of target\release\xcl.exe. The fixture puts a stale target\release\xcl.exe next to a mock cargo that reports a different executable; the previous script launched the stale one.

@luckyteagirl, trailing separator: e1d70336. The trailing run of backslashes is doubled before the closing quote. The fixture compiles a small C# shim (with the .NET Framework csc.exe that ships with Windows), passes -Game '<tmp>\Mock Game\', and checks the shim receives [run] [<tmp>\Mock Game\]; the previous script delivered Mock Game".

@andrewDoing, process tree after a timeout: 09f483f6. Each run's launcher is assigned to a kill-on-close job object, and the job is terminated when the launcher exits or times out, before the clock stops. Reading the output is bounded to 30 s. The fixture's mock starts a child that writes the log 5 s into a 2 s run; the previous script copied that write. I did not add the gate process: a child started before the launcher is assigned to the job can escape it. That window is small for xcl run, which prepares shaders before it starts the host, and the bounded read covers it.

@andrewDoing, XCL_PREPARE_ALL: 72d80c95 records every inherited XCL_* variable instead of a fixed list, except the per-run XCL_DATA_ROOT / XCL_DXIL_CACHE. 99acc436 makes the fixture check XCL_PREPARE_ALL specifically and updates the README.

Tested: scripts/perf-run.tests.ps1 passes at 99acc436 in Windows PowerShell 5.1, and each new check fails on the commit before its fix. Not tested: PowerShell 7 (not installed here), a retail title. The GPU suite on 99acc436 is queued; I'll update the description with its counts.

AI use: Claude Code (Claude Opus 5.5) wrote the fixes, the tests and this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7215688753 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2887#issuecomment-7215688753). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-27T10:16:37Z. --- Thanks for the reproductions. All four are fixed on the branch (head `99acc436`): **@ettehn, executable from a different build:** `47e12388`. The build is now `cargo build --locked --release -p xcl --bin xcl --message-format=json-render-diagnostics`, and the runner launches the `executable` from the matching `compiler-artifact` message instead of `target\release\xcl.exe`. The fixture puts a stale `target\release\xcl.exe` next to a mock cargo that reports a different executable; the previous script launched the stale one. **@luckyteagirl, trailing separator:** `e1d70336`. The trailing run of backslashes is doubled before the closing quote. The fixture compiles a small C# shim (with the .NET Framework `csc.exe` that ships with Windows), passes `-Game '<tmp>\Mock Game\'`, and checks the shim receives `[run] [<tmp>\Mock Game\]`; the previous script delivered `Mock Game"`. **@andrewDoing, process tree after a timeout:** `09f483f6`. Each run's launcher is assigned to a kill-on-close job object, and the job is terminated when the launcher exits or times out, before the clock stops. Reading the output is bounded to 30 s. The fixture's mock starts a child that writes the log 5 s into a 2 s run; the previous script copied that write. I did not add the gate process: a child started before the launcher is assigned to the job can escape it. That window is small for `xcl run`, which prepares shaders before it starts the host, and the bounded read covers it. **@andrewDoing, `XCL_PREPARE_ALL`:** `72d80c95` records every inherited `XCL_*` variable instead of a fixed list, except the per-run `XCL_DATA_ROOT` / `XCL_DXIL_CACHE`. `99acc436` makes the fixture check `XCL_PREPARE_ALL` specifically and updates the README. Tested: `scripts/perf-run.tests.ps1` passes at `99acc436` in Windows PowerShell 5.1, and each new check fails on the commit before its fix. Not tested: PowerShell 7 (not installed here), a retail title. The GPU suite on `99acc436` is queued; I'll update the description with its counts. AI use: Claude Code (Claude Opus 5.5) wrote the fixes, the tests and this comment.
LocranKing commented 2026-11-27 12:23:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-27T12:23:00Z.


Tested PR #2887 (99acc436) on Windows 11.

Verification

Ran powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\perf-run.tests.ps1:

  • Output:
    synthetic build progress
    Performance artifacts: <temp>\other-artifacts
    perf-run tests: all assertions passed
    
  • Exit code: 0 (verified on Windows 11 Build 26300, Ryzen 5 5500, PowerShell).
  • Scope note: Mock harness suite only (mock-xcl.cmd / synthetic build progress; did not run the live game binary under perf-run.ps1).
<!-- greyfinch-sync:ivall/xcl:comment:7218176339 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2887#issuecomment-7218176339). Originally posted by [LocranKing](https://github.com/LocranKing) on 2026-11-27T12:23:00Z. --- Tested PR #2887 (`99acc436`) on Windows 11. ### Verification Ran `powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\perf-run.tests.ps1`: - Output: ``` synthetic build progress Performance artifacts: <temp>\other-artifacts perf-run tests: all assertions passed ``` - Exit code: `0` (verified on Windows 11 Build 26300, Ryzen 5 5500, PowerShell). - **Scope note:** Mock harness suite only (`mock-xcl.cmd` / synthetic build progress; did not run the live game binary under `perf-run.ps1`).
Foniass commented 2026-12-01 09:07:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:07:50Z.


Triage (#1607) – head 3b8a7d7

#2888 is stacked on this PR: it contains all seven commits here and adds three perf-compare commits on top. It is not a duplicate. #943 compares log metrics of two runs, which is a different tool.
I read scripts/perf-run.ps1 and the fixture: the kill-on-close job object, the stderr handling under Stop, the No report - see the log: pattern, the doubled trailing backslash, the recorded XCL_* environment and startup_timeout_seconds. I found no problems.
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:7306258942 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2887#issuecomment-7306258942). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T09:07:50Z. --- **Triage (#1607)** – head 3b8a7d7 #2888 is stacked on this PR: it contains all seven commits here and adds three `perf-compare` commits on top. It is not a duplicate. #943 compares log metrics of two runs, which is a different tool. I read `scripts/perf-run.ps1` and the fixture: the kill-on-close job object, the stderr handling under `Stop`, the `No report - see the log:` pattern, the doubled trailing backslash, the recorded `XCL_*` environment and `startup_timeout_seconds`. I found no problems. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
KOLESNiii commented 2026-12-02 14:14:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-12-02T14:14:44Z.


Thanks for the triage. Rebased onto main df0cfef6 (no conflicts; scripts only, so no smoke run). New head 83e00bd5; the suite is queued again.

— Claude Code (Claude Opus 5.5), on behalf of the PR author

<!-- greyfinch-sync:ivall/xcl:comment:7348224328 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2887#issuecomment-7348224328). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-12-02T14:14:44Z. --- Thanks for the triage. Rebased onto `main` df0cfef6 (no conflicts; scripts only, so no smoke run). New head `83e00bd5`; the suite is queued again. — Claude Code (Claude Opus 5.5), on behalf of the PR author
Foniass commented 2026-12-02 14:18:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T14:18:24Z.


Follow-up review (head 83e00bd5, since 3b8a7d7, diff read, not a merge-check):

  • Earlier points: unchanged. The own commits are identical to the previous head (git range-diff / patch-id); this push only rebases onto the current main.

New: none.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7348324791 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2887#issuecomment-7348324791). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-02T14:18:24Z. --- Follow-up review (head 83e00bd5, since 3b8a7d7, diff read, not a merge-check): - **Earlier points:** unchanged. The own commits are identical to the previous head (`git range-diff` / patch-id); this push only rebases onto the current `main`. New: none. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
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/2887:upstream-pr/2887'
git switch 'upstream-pr/2887'

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