Smoke: keep the result when adapter discovery fails #1852

Open
rrrarrra9 wants to merge 2 commits from upstream-pr/1862 into main
rrrarrra9 commented 2026-11-24 22:05:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by rrrarrra9 on 2026-11-24T22:05:49Z.


Related to #282. When a failed run has no usable report.json and CIM fails or returns no named hardware adapter, smoke.ps1 emits the regression block with gpu: unknown and preserves the measured counters.

What is in it

  • scripts/smoke.ps1 makes optional CIM discovery non-fatal, skips basic and unnamed controllers, and prioritizes the runtime report.
  • scripts/smoke-adapter.tests.ps1 covers a thrown CIM error, empty and basic-only lists, a usable controller after unnamed entries, and report precedence. The CIM-failure case also verifies the saved log and manifest from #2023's -OutDir.

Tested

  • On Windows 11 build 26300.9974, scripts/smoke-adapter.tests.ps1 at 4248cde9da24481c29775632d20f5cd5a9f19fea returned smoke-adapter: ok and exit 0 in Windows PowerShell 5.1.26100.9818 and PowerShell 7.6.9. The block retained one device removal, one crash, and 512 MiB peak process commit in all five cases. These counters also survived in the saved manifest when CIM threw.
  • scripts/test-smoke-artifacts.tests.ps1 passed in both shells. The negative control with the base smoke script exited 1 at the CIM exception in both shells. The unnamed-controller case failed with the previous fix.
  • Rebased onto 426a5a7. #2245 corrected the two Rust assertions that failed in the previous CI run and in main. The base CI passed. The new head has its own CI run.

Not tested

  • A live CIM outage in a retail run at this revision. The regression fixture uses a synthetic launcher.

AI use

  • OpenAI Codex (gpt-6.2-sol on the prior revision, GPT-6 on this revision, exact variant not exposed) reproduced the errors, updated the scripts and fixtures, ran the checks, and drafted the report.
<!-- greyfinch-sync:ivall/xcl:issue:5481114696 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1862). Originally posted by [rrrarrra9](https://github.com/rrrarrra9) on 2026-11-24T22:05:49Z. --- Related to #282. When a failed run has no usable `report.json` and CIM fails or returns no named hardware adapter, `smoke.ps1` emits the regression block with `gpu: unknown` and preserves the measured counters. **What is in it** - `scripts/smoke.ps1` makes optional CIM discovery non-fatal, skips basic and unnamed controllers, and prioritizes the runtime report. - `scripts/smoke-adapter.tests.ps1` covers a thrown CIM error, empty and basic-only lists, a usable controller after unnamed entries, and report precedence. The CIM-failure case also verifies the saved log and manifest from #2023's `-OutDir`. **Tested** - On Windows 11 build 26300.9974, `scripts/smoke-adapter.tests.ps1` at `4248cde9da24481c29775632d20f5cd5a9f19fea` returned `smoke-adapter: ok` and exit 0 in Windows PowerShell 5.1.26100.9818 and PowerShell 7.6.9. The block retained one device removal, one crash, and 512 MiB peak process commit in all five cases. These counters also survived in the saved manifest when CIM threw. - `scripts/test-smoke-artifacts.tests.ps1` passed in both shells. The negative control with the base smoke script exited 1 at the CIM exception in both shells. The unnamed-controller case failed with the previous fix. - Rebased onto `426a5a7`. [#2245](https://github.com/xcl-dev/xcl/pull/2245) corrected the two Rust assertions that failed in the previous CI run and in main. The [base CI](https://github.com/xcl-dev/xcl/actions/runs/45603329704) passed. The new head has its own CI run. **Not tested** - A live CIM outage in a retail run at this revision. The regression fixture uses a synthetic launcher. **AI use** - OpenAI Codex (gpt-6.2-sol on the prior revision, GPT-6 on this revision, exact variant not exposed) reproduced the errors, updated the scripts and fixtures, ran the checks, and drafted the report.
futurepro62 commented 2026-11-24 23:08:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T22:37:01Z.


Tested exact head 682bbba, script tests only, since this PR has no test report yet.

Tested

  • Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here).
  • powershell.exe -NoProfile -File scripts/smoke-adapter.tests.ps1 at the head: exit 0, smoke-adapter: ok.
  • The PR's test file against current main's script (689f2db): exit 1: the fixture's Fixture: CIM is unavailable error escapes main's smoke.ps1. So the new test catches the problem the PR fixes.

Not tested

  • PowerShell 7, the CI workflow itself, a game (no runtime code changed).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7146443312 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1862#issuecomment-7146443312). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T22:37:01Z. --- Tested exact head `682bbba`, script tests only, since this PR has no test report yet. **Tested** - Windows 11 Home 26300, Python 3.14.3 with pytest 9.0.3, Windows PowerShell 5.1.26100.9818 (no PowerShell 7 here). - `powershell.exe -NoProfile -File scripts/smoke-adapter.tests.ps1` at the head: exit 0, `smoke-adapter: ok`. - The PR's test file against current main's script (`689f2db`): exit 1: the fixture's `Fixture: CIM is unavailable` error escapes main's `smoke.ps1`. So the new test catches the problem the PR fixes. **Not tested** - PowerShell 7, the CI workflow itself, a game (no runtime code changed). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-25 02:08:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T01:38:28Z.


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:7149783903 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1862#issuecomment-7149783903). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T01:38:28Z. --- 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!
JJAutoCompare commented 2026-11-25 05:08:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T04:14:52Z.


XCL PR #1862 verification

Clean detached head 682bbba40ae822644ad88f5d6c40af01b5df7e75 on STOR-WINLAB. The diff changes scripts/smoke.ps1 and adds scripts/smoke-adapter.tests.ps1.

Windows 11 Enterprise Evaluation x64 build 26200, AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175 (WDDM 3.2), DXC 1.9.2609.5, and rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). PowerShell 5.1.26100.9818.

Tested

  • cargo build --workspace and cargo test --workspace --no-run succeeded outside Invoke-ArcTest.ps1.
  • .\scripts\smoke-adapter.tests.ps1 passed outside the lock (smoke-adapter: ok). With no report.json, a throwing CIM stub and a Basic-only response each produced gpu: unknown. A usable stub returned Fixture Controller. With report.json, the script used Report GPU and stripped the VRAM suffix. All four cases retained one device removal, one crash, and a 512 MB peak commit.
  • .\scripts\smoke-adapter.tests.ps1 -Smoke $parentSmoke reproduced Fixture: CIM is unavailable using the script extracted from parent 689f2db477c3c062cf162649781640ef8a977c18.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once inside Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. Exit 101. The log confirmed the A770 and the selected DXC directory. Totals from all 20 test result: lines (19 test binaries and one doctest run): 950 passed, 25 failed, 45 ignored.

Workspace failures and skips

  • 24 library failures: 20 compute PSO creation errors (0x80070057) and four shader result mismatches. One e2e failure: test_title_runs_and_game_folder_is_untouched reported blue where the RSSetDepthBiasX check expected green.
  • 25 lines began SKIPPED : 17 no wave64, three refused per-lane DXIL cases, and five for tiled tier, driver-cache control, debug-layer availability (two), and heap windows. Coverage excludes these skips.

Not tested

Matched main workspace run, retail-title smoke, live CIM outage, or GPUs other than the A770. The workspace failures are unclassified against main.

AI use

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1862-suite.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7152667324 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1862#issuecomment-7152667324). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T04:14:52Z. --- # XCL PR #1862 verification Clean detached head `682bbba40ae822644ad88f5d6c40af01b5df7e75` on STOR-WINLAB. The diff changes `scripts/smoke.ps1` and adds `scripts/smoke-adapter.tests.ps1`. Windows 11 Enterprise Evaluation x64 build 26200, AMD Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175 (WDDM 3.2), DXC 1.9.2609.5, and rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc). PowerShell 5.1.26100.9818. **Tested** - `cargo build --workspace` and `cargo test --workspace --no-run` succeeded outside `Invoke-ArcTest.ps1`. - `.\scripts\smoke-adapter.tests.ps1` passed outside the lock (`smoke-adapter: ok`). With no `report.json`, a throwing CIM stub and a Basic-only response each produced `gpu: unknown`. A usable stub returned `Fixture Controller`. With `report.json`, the script used `Report GPU` and stripped the VRAM suffix. All four cases retained one device removal, one crash, and a 512 MB peak commit. - `.\scripts\smoke-adapter.tests.ps1 -Smoke $parentSmoke` reproduced `Fixture: CIM is unavailable` using the script extracted from parent `689f2db477c3c062cf162649781640ef8a977c18`. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once inside `Invoke-ArcTest.ps1` with `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`. Exit 101. The log confirmed the A770 and the selected DXC directory. Totals from all 20 `test result:` lines (19 test binaries and one doctest run): 950 passed, 25 failed, 45 ignored. **Workspace failures and skips** - 24 library failures: 20 compute PSO creation errors (`0x80070057`) and four shader result mismatches. One `e2e` failure: `test_title_runs_and_game_folder_is_untouched` reported blue where the `RSSetDepthBiasX` check expected green. - 25 lines began `SKIPPED `: 17 no wave64, three refused per-lane DXIL cases, and five for tiled tier, driver-cache control, debug-layer availability (two), and heap windows. Coverage excludes these skips. **Not tested** Matched `main` workspace run, retail-title smoke, live CIM outage, or GPUs other than the A770. The workspace failures are unclassified against `main`. **AI use** T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr1862-suite.log` and published.
raylitebull commented 2026-11-25 11:09:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T10:46:11Z.


Diff audited (scripts/smoke.ps1 Get-CimInstance try/catch fallback to 'unknown' + scripts/smoke-adapter.tests.ps1) and CI workflow approved (running). Needs Build and test green plus smoke-adapter.tests.ps1 pass on Windows PowerShell 5.1 / 7.

<!-- greyfinch-sync:ivall/xcl:comment:7160147723 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1862#issuecomment-7160147723). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T10:46:11Z. --- Diff audited (`scripts/smoke.ps1` `Get-CimInstance` try/catch fallback to `'unknown'` + `scripts/smoke-adapter.tests.ps1`) and CI workflow approved (running). Needs `Build and test` green plus `smoke-adapter.tests.ps1` pass on Windows PowerShell 5.1 / 7.
raylitebull commented 2026-11-25 11:09:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T11:03:16Z.


Updated review on rebased fe29470:

  • Preserves #2023's -OutDir artifact manifest assertions in scripts/smoke-adapter.tests.ps1 alongside the Get-CimInstance try/catch -> 'unknown' fallback in scripts/smoke.ps1.
  • Diff audited and CI workflow approved (45600381633).

Remaining before merge: Build and test green plus fresh independent PowerShell verification of scripts/smoke-adapter.tests.ps1 on fe29470.

<!-- greyfinch-sync:ivall/xcl:comment:7160524906 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1862#issuecomment-7160524906). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T11:03:16Z. --- Updated review on rebased `fe29470`: - Preserves `#2023`'s `-OutDir` artifact manifest assertions in `scripts/smoke-adapter.tests.ps1` alongside the `Get-CimInstance` `try/catch` -> `'unknown'` fallback in `scripts/smoke.ps1`. - Diff audited and CI workflow approved (`45600381633`). **Remaining before merge:** `Build and test` green plus fresh independent PowerShell verification of `scripts/smoke-adapter.tests.ps1` on `fe29470`.
RavenCurseBurg commented 2026-11-25 15:08:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T15:06:29Z.


The PR now points at 5c1bb1d96322663dc1810aa78b7b24970cb63ef7, the same commit linked below. I reran scripts/smoke-adapter.tests.ps1 and scripts/test-smoke-artifacts.tests.ps1 from that clean PR checkout. Both passed in Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. These four local runs used synthetic fixtures.

Retested 4248cde9da24481c29775632d20f5cd5a9f19fea on Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. The original scripts/smoke-adapter.tests.ps1 and scripts/test-smoke-artifacts.tests.ps1 passed in both.

With the native CIM query denied in a restricted Windows session, I ran scripts/smoke.ps1 -Game Fixture -Xcl <stub.cmd> -Seconds 1 -Title constant -OutDir <dir>. A missing report produced unknown; a named report produced that name. With {"d3d12":{"adapter":" "}}, the block and manifest both contained just spaces. All three cases retained the fixture’s one device removal, one crash and 512 MB peak commit.

Fix and regression cases. The added fixture failed on the PR head in both shells. With the fix, a blank report name selects a usable CIM controller or falls back to unknown when CIM fails. Both suites and all three block/manifest comparisons passed per shell.

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

<!-- greyfinch-sync:ivall/xcl:comment:7166313476 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1862#issuecomment-7166313476). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T15:06:29Z. --- The PR now points at `5c1bb1d96322663dc1810aa78b7b24970cb63ef7`, the same commit linked below. I reran `scripts/smoke-adapter.tests.ps1` and `scripts/test-smoke-artifacts.tests.ps1` from that clean PR checkout. Both passed in Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. These four local runs used synthetic fixtures. Retested `4248cde9da24481c29775632d20f5cd5a9f19fea` on Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. The original `scripts/smoke-adapter.tests.ps1` and `scripts/test-smoke-artifacts.tests.ps1` passed in both. With the native CIM query denied in a restricted Windows session, I ran `scripts/smoke.ps1 -Game Fixture -Xcl <stub.cmd> -Seconds 1 -Title constant -OutDir <dir>`. A missing report produced `unknown`; a named report produced that name. With `{"d3d12":{"adapter":" "}}`, the block and manifest both contained just spaces. All three cases retained the fixture’s one device removal, one crash and 512 MB peak commit. [Fix and regression cases](https://github.com/RavenCurseBurg/xcl/commit/5c1bb1d96322663dc1810aa78b7b24970cb63ef7). The added fixture failed on the PR head in both shells. With the fix, a blank report name selects a usable CIM controller or falls back to `unknown` when CIM fails. Both suites and all three block/manifest comparisons passed per shell. Windows 11 26100.9711, i7-13700, RTX 4060. No retail run, Rust build or GPU workload. OpenAI Codex (GPT-6) ran the fixtures, prepared the patch and wrote this report.
DavidM1911 commented 2026-11-26 07:03:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T06:41:14Z.


Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7184680012 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1862#issuecomment-7184680012). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T06:41:14Z. --- Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
github-actions[bot] commented 2026-11-30 08:43:29 +00:00 (Migrated from github.com)

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


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:7273263901 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1862#issuecomment-7273263901). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-30T08:43:29Z. --- 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:01:45 +00:00 (Migrated from github.com)

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


Triage (#1607) – head 5c1bb1d

No merged change covers this: main's scripts/smoke.ps1 still calls Get-CimInstance Win32_VideoController without a try under $ErrorActionPreference = 'Stop', so a CIM failure ends the run before the block is printed. #1863 adds a similar try/catch around the call as part of a larger change, but does not fall back to unknown or skip blank names. #282 only adds a test.
No problems found in the diff. The Windows build-and-test check is red; its log was not available to see why.
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:7303560949 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1862#issuecomment-7303560949). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:01:45Z. --- **Triage (#1607)** – head 5c1bb1d No merged change covers this: main's `scripts/smoke.ps1` still calls `Get-CimInstance Win32_VideoController` without a `try` under `$ErrorActionPreference = 'Stop'`, so a CIM failure ends the run before the block is printed. #1863 adds a similar `try`/`catch` around the call as part of a larger change, but does not fall back to `unknown` or skip blank names. #282 only adds a test. No problems found in the diff. The Windows build-and-test check is red; its log was not available to see why. 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/1862:upstream-pr/1862'
git switch 'upstream-pr/1862'

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