tests: make startup_run_ps1_check stable under parallel load #2713

Merged
tedin7 merged 2 commits from upstream-pr/2721 into main 2026-11-26 05:03:02 +00:00
tedin7 commented 2026-11-26 03:31:13 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:31:13Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6618890124 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2721). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T03:31:13Z. --- 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 commented 2026-11-26 04:04:42 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:47:59Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7182033679 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2721#issuecomment-7182033679). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T03:47:59Z. --- 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 commented 2026-11-26 04:04:42 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:48:02Z.


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

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7182034387 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2721#issuecomment-7182034387). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T03:48:02Z. --- @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.
chatgpt-codex-connector[bot commented 2026-11-26 04:04:43 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T03:48:15Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7182037463 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2721#issuecomment-7182037463). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-26T03:48:15Z. --- <!-- 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>
MasterDomino commented 2026-11-26 05:02:58 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T05:02:58Z.

Review: APPROVED


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6068800337 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2721#pullrequestreview-6068800337). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-26T05:02:58Z. **Review:** APPROVED --- 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.
upstream-sync closed this pull request 2026-11-26 06:01:54 +00:00
RonLogic commented 2026-11-26 16:16:32 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-26T16:16:32Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7197424472 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2721#issuecomment-7197424472). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-26T16:16:32Z. --- 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.
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
R0Y00/Xbox2Windows!2713
No description provided.