Skip to content

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

Closed
sombraSoft wants to merge 1 commit into
xcl-dev:mainfrom
sombraSoft:ci/script-tests
Closed

sombraSoft wants to merge 1 commit into
xcl-dev:mainfrom
sombraSoft:ci/script-tests

Conversation

@sombraSoft

@sombraSoft sombraSoft commented Nov 23, 2026 •

Copy link
Copy Markdown

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.
@itsonewi

Copy link
Copy Markdown

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.

@DavidM1911

Copy link
Copy Markdown
Contributor

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

Thanks!

@RavenCurseBurg

RavenCurseBurg commented Nov 25, 2026 •

Copy link
Copy Markdown

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.

@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the stale No activity for 3 days; closed 4 days later unless something happens label Nov 30, 2026
@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

Triage (#1607) – head 5ff43de

No open or merged PR runs scripts/test-native-stderr.tests.ps1 in CI; #1019 adds scripts/test_*.py (Python) to CI, a different script set.
No problems found in the diff; the scripts job runs the test under both powershell (5.1) and pwsh without a Rust build. Conflicts with main's ci.yml.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

@github-actions github-actions Bot removed the stale No activity for 3 days; closed 4 days later unless something happens label Dec 2, 2026
@sombraSoft sombraSoft closed this Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants