tests: verify the process that survives each launcher cleanup mutation #2222

Manually merged
github merged 1 commit from gh-pr/2222/head into gh-pr/2222/base 2026-11-27 00:07:00 +00:00
Owner

@⁠RavenCurseBurg on GitHub · 2026-11-25 05:52 UTC · original
RavenCurseBurg:tests/launcher-mutation-evidence → main · +26 −22 · 1 files · 1 commits · merged 2026-11-25 05:57 UTC

The startup launcher fixture reported success for the no-cleanup mutation on both Windows PowerShell 5.1 and PowerShell 7 even though its PID check never ran. At b0669e06 the surviving watcher kept the captured output pipe open. Each run hit the 120-second subprocess timeout, and the mutation loop accepted that unrelated failure. I found this while following the timing of the Windows check in #2217.

Capture the launcher's stdout and stderr in the fixture's temporary directory so the test can inspect the watcher as soon as PowerShell exits. Run both cleanup mutations with -Translate and require the diagnostic for the specific process that survived. The unmodified launcher still runs all seven argument, output and exit-code cases under each shell.

Local Windows measurement No cleanup Stop parent only
Windows PowerShell 5.1, before Timeout, 120.59 s Surviving worker detected
PowerShell 7, before Timeout, 120.72 s Surviving worker detected
Windows PowerShell 5.1, after Surviving watcher detected, 2.56 s Surviving worker detected, 2.63 s
PowerShell 7, after Surviving watcher detected, 2.93 s Surviving worker detected, 2.77 s
  • python -B tests/startup_run_ps1_check.py passed both shells in 35.06 seconds on local Windows. python -B tests/startup_run_ps1_check.py --text-only and git diff --check passed.
  • As a negative control, I made the two cleanup mutants return only a timeout diagnostic. The base suite reported zero failures. The patched suite rejected all four combinations of shell and mutant.
  • The Windows 2025 run on this commit passed both shells under a real 8.3 temporary path. The same workflow step, including the six call-evidence tests, took 18 s here and 269 s on the base run, one measurement per commit.

AI-assisted with Codex (GPT-6.2 Astra xhigh).

**@⁠RavenCurseBurg** on GitHub · 2026-11-25 05:52 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2222) `RavenCurseBurg:tests/launcher-mutation-evidence` → `main` · +26 −22 · 1 files · 1 commits · merged 2026-11-25 05:57 UTC The startup launcher fixture reported success for the no-cleanup mutation on both Windows PowerShell 5.1 and PowerShell 7 even though its PID check never ran. At `b0669e06` the surviving watcher kept the captured output pipe open. Each run hit the 120-second subprocess timeout, and the mutation loop accepted that unrelated failure. I found this while following the timing of the Windows check in #2217. Capture the launcher's stdout and stderr in the fixture's temporary directory so the test can inspect the watcher as soon as PowerShell exits. Run both cleanup mutations with `-Translate` and require the diagnostic for the specific process that survived. The unmodified launcher still runs all seven argument, output and exit-code cases under each shell. | Local Windows measurement | No cleanup | Stop parent only | | --- | --- | --- | | Windows PowerShell 5.1, before | Timeout, 120.59 s | Surviving worker detected | | PowerShell 7, before | Timeout, 120.72 s | Surviving worker detected | | Windows PowerShell 5.1, after | Surviving watcher detected, 2.56 s | Surviving worker detected, 2.63 s | | PowerShell 7, after | Surviving watcher detected, 2.93 s | Surviving worker detected, 2.77 s | - `python -B tests/startup_run_ps1_check.py` passed both shells in 35.06 seconds on local Windows. `python -B tests/startup_run_ps1_check.py --text-only` and `git diff --check` passed. - As a negative control, I made the two cleanup mutants return only a timeout diagnostic. The base suite reported zero failures. The patched suite rejected all four combinations of shell and mutant. - The [Windows 2025 run on this commit](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45556497160) passed both shells under a real 8.3 temporary path. The same workflow step, including the six call-evidence tests, took 18 s here and 269 s on the [base run](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45554469156), one measurement per commit. AI-assisted with Codex (GPT-6.2 Astra xhigh).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:06:59 +00:00
github manually merged commit bacd386ff5 into gh-pr/2222/base 2026-11-27 00:07:00 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-25 05:56 UTC · original · reviewed

Review of head bacd386ff5 (tests/startup_run_ps1_check.py only).

Findings: 0 P1, 0 P2.

  • Output is captured to temp files, so a surviving watcher cannot hold a pipe open and hide a leak. The watcher PID check now runs right after the shell exits.
  • run_problems with no shell falls back to the text checks. The per-shell loop is simpler and keeps the same behavior.
  • The two live-process cases (translator, translator's child) now assert the exact "still running" message, so each mutant must be killed for the right reason.
  • Only a test file changes. No product code, so no clean-room concern.

Commands run locally:

  • python3 tests/startup_run_ps1_check.py: 0 failed (text-only mode on Linux, no PowerShell).
  • python3 tests/docs_links_check.py: pass.
  • python3 tests/bidi_controls_check.py: pass.
  • git diff --check origin/main...HEAD: clean.
  • Mutation: changed the no-shell fallback in run_problems to return []. The check failed with "mutant 'no capture and no exit' was not detected" (and 3 more). Reverted.

CI: Build and test on Windows = SUCCESS, which runs the executed PowerShell path. The Linux check also passes.

AI-assisted; commands listed were executed locally.

**@⁠tedin7** on GitHub · 2026-11-25 05:56 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/2222#pullrequestreview-6052551622) · **reviewed** Review of head bacd386ff5eb54c6660bea497bb166b684af2aa1 (tests/startup_run_ps1_check.py only). Findings: 0 P1, 0 P2. - Output is captured to temp files, so a surviving watcher cannot hold a pipe open and hide a leak. The watcher PID check now runs right after the shell exits. - `run_problems` with no shell falls back to the text checks. The per-shell loop is simpler and keeps the same behavior. - The two live-process cases (translator, translator's child) now assert the exact "still running" message, so each mutant must be killed for the right reason. - Only a test file changes. No product code, so no clean-room concern. Commands run locally: - `python3 tests/startup_run_ps1_check.py`: 0 failed (text-only mode on Linux, no PowerShell). - `python3 tests/docs_links_check.py`: pass. - `python3 tests/bidi_controls_check.py`: pass. - `git diff --check origin/main...HEAD`: clean. - Mutation: changed the no-shell fallback in `run_problems` to `return []`. The check failed with "mutant 'no capture and no exit' was not detected" (and 3 more). Reverted. CI: `Build and test on Windows` = SUCCESS, which runs the executed PowerShell path. The Linux check also passes. AI-assisted; commands listed were executed locally.
This discussion has been locked. Commenting is limited to contributors.
No description provided.