Scripts: keep launcher streams in smoke artifacts #2461

Open
razormontana wants to merge 1 commit from upstream-pr/2471 into main
razormontana commented 2026-11-25 19:39:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by razormontana on 2026-11-25T19:39:20Z.


Part of #1855 and #505. A world-load tester recovered the cause of a fail-fast after redirecting the launcher streams separately. smoke.ps1 -OutDir now saves those streams, including when a completed launcher failed before printing the runtime log path. Failure report

Related changes cover the startup error printed by the script (#589) and per-run artifact directories (#1863).

What is in it

  • scripts/smoke.ps1 writes stdout.txt and stderr.txt before parsing the runtime log path. Reusing the directory replaces both files, including when the new launcher has no stderr output.
  • Get-Help -Parameter OutDir recommends a fresh directory per run and checking the current exit code before reading artifacts. Reviewer suggestion
  • scripts/test-smoke-artifacts.tests.ps1 exercises a failed synthetic launcher with an allocator diagnostic, a successful run in the same directory, and an early failure before the launcher prints a log path.

Tested

  • Windows 11 build 22631.5335, Core i7-10700K, RTX 3070 (driver 32.0.16.1742). Windows PowerShell 5.1.22621.4391 and PowerShell 7.6.9. Base 2898511af1c038a2ef809719e9b6f89e5675c422, head df177bb98c5edfc0e193636b18202df7c4c0da43.

  • Both shells ran -NoProfile -ExecutionPolicy Bypass -File scripts/test-smoke-artifacts.tests.ps1 and -NoProfile -ExecutionPolicy Bypass -File scripts/smoke-title.tests.ps1. All four invocations passed. The allocator fixture failed against the base script in both shells because it discarded stderr. The no-log fixture failed against the initial patch in both shells because it retained the previous run’s stdout.

  • python -B -m unittest discover -s scripts on Python 3.14.3 passed all 25 tests. git show --check HEAD passed.

  • Rust 1.100.0 stable x64 MSVC, debug. cargo build --offline --locked --workspace succeeded. cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output on the RTX 3070 reported 1,363 passed, 0 failed and 46 ignored. There were 26 runtime SKIPPED notices for cases Cargo counted as passed.

  • On d70462c72f191b491a093bec0514698fec6bf8af, both PowerShell versions passed both synthetic fixtures and parser and help assertions. Executable tokens matched the prior head.

Not tested

The regression fixture uses synthetic launcher failures. If an early failure occurs in a reused output directory, the new launcher streams can sit alongside runtime artifacts from a prior run.

AI use

Codex GPT-6.2 wrote the stream-retention change and fixtures, ran the tests, and added and checked the -OutDir help.

<!-- greyfinch-sync:ivall/xcl:issue:5497926680 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2471). Originally posted by [razormontana](https://github.com/razormontana) on 2026-11-25T19:39:20Z. --- Part of #1855 and #505. A world-load tester recovered the cause of a fail-fast after redirecting the launcher streams separately. `smoke.ps1 -OutDir` now saves those streams, including when a completed launcher failed before printing the runtime log path. [Failure report](https://github.com/xcl-dev/xcl/issues/1855#issuecomment-7148099281) Related changes cover the startup error printed by the script (#589) and per-run artifact directories (#1863). **What is in it** - `scripts/smoke.ps1` writes `stdout.txt` and `stderr.txt` before parsing the runtime log path. Reusing the directory replaces both files, including when the new launcher has no stderr output. - `Get-Help -Parameter OutDir` recommends a fresh directory per run and checking the current exit code before reading artifacts. [Reviewer suggestion](https://github.com/xcl-dev/xcl/pull/2471#issuecomment-7173173416) - `scripts/test-smoke-artifacts.tests.ps1` exercises a failed synthetic launcher with an allocator diagnostic, a successful run in the same directory, and an early failure before the launcher prints a log path. **Tested** - Windows 11 build 22631.5335, Core i7-10700K, RTX 3070 (driver 32.0.16.1742). Windows PowerShell 5.1.22621.4391 and PowerShell 7.6.9. Base `2898511af1c038a2ef809719e9b6f89e5675c422`, head `df177bb98c5edfc0e193636b18202df7c4c0da43`. - Both shells ran `-NoProfile -ExecutionPolicy Bypass -File scripts/test-smoke-artifacts.tests.ps1` and `-NoProfile -ExecutionPolicy Bypass -File scripts/smoke-title.tests.ps1`. All four invocations passed. The allocator fixture failed against the base script in both shells because it discarded stderr. The no-log fixture failed against the initial patch in both shells because it retained the previous run’s stdout. - `python -B -m unittest discover -s scripts` on Python 3.14.3 passed all 25 tests. `git show --check HEAD` passed. - Rust 1.100.0 stable x64 MSVC, debug. `cargo build --offline --locked --workspace` succeeded. `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-output` on the RTX 3070 reported 1,363 passed, 0 failed and 46 ignored. There were 26 runtime `SKIPPED` notices for cases Cargo counted as passed. - On `d70462c72f191b491a093bec0514698fec6bf8af`, both PowerShell versions passed both synthetic fixtures and parser and help assertions. Executable tokens matched the prior head. **Not tested** The regression fixture uses synthetic launcher failures. If an early failure occurs in a reused output directory, the new launcher streams can sit alongside runtime artifacts from a prior run. **AI use** Codex GPT-6.2 wrote the stream-retention change and fixtures, ran the tests, and added and checked the `-OutDir` help.
RavenCurseBurg commented 2026-11-25 20:05:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by RavenCurseBurg on 2026-11-25T20:05:18Z.


Tested on df177bb98c5edfc0e193636b18202df7c4c0da43. Windows 11 build 26100.9711, Core i7-13700, Windows PowerShell 5.1 and PowerShell 7.6.9.

  • I ran scripts/smoke.ps1 -Game ok -Seconds 1 -Xcl <fixture.exe> -OutDir <out> -Title ok with a small native console fixture. It wrote 8,192 repetitions of out-漢-🚀\r\n\n and err-é-Ω\n\r\n to the two pipes concurrently, then a valid Log: line on stdout and distinct tails without newlines. Both shells preserved the complete text, including blank lines and tails. Stdout exceeded 122 KB and stderr was 98,312 bytes before any BOM. Windows PowerShell added a UTF-8 BOM to both files. PowerShell 7 did not.
  • I repeated the command with a fixture that printed no log path and exited 37. In the reused directory both stream files contained the new diagnostics. The previous successful run’s manifest.json (still reporting 0x0), xcl.log, and report.json remained byte-for-byte unchanged. In a fresh directory only stdout.txt and stderr.txt appeared. All three scenarios passed in each shell.
  • Both shells also ran -NoProfile -ExecutionPolicy Bypass -File scripts/test-smoke-artifacts.tests.ps1 and -File scripts/smoke-title.tests.ps1. All four invocations passed.

A documentation-only follow-up puts the fresh-directory guidance beside -OutDir in the script help.

Not tested — A game launch, GPU execution, or the Rust workspace suite. OpenAI Codex (GPT-6) prepared the fixtures and documentation change, ran the checks, and wrote this report.

Rechecked the new help on d70462c72f191b491a093bec0514698fec6bf8af. In Windows PowerShell 5.1 and PowerShell 7.6.9, Get-Help .\scripts\smoke.ps1 -Parameter OutDir displayed the fresh-directory recommendation and named the artifacts that can remain from an earlier run. With a native stand-in, I ran scripts/smoke.ps1 -Game <fixture> -Seconds 1 -Xcl <probe> -Title fixture -OutDir <dir>, first successfully and then with an early exit before a log path. The reused directory contained both new streams and three byte-identical prior artifacts; the fresh directory contained exactly the two new streams. Both shells also passed scripts/test-smoke-artifacts.tests.ps1 and scripts/smoke-title.tests.ps1 (four invocations). Windows 11 build 26100, Core i7-13700. OpenAI Codex (GPT-6) ran the fixtures; no retail title or GPU workload was used.

<!-- greyfinch-sync:ivall/xcl:comment:7173173416 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2471#issuecomment-7173173416). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T20:05:18Z. --- **Tested** on `df177bb98c5edfc0e193636b18202df7c4c0da43`. Windows 11 build 26100.9711, Core i7-13700, Windows PowerShell 5.1 and PowerShell 7.6.9. - I ran `scripts/smoke.ps1 -Game ok -Seconds 1 -Xcl <fixture.exe> -OutDir <out> -Title ok` with a small native console fixture. It wrote 8,192 repetitions of `out-漢-🚀\r\n\n` and `err-é-Ω\n\r\n` to the two pipes concurrently, then a valid `Log:` line on stdout and distinct tails without newlines. Both shells preserved the complete text, including blank lines and tails. Stdout exceeded 122 KB and stderr was 98,312 bytes before any BOM. Windows PowerShell added a UTF-8 BOM to both files. PowerShell 7 did not. - I repeated the command with a fixture that printed no log path and exited 37. In the reused directory both stream files contained the new diagnostics. The previous successful run’s `manifest.json` (still reporting `0x0`), `xcl.log`, and `report.json` remained byte-for-byte unchanged. In a fresh directory only `stdout.txt` and `stderr.txt` appeared. All three scenarios passed in each shell. - Both shells also ran `-NoProfile -ExecutionPolicy Bypass -File scripts/test-smoke-artifacts.tests.ps1` and `-File scripts/smoke-title.tests.ps1`. All four invocations passed. A [documentation-only follow-up](https://github.com/RavenCurseBurg/xcl/commit/9eaf8e58aab29e8cd130e7331d1d8040dcb732d1) puts the fresh-directory guidance beside `-OutDir` in the script help. **Not tested** — A game launch, GPU execution, or the Rust workspace suite. OpenAI Codex (GPT-6) prepared the fixtures and documentation change, ran the checks, and wrote this report. Rechecked the new help on `d70462c72f191b491a093bec0514698fec6bf8af`. In Windows PowerShell 5.1 and PowerShell 7.6.9, `Get-Help .\scripts\smoke.ps1 -Parameter OutDir` displayed the fresh-directory recommendation and named the artifacts that can remain from an earlier run. With a native stand-in, I ran `scripts/smoke.ps1 -Game <fixture> -Seconds 1 -Xcl <probe> -Title fixture -OutDir <dir>`, first successfully and then with an early exit before a log path. The reused directory contained both new streams and three byte-identical prior artifacts; the fresh directory contained exactly the two new streams. Both shells also passed `scripts/test-smoke-artifacts.tests.ps1` and `scripts/smoke-title.tests.ps1` (four invocations). Windows 11 build 26100, Core i7-13700. OpenAI Codex (GPT-6) ran the fixtures; no retail title or GPU workload was used.
DavidM1911 commented 2026-11-25 21:05:15 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T20:22:02Z.


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:7173564052 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2471#issuecomment-7173564052). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T20:22:02Z. --- 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-26 23:27:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-26T23:27:45Z.


Tested: Clean d70462c72f191b491a093bec0514698fec6bf8af, Windows 11 25H2 build 26200.9974, Windows PowerShell 5.1.26100.9818. powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\test-smoke-artifacts.tests.ps1 exited 0 with all assertions passed, including saving the launcher streams on early failure and replacing old stream artifacts when reusing an output directory.

Not tested: PowerShell 7, a retail title, or the workspace suite. The fixture used a mock launcher and did not exercise the GPU.

AI use: T3 Code / Codex (gpt-6.2-sol) ran the test and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7205561447 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2471#issuecomment-7205561447). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-26T23:27:45Z. --- **Tested:** Clean `d70462c72f191b491a093bec0514698fec6bf8af`, Windows 11 25H2 build 26200.9974, Windows PowerShell 5.1.26100.9818. `powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\test-smoke-artifacts.tests.ps1` exited 0 with all assertions passed, including saving the launcher streams on early failure and replacing old stream artifacts when reusing an output directory. **Not tested:** PowerShell 7, a retail title, or the workspace suite. The fixture used a mock launcher and did not exercise the GPU. **AI use:** T3 Code / Codex (`gpt-6.2-sol`) ran the test and wrote this report.
Foniass commented 2026-12-01 08:08:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:08:24Z.


Triage (#1607) – head d70462c

No open or merged PR saves the launcher's stdout/stderr: main's smoke.ps1 reads stderr and discards it ($null = $stderrTask.Result). #1863 (a separate -ArtifactsDir with per-run folders) and #2980 (-Repeat) change the artifacts in other ways and do not keep the streams.
The PR writes stdout.txt/stderr.txt before the Log: check, so a launcher that fails early still leaves them, and the test covers a failing exit code, a reused directory and a run without a log path. No problems found in the diff. The branch conflicts with main and needs a rebase.
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:7304925436 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2471#issuecomment-7304925436). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:08:24Z. --- **Triage (#1607)** – head d70462c No open or merged PR saves the launcher's stdout/stderr: main's `smoke.ps1` reads stderr and discards it (`$null = $stderrTask.Result`). #1863 (a separate `-ArtifactsDir` with per-run folders) and #2980 (`-Repeat`) change the artifacts in other ways and do not keep the streams. The PR writes `stdout.txt`/`stderr.txt` before the `Log:` check, so a launcher that fails early still leaves them, and the test covers a failing exit code, a reused directory and a run without a log path. No problems found in the diff. The branch conflicts with main and needs a rebase. 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/2471:upstream-pr/2471'
git switch 'upstream-pr/2471'

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