tests: make startup_run_ps1_check stable under parallel load #2721

Manually merged
github merged 2 commits from gh-pr/2721/head into gh-pr/2721/base 2026-11-27 01:18:05 +00:00
Owner

@⁠tedin7 on GitHub · 2026-11-26 03:31 UTC · original
tedin7:test/run-ps1-stable-under-load → main · +30 −1 · 1 files · 2 commits · merged 2026-11-26 05:03 UTC

Part of #1758

What this unblocks: Win2025 runs no longer fail on tests/startup_run_ps1_check.py when PowerShell wraps its warning line.

Follows #2487 (both PowerShell shells now run in parallel in this check).

Cause: the launcher's Write-Warning text is long. PowerShell wraps it at the host width it finds, so under parallel load the one warning sometimes arrives as two printed lines (... host gaming runtime and (docs/startup-runtime.md).). The check compared the printed lines one to one and failed with stub exit N: printed [...], expected [...].

Change: unwrap_first_line() joins the leading printed lines back into the expected warning, only when they form exactly that text. Any other text is still compared as printed, so the real assertions stay. A host-independent control (unwrap_problems()) covers one line, a wrapped line, different text and a missing warning.

Verification:

  • python3 -B tests/startup_run_ps1_check.py on Linux: 0 failed (text only: not a Windows host).
  • Negative control: with the join loop disabled, the same command prints FAIL unwrap_first_line wrapped at 80 columns and exits 1.
  • git diff --check: clean.
  • Win2025 dev+release receipt on the final head: pending (Stage-2).

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 03:31 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2721) `tedin7:test/run-ps1-stable-under-load` → `main` · +30 −1 · 1 files · 2 commits · merged 2026-11-26 05:03 UTC Part of #1758 What this unblocks: Win2025 runs no longer fail on `tests/startup_run_ps1_check.py` when PowerShell wraps its warning line. Follows #2487 (both PowerShell shells now run in parallel in this check). Cause: the launcher's `Write-Warning` text is long. PowerShell wraps it at the host width it finds, so under parallel load the one warning sometimes arrives as two printed lines (`... host gaming runtime` and `(docs/startup-runtime.md).`). The check compared the printed lines one to one and failed with `stub exit N: printed [...], expected [...]`. Change: `unwrap_first_line()` joins the leading printed lines back into the expected warning, only when they form exactly that text. Any other text is still compared as printed, so the real assertions stay. A host-independent control (`unwrap_problems()`) covers one line, a wrapped line, different text and a missing warning. Verification: - `python3 -B tests/startup_run_ps1_check.py` on Linux: `0 failed (text only: not a Windows host)`. - Negative control: with the join loop disabled, the same command prints `FAIL unwrap_first_line wrapped at 80 columns` and exits 1. - `git diff --check`: clean. - Win2025 dev+release receipt on the final head: pending (Stage-2). AI-assisted; commands listed were executed locally.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:18:04 +00:00
github manually merged commit 7e91b68eb0 into gh-pr/2721/base 2026-11-27 01:18:05 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-26 03:47 UTC · original

Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit 7e91b68eb03d93e90a807f8f240e0982ba65621a:

  • Windows Python checks: tests/startup_run_ps1_check.py ok (20.5s)
  • Wall: 46.8s

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 03:47 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2721#issuecomment-7182033679) Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit `7e91b68eb03d93e90a807f8f240e0982ba65621a`: - **Windows Python checks**: `tests/startup_run_ps1_check.py` ok (`20.5s`) - Wall: `46.8s` AI-assisted; commands listed were executed locally.
Author
Owner

@⁠tedin7 on GitHub · 2026-11-26 03:48 UTC · original

@⁠MasterDomino ready for review/merge.

  • Head: 7e91b68eb03d93e90a807f8f240e0982ba65621a (tests/startup_run_ps1_check.py only).
  • CI on this head: Linux checks, fixtures and Windows build+test all green.
  • Win2025 receipt (above): tests/startup_run_ps1_check.py ran with real PowerShell and passed. The change touches only this Python check, so no C++ target was built (no build/ctest targets were selected, so the release build did not run separately).
  • Independent review: checklist all PASS/N/A; with the join loop disabled the control fails (exit 1).

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-26 03:48 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2721#issuecomment-7182034387) @⁠MasterDomino ready for review/merge. - Head: `7e91b68eb03d93e90a807f8f240e0982ba65621a` (tests/startup_run_ps1_check.py only). - CI on this head: Linux checks, fixtures and Windows build+test all green. - Win2025 receipt (above): `tests/startup_run_ps1_check.py` ran with real PowerShell and passed. The change touches only this Python check, so no C++ target was built (no build/ctest targets were selected, so the release build did not run separately). - Independent review: checklist all PASS/N/A; with the join loop disabled the control fails (exit 1). AI-assisted; commands listed were executed locally.
Author
Owner

@⁠chatgpt-codex-connector[bot] on GitHub · 2026-11-26 03:48 UTC · original · edited 2026-11-26 03:56 UTC

Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-26T03:56:01.209300Z 7e91b68 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@⁠codex review" or "@⁠codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

**@⁠chatgpt-codex-connector[bot]** on GitHub · 2026-11-26 03:48 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2721#issuecomment-7182037463) · edited 2026-11-26 03:56 UTC <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"7e91b68eb03d93e90a807f8f240e0982ba65621a","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-26T03:56:01.209300Z">2026-11-26T03:56:01.209300Z</relative-time> | `7e91b68` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@⁠codex review" or "@⁠codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Author
Owner

@⁠MasterDomino on GitHub · 2026-11-26 05:02 UTC · original · approved these changes

Approving 7e91b68e. unwrap_first_line joins the leading lines only when they spell exactly the expected warning, so every other printed difference is still compared as before. The host-independent controls cover the one-line, wrapped, different-text and missing cases.

Runs at this head (Windows 11 build 26300, Windows PowerShell 5.1 and pwsh):

  • python -B tests/startup_run_ps1_check.py: 5/5 runs, "0 failed (executed with powershell, pwsh)".
  • Negative control, with the join condition disabled: FAIL unwrap_first_line wrapped at 80 columns, and the check exits with "1 failed". Restored afterwards.

AI-assisted; commands listed were executed locally.

**@⁠MasterDomino** on GitHub · 2026-11-26 05:02 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2721#pullrequestreview-6068800337) · **approved these changes** Approving `7e91b68e`. `unwrap_first_line` joins the leading lines only when they spell exactly the expected warning, so every other printed difference is still compared as before. The host-independent controls cover the one-line, wrapped, different-text and missing cases. Runs at this head (Windows 11 build 26300, Windows PowerShell 5.1 and `pwsh`): - `python -B tests/startup_run_ps1_check.py`: 5/5 runs, "0 failed (executed with powershell, pwsh)". - Negative control, with the join condition disabled: `FAIL unwrap_first_line wrapped at 80 columns`, and the check exits with "1 failed". Restored afterwards. AI-assisted; commands listed were executed locally.
Author
Owner

@⁠RonLogic on GitHub · 2026-11-26 16:16 UTC · original

Independent Windows verification at 7e91b68eb03d93e90a807f8f240e0982ba65621a: python -B tests/startup_run_ps1_check.py passed on four executions, each exercising Windows PowerShell and pwsh side by side, including the wrapped-warning and wrong-text controls. The initial managed-shell attempt was inconclusive because tasklist could not inspect the fixture stubs and left a log open. With normal Windows process inspection available, all four complete runs reported zero failures.

**@⁠RonLogic** on GitHub · 2026-11-26 16:16 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2721#issuecomment-7197424472) Independent Windows verification at `7e91b68eb03d93e90a807f8f240e0982ba65621a`: `python -B tests/startup_run_ps1_check.py` passed on four executions, each exercising Windows PowerShell and `pwsh` side by side, including the wrapped-warning and wrong-text controls. The initial managed-shell attempt was inconclusive because `tasklist` could not inspect the fixture stubs and left a log open. With normal Windows process inspection available, all four complete runs reported zero failures.
This discussion has been locked. Commenting is limited to contributors.
No description provided.