Scripts: record driver version and build profile in smoke.ps1 (#2232) #2341

Open
spook40 wants to merge 2 commits from upstream-pr/2351 into main
spook40 commented 2026-11-25 16:19:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by spook40 on 2026-11-25T16:19:29Z.


Part of #2232.

What is in it

  • Add driver: to scripts/smoke.ps1's xcl-smoke v1 block and manifest.json, resolved from Win32_VideoController.DriverVersion for the selected adapter (falling back to unknown when unavailable).
  • Add build: (debug / release) to scripts/smoke.ps1 via an optional -Build parameter or inferred from the -Xcl executable's parent directory (unknown otherwise).
  • Extend scripts/test-smoke-artifacts.tests.ps1 to verify driver: and build: across explicit -Build, debug/release path inference, fallback values, and invalid -Build rejection.

Tested

  • Environment: NVIDIA GeForce RTX 3060 Ti (driver 32.0.16.2140), Windows PowerShell 5.1 / Python 3
  • .\scripts\smoke-title.tests.ps1: smoke-title: ok
  • .\scripts\test-smoke-artifacts.tests.ps1: test-smoke-artifacts: all assertions passed successfully.
  • python scripts\test_pr_check.py: Ran 13 tests in 0.004s — OK

Regression run
Not needed (scripts-only change; no files under crates/xcl/src were modified).

Not tested

  • Full Rust workspace build/tests (cargo test --workspace), as no Rust crates or build files were modified.

AI use

  • Gemini (Gemini 4 Hydrogen): helped draft the scripts/smoke.ps1 metadata additions, PowerShell unit tests in scripts/test-smoke-artifacts.tests.ps1, and PR description. All changes and tests were reviewed and run locally.
<!-- greyfinch-sync:ivall/xcl:issue:5494957610 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2351). Originally posted by [spook40](https://github.com/spook40) on 2026-11-25T16:19:29Z. --- Part of #2232. **What is in it** - Add `driver:` to `scripts/smoke.ps1`'s `xcl-smoke v1` block and `manifest.json`, resolved from `Win32_VideoController.DriverVersion` for the selected adapter (falling back to `unknown` when unavailable). - Add `build:` (`debug` / `release`) to `scripts/smoke.ps1` via an optional `-Build` parameter or inferred from the `-Xcl` executable's parent directory (`unknown` otherwise). - Extend `scripts/test-smoke-artifacts.tests.ps1` to verify `driver:` and `build:` across explicit `-Build`, `debug`/`release` path inference, fallback values, and invalid `-Build` rejection. **Tested** - Environment: NVIDIA GeForce RTX 3060 Ti (driver `32.0.16.2140`), Windows PowerShell 5.1 / Python 3 - `.\scripts\smoke-title.tests.ps1`: `smoke-title: ok` - `.\scripts\test-smoke-artifacts.tests.ps1`: `test-smoke-artifacts: all assertions passed successfully.` - `python scripts\test_pr_check.py`: Ran 13 tests in 0.004s — OK **Regression run** Not needed (scripts-only change; no files under `crates/xcl/src` were modified). **Not tested** - Full Rust workspace build/tests (`cargo test --workspace`), as no Rust crates or build files were modified. **AI use** - Gemini (Gemini 4 Hydrogen): helped draft the `scripts/smoke.ps1` metadata additions, PowerShell unit tests in `scripts/test-smoke-artifacts.tests.ps1`, and PR description. All changes and tests were reviewed and run locally.
RavenCurseBurg commented 2026-11-25 17:07:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T16:35:46Z.


Confirmed on the updated PR head ae40a0e1b219c5d9cd0bdae82a3632a36087495b. The fifth positional argument again names the output directory. The new five-argument test found the manifest there with the supplied title. scripts/test-smoke-artifacts.tests.ps1 and scripts/smoke-title.tests.ps1 passed in Windows PowerShell 5.1 and PowerShell 7.6.9; all 13 test_pr_check.py tests passed. Windows 11 26100.9711, synthetic launcher only. OpenAI Codex (GPT-6) ran this retest. Thanks for the fix.

On 618791f8c90cc0703d9ba7c09aae22b71913dc7d, the original five-position call & $runner $game 1 $xcl 'Fixture' $outDir stopped with -Build must be 'debug' or 'release' in Windows PowerShell 5.1 and PowerShell 7.6.9. The same call saved its manifest on the parent 0829441 in both shells. Adding Build before OutDir changed which parameter received the fifth argument.

Fix and regression test. Build now follows the existing parameters; the first artifact test calls the script positionally and checks the output at the supplied directory. On the patched tree, scripts/test-smoke-artifacts.tests.ps1 and scripts/smoke-title.tests.ps1 passed on both shells. All 13 Python PR-checker unit tests passed.

I also ran the script with a stand-in XCL and simulated controller enumeration. In each shell I checked the manifest and the printed block: a report naming the second adapter selected its driver, explicit Debug overrode a release directory, an unmatched adapter retained its name with driver unknown, no report selected the first non-Basic controller, and a CIM error left the reported adapter intact with driver unknown. All five cases passed per shell.

Windows 11 26100.9711, i7-13700, RTX 4060. No retail title, GPU workload or Rust build. OpenAI Codex (GPT-6) ran the checks and prepared the patch.

The PR head ae40a0e1b219 now conflicts with main 8b957bec6f82. Merge candidate 2e1d988f8 has those two commits as parents, so the current PR branch can fast-forward to it.

The resolution keeps OutDir in position five and main’s StartupTimeoutSeconds in position six, followed by Build. The artifact test exercised the original five-argument call and a six-positional-argument call with -Build Release: the second manifest recorded the chosen title, timeout 7 and build release. scripts/test-smoke-artifacts.tests.ps1 and scripts/smoke-title.tests.ps1 passed in Windows PowerShell 5.1 and PowerShell 7.6.9. python -B -m unittest discover -s scripts -p "test_pr_check*.py" passed all 13 tests.

Windows 11 build 26100, Core i7-13700. OpenAI Codex (GPT-6) resolved the conflict and ran the checks. No game files or GPU workloads were used.

<!-- greyfinch-sync:ivall/xcl:comment:7168232040 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2351#issuecomment-7168232040). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T16:35:46Z. --- **Confirmed on the updated PR head `ae40a0e1b219c5d9cd0bdae82a3632a36087495b`.** The fifth positional argument again names the output directory. The new five-argument test found the manifest there with the supplied title. `scripts/test-smoke-artifacts.tests.ps1` and `scripts/smoke-title.tests.ps1` passed in Windows PowerShell 5.1 and PowerShell 7.6.9; all 13 `test_pr_check.py` tests passed. Windows 11 26100.9711, synthetic launcher only. OpenAI Codex (GPT-6) ran this retest. Thanks for the fix. On `618791f8c90cc0703d9ba7c09aae22b71913dc7d`, the original five-position call `& $runner $game 1 $xcl 'Fixture' $outDir` stopped with `-Build must be 'debug' or 'release'` in Windows PowerShell 5.1 and PowerShell 7.6.9. The same call saved its manifest on the parent `0829441` in both shells. Adding Build before OutDir changed which parameter received the fifth argument. [Fix and regression test](https://github.com/RavenCurseBurg/xcl/commit/0f0807fd6a975f24726d794eddbd5ce17ca47e23). Build now follows the existing parameters; the first artifact test calls the script positionally and checks the output at the supplied directory. On the patched tree, `scripts/test-smoke-artifacts.tests.ps1` and `scripts/smoke-title.tests.ps1` passed on both shells. All 13 Python PR-checker unit tests passed. I also ran the script with a stand-in XCL and simulated controller enumeration. In each shell I checked the manifest and the printed block: a report naming the second adapter selected its driver, explicit Debug overrode a release directory, an unmatched adapter retained its name with driver unknown, no report selected the first non-Basic controller, and a CIM error left the reported adapter intact with driver unknown. All five cases passed per shell. Windows 11 26100.9711, i7-13700, RTX 4060. No retail title, GPU workload or Rust build. OpenAI Codex (GPT-6) ran the checks and prepared the patch. The PR head `ae40a0e1b219` now conflicts with main `8b957bec6f82`. [Merge candidate `2e1d988f8`](https://github.com/RavenCurseBurg/xcl/commit/2e1d988f86a7131bfd216c7fb27954ad84d65304) has those two commits as parents, so the current PR branch can fast-forward to it. The resolution keeps `OutDir` in position five and main’s `StartupTimeoutSeconds` in position six, followed by `Build`. The artifact test exercised the original five-argument call and a six-positional-argument call with `-Build Release`: the second manifest recorded the chosen title, timeout `7` and build `release`. `scripts/test-smoke-artifacts.tests.ps1` and `scripts/smoke-title.tests.ps1` passed in Windows PowerShell 5.1 and PowerShell 7.6.9. `python -B -m unittest discover -s scripts -p "test_pr_check*.py"` passed all 13 tests. Windows 11 build 26100, Core i7-13700. OpenAI Codex (GPT-6) resolved the conflict and ran the checks. No game files or GPU workloads were used.
spook40 commented 2026-11-25 17:07:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by spook40 on 2026-11-25T17:05:57Z.


Good catch; thanks for testing that. Pushed ae40a0e moving $Build after $OutDir in scripts/smoke.ps1 so the 5th positional slot stays $OutDir, and added a 5-argument positional test in scripts/test-smoke-artifacts.tests.ps1. Re-ran test-smoke-artifacts.tests.ps1 and smoke-title.tests.ps1 in both Windows PowerShell 5.1 and PowerShell 7, plus python scripts/test_pr_check.py (all passing).

<!-- greyfinch-sync:ivall/xcl:comment:7169001374 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2351#issuecomment-7169001374). Originally posted by [spook40](https://github.com/spook40) on 2026-11-25T17:05:57Z. --- Good catch; thanks for testing that. Pushed `ae40a0e` moving `$Build` after `$OutDir` in `scripts/smoke.ps1` so the 5th positional slot stays `$OutDir`, and added a 5-argument positional test in `scripts/test-smoke-artifacts.tests.ps1`. Re-ran `test-smoke-artifacts.tests.ps1` and `smoke-title.tests.ps1` in both Windows PowerShell 5.1 and PowerShell 7, plus `python scripts/test_pr_check.py` (all passing).
DavidM1911 commented 2026-11-25 19:09:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T18:37:27Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7171165616 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2351#issuecomment-7171165616). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T18:37:27Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
github-actions[bot] commented 2026-11-29 20:43:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:43:26Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7262306666 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2351#issuecomment-7262306666). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T20:43:26Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 07:53:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:53:40Z.


Triage (#1607) – head ae40a0e

#2235 works on the same issue (#2232) from the other side: it makes pr_check.py compare the two smoke blocks' gpu: lines, while this PR makes smoke.ps1 record driver: and build: lines in the block and manifest. The two do not overlap and could go together.
In smoke.ps1, the driver is found by matching the adapter name from report.json exactly against Win32_VideoController.Name. With two cards of the same name it takes the first one. If the names differ at all, it prints driver: unknown.
The PR conflicts with main, which has since added -StartupTimeoutSeconds to the same param block and usage line.
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:7304615228 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2351#issuecomment-7304615228). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:53:40Z. --- **Triage (#1607)** – head ae40a0e #2235 works on the same issue (#2232) from the other side: it makes `pr_check.py` compare the two smoke blocks' `gpu:` lines, while this PR makes `smoke.ps1` record `driver:` and `build:` lines in the block and manifest. The two do not overlap and could go together. In `smoke.ps1`, the driver is found by matching the adapter name from `report.json` exactly against `Win32_VideoController.Name`. With two cards of the same name it takes the first one. If the names differ at all, it prints `driver: unknown`. The PR conflicts with main, which has since added `-StartupTimeoutSeconds` to the same `param` block and usage line. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
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/2351:upstream-pr/2351'
git switch 'upstream-pr/2351'

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