Scripts: add -OutDir artifact capture to smoke.ps1 (#1855) #2013

Merged
heditrigui merged 2 commits from upstream-pr/2023 into main 2026-11-25 10:51:31 +00:00
heditrigui commented 2026-11-25 01:01:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by heditrigui on 2026-11-25T01:01:48Z.


Summary

Adds -OutDir artifact capture to scripts/smoke.ps1 to keep artifacts for reproducible world-entry smoke runs (resolving #1855):

  • Adds optional -OutDir <path> parameter to scripts/smoke.ps1.
  • When -OutDir is provided, ensures the destination directory exists and copies xcl.log as well as report.json (if present) to the output directory.
  • Writes a structured manifest.json recording smoke run metadata: commit hash, dirty flag, GPU name, title label, duration seconds, exit code, frame stats, presents count, peak commit memory (MB), device removals count, crashes count, input schedule ($env:XCL_PRESS_AT), and data root ($env:XCL_DATA_ROOT).
  • Adds support for running mock/wrapper script fixtures ending in .cmd or .bat via cmd.exe /c under System.Diagnostics.ProcessStartInfo.
  • Adds test suite scripts/test-smoke-artifacts.tests.ps1 verifying artifact directory creation, log preservation, optional report preservation, and manifest field consistency across consecutive smoke runs.

Tested

  • powershell -ExecutionPolicy Bypass -File scripts/test-smoke-artifacts.tests.ps1 (all assertions passed).
  • python -m pytest scripts/ (16 passed in 0.48s).
  • Validated with scripts/pr_check.py --local.

Not tested

  • Retail game smoke execution (scripts/ tools are non-runtime code).

AI use

  • Antigravity (Gemini 3.8 Flash (High))
<!-- greyfinch-sync:ivall/xcl:issue:6594691391 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2023). Originally posted by [heditrigui](https://github.com/heditrigui) on 2026-11-25T01:01:48Z. --- ### Summary Adds `-OutDir` artifact capture to `scripts/smoke.ps1` to keep artifacts for reproducible world-entry smoke runs (resolving #1855): - Adds optional `-OutDir <path>` parameter to `scripts/smoke.ps1`. - When `-OutDir` is provided, ensures the destination directory exists and copies `xcl.log` as well as `report.json` (if present) to the output directory. - Writes a structured `manifest.json` recording smoke run metadata: commit hash, dirty flag, GPU name, title label, duration seconds, exit code, frame stats, presents count, peak commit memory (MB), device removals count, crashes count, input schedule (`$env:XCL_PRESS_AT`), and data root (`$env:XCL_DATA_ROOT`). - Adds support for running mock/wrapper script fixtures ending in `.cmd` or `.bat` via `cmd.exe /c` under `System.Diagnostics.ProcessStartInfo`. - Adds test suite `scripts/test-smoke-artifacts.tests.ps1` verifying artifact directory creation, log preservation, optional report preservation, and manifest field consistency across consecutive smoke runs. **Tested** - `powershell -ExecutionPolicy Bypass -File scripts/test-smoke-artifacts.tests.ps1` (all assertions passed). - `python -m pytest scripts/` (16 passed in 0.48s). - Validated with `scripts/pr_check.py --local`. **Not tested** - Retail game smoke execution (`scripts/` tools are non-runtime code). **AI use** - Antigravity (Gemini 3.8 Flash (High))
raylitebull commented 2026-11-25 02:08:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T01:13:02Z.


Code review on 6eb0e95:

  • -OutDir artifact capture (xcl.log, report.json, manifest.json) and .cmd/.bat stand-in quoting in scripts/smoke.ps1 + scripts/test-smoke-artifacts.tests.ps1 are clean and focused.
  • Diff audited and CI workflow approved (currently running). Note that #589, #521, #588, and #2010 also modify scripts/smoke.ps1, so landing order may require a quick rebase depending on which merges first.

Remaining before merge: Build and test (Windows, no GPU) finishing green plus an independent verification pass on 6eb0e95.

<!-- greyfinch-sync:ivall/xcl:comment:7149323261 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2023#issuecomment-7149323261). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T01:13:02Z. --- Code review on `6eb0e95`: - `-OutDir` artifact capture (`xcl.log`, `report.json`, `manifest.json`) and `.cmd`/`.bat` stand-in quoting in `scripts/smoke.ps1` + `scripts/test-smoke-artifacts.tests.ps1` are clean and focused. - Diff audited and `CI` workflow approved (currently running). Note that `#589`, `#521`, `#588`, and `#2010` also modify `scripts/smoke.ps1`, so landing order may require a quick rebase depending on which merges first. **Remaining before merge:** `Build and test (Windows, no GPU)` finishing green plus an **independent verification pass** on `6eb0e95`.
JJAutoCompare commented 2026-11-25 03:05:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T02:48:57Z.


PR #2023 re-test

The stale report.json fix passed at 2cc20ac. Tested clean head 2cc20ac58b8c6abef3df8ca1bc1e69f2061e1f8f. The diff from origin/main is limited to scripts/smoke.ps1 and its PowerShell fixture.

Tested

  • STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, wave 8–32, DoublePrecisionFloatShaderOps=0). Rust 1.100.0 (0ef1bc386), DXC/DXIL 1.9.2609.5, Windows PowerShell 5.1.
  • Both scripts parsed with zero AST errors. All upstream fixture assertions passed. An independent two-run capture copied a source report.json on the first run, then removed the stale destination report on the second run into the same -OutDir with no source report. The second run refreshed xcl.log and manifest.json. Fresh captures with and without a report passed. Omitting -OutDir emitted the smoke block and created no capture artifacts.
  • The fixture used a synthetic adapter fallback and nonrecursive cleanup to avoid host inspection and recursive deletion.
  • cargo build --workspace and cargo test --workspace --no-run passed with debug info disabled and outside the GPU lock.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under the shared Arc lock and exited 1. Across 21 result summaries, libtest reported 1,126 passed, 28 failed, 46 ignored, with 24 SKIPPED lines excluded from coverage.
  • The 28 failures were 23 compute PSO creation errors (0x80070057), four GPU result mismatches (FMA, mip sampling, f16 lane preservation and wave reduction), and one test-title assertion for dynamic depth bias (RSSetDepthBiasX). Skip markers covered 19 wave64 cases, three wave32 lowering refusals, one driver-cache control case and one heap-window case.

Not tested

Retail titles, optional XCL_SAMPLE_* inputs, other adapters, live adapter discovery in the smoke fallback, and test-title audio voice checks (no audio endpoint, 0x80070490).

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 pr2023-rerun-suite.log and published this report.

<!-- greyfinch-sync:ivall/xcl:comment:7151222797 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2023#issuecomment-7151222797). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T02:48:57Z. --- ## PR #2023 re-test **The stale `report.json` fix passed at `2cc20ac`.** Tested clean head `2cc20ac58b8c6abef3df8ca1bc1e69f2061e1f8f`. The diff from `origin/main` is limited to `scripts/smoke.ps1` and its PowerShell fixture. **Tested** - STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, wave 8–32, `DoublePrecisionFloatShaderOps=0`). Rust 1.100.0 (`0ef1bc386`), DXC/DXIL 1.9.2609.5, Windows PowerShell 5.1. - Both scripts parsed with zero AST errors. All upstream fixture assertions passed. An independent two-run capture copied a source `report.json` on the first run, then removed the stale destination report on the second run into the same `-OutDir` with no source report. The second run refreshed `xcl.log` and `manifest.json`. Fresh captures with and without a report passed. Omitting `-OutDir` emitted the smoke block and created no capture artifacts. - The fixture used a synthetic adapter fallback and nonrecursive cleanup to avoid host inspection and recursive deletion. - `cargo build --workspace` and `cargo test --workspace --no-run` passed with debug info disabled and outside the GPU lock. - `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once under the shared Arc lock and exited 1. Across 21 result summaries, libtest reported **1,126 passed, 28 failed, 46 ignored**, with **24 `SKIPPED ` lines** excluded from coverage. - The 28 failures were 23 compute PSO creation errors (`0x80070057`), four GPU result mismatches (FMA, mip sampling, f16 lane preservation and wave reduction), and one test-title assertion for dynamic depth bias (`RSSetDepthBiasX`). Skip markers covered 19 wave64 cases, three wave32 lowering refusals, one driver-cache control case and one heap-window case. **Not tested** Retail titles, optional `XCL_SAMPLE_*` inputs, other adapters, live adapter discovery in the smoke fallback, and test-title audio voice checks (no audio endpoint, `0x80070490`). **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 `pr2023-rerun-suite.log` and published this report.
heditrigui commented 2026-11-25 03:05:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by heditrigui on 2026-11-25T02:58:16Z.


Thanks for the thorough empirical verification and great catch @JJAutoCompare!

Addressed in \2cc20ac: when reusing an -OutDir\ for a subsequent run where no source
eport.json\ is produced, \smoke.ps1\ now explicitly cleans up any stale
eport.json\ in the destination directory (\Remove-Item -LiteralPath \ -Force). Also updated \scripts/test-smoke-artifacts.tests.ps1\ to reuse the same output directory on run 2 and assert that the prior
eport.json\ is cleaned up cleanly.

<!-- greyfinch-sync:ivall/xcl:comment:7151440012 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2023#issuecomment-7151440012). Originally posted by [heditrigui](https://github.com/heditrigui) on 2026-11-25T02:58:16Z. --- Thanks for the thorough empirical verification and great catch @JJAutoCompare! Addressed in \2cc20ac\: when reusing an \-OutDir\ for a subsequent run where no source \ eport.json\ is produced, \smoke.ps1\ now explicitly cleans up any stale \ eport.json\ in the destination directory (\Remove-Item -LiteralPath \ -Force\). Also updated \scripts/test-smoke-artifacts.tests.ps1\ to reuse the same output directory on run 2 and assert that the prior \ eport.json\ is cleaned up cleanly.
luckyteagirl commented 2026-11-25 04:10:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T03:21:45Z.


Tested

  • Exact PR head 2cc20ac58b8c6abef3df8ca1bc1e69f2061e1f8f on Windows 11 build 26200 with Windows PowerShell 5.1 and Python 3.11.9. This is a script-only change; the RX 6800M GPU was not exercised.
  • powershell -NoProfile -ExecutionPolicy Bypass -File scripts\test-smoke-artifacts.tests.ps1: 1 script test passed, 0 failed. Its mock XCL run verified the saved log, optional report.json, manifest fields, emitted smoke block, and removal of a stale report.json when the output directory is reused.
  • python -m pytest scripts: 25 passed, 0 failed.

Not tested

  • A retail title smoke run, a real XCL log or report, the Rust workspace suite, PowerShell 7, or sharing the generated manifest outside this machine. No game files were used or uploaded.

AI use

OpenAI Codex (GPT-6, exact variant not exposed in this session) reviewed the exact diff, ran the script tests, checked their outputs, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7151842955 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2023#issuecomment-7151842955). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-25T03:21:45Z. --- **Tested** - Exact PR head `2cc20ac58b8c6abef3df8ca1bc1e69f2061e1f8f` on Windows 11 build 26200 with Windows PowerShell 5.1 and Python 3.11.9. This is a script-only change; the RX 6800M GPU was not exercised. - `powershell -NoProfile -ExecutionPolicy Bypass -File scripts\test-smoke-artifacts.tests.ps1`: **1 script test passed, 0 failed**. Its mock XCL run verified the saved log, optional `report.json`, manifest fields, emitted smoke block, and removal of a stale `report.json` when the output directory is reused. - `python -m pytest scripts`: **25 passed, 0 failed**. **Not tested** - A retail title smoke run, a real XCL log or report, the Rust workspace suite, PowerShell 7, or sharing the generated manifest outside this machine. No game files were used or uploaded. **AI use** OpenAI Codex (GPT-6, exact variant not exposed in this session) reviewed the exact diff, ran the script tests, checked their outputs, and drafted this report.
DavidM1911 commented 2026-11-25 05:08:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T04:12:11Z.


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:7152625024 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2023#issuecomment-7152625024). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T04:12:11Z. --- 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!
upstream-sync closed this pull request 2026-11-25 11:07:56 +00:00
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!2013
No description provided.