CI: run scripts/test-native-stderr.tests.ps1 under PowerShell 5.1 and 7 #279

Open
github-bot wants to merge 1 commit from github-bot/gh-279 into main AGit
Owner

@⁠sombraSoft on GitHub · 2026-11-23 22:17 UTC · original
sombraSoft:ci/script-tests → main · +18 −1 · 1 files · 1 commits · open

CI never runs scripts/test-native-stderr.tests.ps1, the test that checks scripts/test.ps1 survives a native Cargo writing to stderr (which Windows PowerShell 5.1 treats as an error once it is redirected). A new scripts job runs it on every push and pull request, under both powershell (5.1) and pwsh, without a Rust build (~16 s).

Part of #265

What is in it

  • .github/workflows/ci.yml: a new scripts job (windows-2025, 10-minute timeout) with two steps, shell: powershell and shell: pwsh, each running ./scripts/test-native-stderr.tests.ps1. The header comment lists the new check.

CI time

  • 0 wall time: the scripts job runs in parallel and takes 16 s, with no Rust build.

Tested

  • Local, Windows 11: pwsh -NoProfile -File scripts/test-native-stderr.tests.ps1 and powershell -NoProfile -ExecutionPolicy Bypass -File ... (5.1.26100) both exit 0. With one assertion changed to fail (not committed), both exit 1.
  • Fork run of the same commit: https://github.com/sombraSoft/xcl/actions/runs/45276467450. The scripts job passed (both steps) and Build and test (Windows, no GPU) passed.
  • Full suite on main (9ab7d76), RTX 3060 Ti (driver 621.24), Ryzen 9 5900X, Windows 11, rustc 1.97.1, debug: scripts/test.ps1 → 651 passed, 0 failed, 40 ignored; SKIPPED: 2 (no wave64). This PR changes only CI config, so the compiled code is the same.

Regression run

  • Not needed: no crates/xcl/src change.

Not tested

  • The new job only gates merges if it is added to the required checks in branch protection.

AI use

  • Claude Code (Claude Sonnet 5.5) wrote the change; Claude Code (Claude Opus 5.5) reviewed it and wrote this description; I read the diff.
**@⁠sombraSoft** on GitHub · 2026-11-23 22:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/279) `sombraSoft:ci/script-tests` → `main` · +18 −1 · 1 files · 1 commits · open CI never runs `scripts/test-native-stderr.tests.ps1`, the test that checks `scripts/test.ps1` survives a native Cargo writing to stderr (which Windows PowerShell 5.1 treats as an error once it is redirected). A new `scripts` job runs it on every push and pull request, under both `powershell` (5.1) and `pwsh`, without a Rust build (~16 s). Part of #265 **What is in it** - `.github/workflows/ci.yml`: a new `scripts` job (windows-2025, 10-minute timeout) with two steps, `shell: powershell` and `shell: pwsh`, each running `./scripts/test-native-stderr.tests.ps1`. The header comment lists the new check. **CI time** - 0 wall time: the `scripts` job runs in parallel and takes 16 s, with no Rust build. **Tested** - Local, Windows 11: `pwsh -NoProfile -File scripts/test-native-stderr.tests.ps1` and `powershell -NoProfile -ExecutionPolicy Bypass -File ...` (5.1.26100) both exit 0. With one assertion changed to fail (not committed), both exit 1. - Fork run of the same commit: https://github.com/sombraSoft/xcl/actions/runs/45276467450. The `scripts` job passed (both steps) and `Build and test (Windows, no GPU)` passed. - Full suite on `main` (9ab7d76), RTX 3060 Ti (driver 621.24), Ryzen 9 5900X, Windows 11, rustc 1.97.1, debug: `scripts/test.ps1` → 651 passed, 0 failed, 40 ignored; SKIPPED: 2 (no wave64). This PR changes only CI config, so the compiled code is the same. **Regression run** - Not needed: no `crates/xcl/src` change. **Not tested** - The new job only gates merges if it is added to the required checks in branch protection. **AI use** - Claude Code (Claude Sonnet 5.5) wrote the change; Claude Code (Claude Opus 5.5) reviewed it and wrote this description; I read the diff.
The test checks that scripts/test.ps1 survives a native Cargo writing to stderr, which Windows
PowerShell 5.1 treats as an error once it is redirected. Nothing ran it, so a change to
scripts/test.ps1 could break that on one shell and still pass CI.

A new `scripts` job runs it on windows-2025 under `powershell` (5.1) and `pwsh`, next to the
build job and without a Rust build. The test throws on a failed assertion, so a failure ends
the step with exit code 1.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:18:31 +00:00
Author
Owner

@⁠itsonewi on GitHub · 2026-11-25 10:39 UTC · original

Could the new scripts job also run scripts/smoke-title.tests.ps1? It is the other *.tests.ps1 in scripts/ and nothing runs it in CI either; it checks the title: hash from #677 (the privacy guarantee that a smoke block does not name the game folder). Its header says it runs under powershell.exe or pwsh.exe, so the same two steps could run both files, or the job could run Get-ChildItem scripts/*.tests.ps1 in each shell. That would make the job cover the script tests rather than one file.

No change needed for this PR if you would rather keep it to test-native-stderr.tests.ps1; in that case I can file the smoke-title gap separately.

**@⁠itsonewi** on GitHub · 2026-11-25 10:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/279#issuecomment-7159996647) Could the new `scripts` job also run `scripts/smoke-title.tests.ps1`? It is the other `*.tests.ps1` in `scripts/` and nothing runs it in CI either; it checks the `title:` hash from #677 (the privacy guarantee that a smoke block does not name the game folder). Its header says it runs under `powershell.exe` or `pwsh.exe`, so the same two steps could run both files, or the job could run `Get-ChildItem scripts/*.tests.ps1` in each shell. That would make the job cover the script tests rather than one file. No change needed for this PR if you would rather keep it to `test-native-stderr.tests.ps1`; in that case I can file the `smoke-title` gap separately.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 15:03 UTC · original

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!

**@⁠DavidM1911** on GitHub · 2026-11-25 15:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/279#issuecomment-7166238533) 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!
Author
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 19:05 UTC · original · edited 2026-11-25 19:11 UTC

I tested the smoke-title coverage requested above. This PR's head 5ff43de contains only the native-stderr fixture. The title fixture is present on main at 2898511af1c0. The tested merge commit has those two parents and adds a separate smoke-title step in each shell. The PR branch can fast-forward to it.

From the clean merge I read the four shell/command pairs from .github/workflows/ci.yml and ran each script using its declared shell, -NoProfile -NonInteractive -ExecutionPolicy Bypass -File. Both scripts/test-native-stderr.tests.ps1 and scripts/smoke-title.tests.ps1 exited 0 on Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. In temporary copies I then changed one expected title hash and one expected skip summary. Each corresponding step exited 1 in both shells with the expected assertion. The original files stayed clean.

Windows 11 build 26100.9711, i7-13700. Local execution of the job's scripts with synthetic fixtures only. No hosted Actions job, branch-protection change, retail game or GPU run. OpenAI Codex (GPT-6) edited the workflow and ran the checks.

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 19:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/279#issuecomment-7171806387) · edited 2026-11-25 19:11 UTC I tested the smoke-title coverage requested above. This PR's head `5ff43de` contains only the native-stderr fixture. The title fixture is present on `main` at `2898511af1c0`. The [tested merge commit](https://github.com/RavenCurseBurg/xcl/commit/e4a29a05f1446b094419d658ee8b612a8b8358ac) has those two parents and adds a separate smoke-title step in each shell. The PR branch can fast-forward to it. From the clean merge I read the four shell/command pairs from `.github/workflows/ci.yml` and ran each script using its declared shell, `-NoProfile -NonInteractive -ExecutionPolicy Bypass -File`. Both `scripts/test-native-stderr.tests.ps1` and `scripts/smoke-title.tests.ps1` exited 0 on Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. In temporary copies I then changed one expected title hash and one expected skip summary. Each corresponding step exited 1 in both shells with the expected assertion. The original files stayed clean. Windows 11 build 26100.9711, i7-13700. Local execution of the job's scripts with synthetic fixtures only. No hosted Actions job, branch-protection change, retail game or GPU run. OpenAI Codex (GPT-6) edited the workflow and ran the checks.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/279/head:github-bot/gh-279'
git switch 'github-bot/gh-279'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-279'
git switch 'github-bot/gh-279'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-279'
git switch 'github-bot/gh-279'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-279'
git switch 'main'
git merge --squash 'github-bot/gh-279'
git switch 'main'
git merge --ff-only 'github-bot/gh-279'
git switch 'main'
git merge 'github-bot/gh-279'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.