Skip to content

Scripts: keep launcher streams in smoke artifacts - #2471

Open
razormontana wants to merge 1 commit into
xcl-dev:mainfrom
razormontana:scripts/retain-smoke-launcher-streams
Open

razormontana wants to merge 1 commit into
xcl-dev:mainfrom
razormontana:scripts/retain-smoke-launcher-streams

Conversation

@razormontana

@razormontana razormontana commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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.

@razormontana
razormontana marked this pull request as ready for review November 25, 2026 19:46
@RavenCurseBurg

RavenCurseBurg commented Nov 25, 2026 •

Copy link
Copy Markdown

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.

@DavidM1911

Copy link
Copy Markdown
Contributor

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

Thanks!

A world-load run can die with a useful error on stderr. Save both launcher streams with the -OutDir evidence before looking for the log path so early failures leave their diagnostics and replace stale stream files.

Document that early failures can leave runtime artifacts from a previous run when an output directory is reused. Describe how to check the current launcher exit.

Part of xcl-dev#1855 and xcl-dev#505.

Assisted-by: Codex GPT-6.2
@razormontana
razormontana force-pushed the scripts/retain-smoke-launcher-streams branch from df177bb to d70462c Compare November 26, 2026 17:06
@JJAutoCompare

Copy link
Copy Markdown

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

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants