tooling: preserve the debugger exit code when the watcher stops early #2267

Merged
RavenCurseBurg merged 6 commits from upstream-pr/2275 into main 2026-11-25 10:07:12 +00:00
RavenCurseBurg commented 2026-11-25 09:23:02 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T09:23:02Z.


Fixes #2272.

When the translation watcher has already exited, the launcher skips cleanup. For a live watcher it still runs taskkill /T /F to stop the worker tree. The native command runs with a locally scoped Continue preference so a worker disappearing during cleanup cannot turn redirected stderr into a terminating error on Windows PowerShell 5.1.

The regression uses the existing synthetic Python watcher and debugger. In the new cases the watcher publishes its PID atomically and exits without starting a child. The debugger waits until Windows no longer reports that PID before it prints seven lines and returns 0 or 7. The test checks all seven lines in the file, the first five on the console, and the launcher's exit code. The existing live parent/child cleanup tests run as before.

Verification

Windows 11 build 26100.9711, Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9, head 4a6669a3.

  • python -B tests/startup_run_ps1_check.py reported 0 failed (executed with powershell, pwsh), including the missing-tree-stop and parent-only cleanup controls.
  • python -B tests/startup_run_ps1_check.py --text-only reported 0 failures. git diff --check passed.
  • Against 07c1c20f, the early-exit fixture reproduced #2272 on 5.1 for both debugger codes. The launcher returned 1, printed none of the five summary lines, and reported NativeCommandError because the PID was gone. PowerShell 7 preserved both original codes.
  • To exercise the race separately, I removed just the HasExited check from a scratch copy. Calling real taskkill.exe on the already-exited fixture PID then preserved the five lines and both exit codes on both shells. Restoring Stop inside that same copy reproduced the two failures on 5.1.

The fixture builds on the repository's MIT-licensed test stubs. #2271 updates warning-prefix handling in the same test file. This change exercises watcher lifetime and uses the existing output comparison.

AI-assisted with Codex.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6601251887 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2275). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T09:23:02Z. --- Fixes #2272. When the translation watcher has already exited, the launcher skips cleanup. For a live watcher it still runs `taskkill /T /F` to stop the worker tree. The native command runs with a locally scoped `Continue` preference so a worker disappearing during cleanup cannot turn redirected stderr into a terminating error on Windows PowerShell 5.1. The regression uses the existing synthetic Python watcher and debugger. In the new cases the watcher publishes its PID atomically and exits without starting a child. The debugger waits until Windows no longer reports that PID before it prints seven lines and returns 0 or 7. The test checks all seven lines in the file, the first five on the console, and the launcher's exit code. The existing live parent/child cleanup tests run as before. ### Verification Windows 11 build 26100.9711, Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9, head `4a6669a3`. - `python -B tests/startup_run_ps1_check.py` reported `0 failed (executed with powershell, pwsh)`, including the missing-tree-stop and parent-only cleanup controls. - `python -B tests/startup_run_ps1_check.py --text-only` reported 0 failures. `git diff --check` passed. - Against `07c1c20f`, the early-exit fixture reproduced #2272 on 5.1 for both debugger codes. The launcher returned 1, printed none of the five summary lines, and reported `NativeCommandError` because the PID was gone. PowerShell 7 preserved both original codes. - To exercise the race separately, I removed just the `HasExited` check from a scratch copy. Calling real `taskkill.exe` on the already-exited fixture PID then preserved the five lines and both exit codes on both shells. Restoring `Stop` inside that same copy reproduced the two failures on 5.1. The fixture builds on the repository's MIT-licensed test stubs. #2271 updates warning-prefix handling in the same test file. This change exercises watcher lifetime and uses the existing output comparison. AI-assisted with Codex.
tedin7 commented 2026-11-25 10:05:28 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T09:28:03Z.

Review: COMMENTED


Review of head 4a6669a37747d47bdfb615cb4e05eba7cc82231a (2 files: tools/startup/run.ps1, tests/startup_run_ps1_check.py).

Verdict: no P1, no P2. Two nits.

What I read: the finally block in run.ps1 and the new early_exit stub paths in the check.

  • run.ps1: skipping taskkill when $translator.HasExited is true, and running taskkill under a local $ErrorActionPreference = "Continue", keeps a dying watcher from turning redirected stderr into a terminating error. exit $debuggerExit is then reached. The preference change is scoped to the script block, so the rest of the script keeps Stop. Correct.
  • Test: the debugger stub waits until the watcher's PID is gone (tasklist poll, bounded by a 30 s monotonic deadline) before it exits, so the early-exit race is deterministic. The watcher record is written to a temp file and renamed, so the reader never sees a half-written file. Codes 0 and 7 are both checked. time.monotonic() is the right clock here.

Nits:

  1. (nit) run.ps1 finally block: when the watcher has already exited, taskkill /T is skipped, which is fine because /T cannot walk the tree of a dead parent anyway. Real workers that outlive an early-exited watcher would be orphaned either way. A short comment saying so would help the next reader.
  2. (nit) tests/startup_run_ps1_check.py: the early-exit stub spawns no child, so the case checks the exit code only. It does not check that no worker is left running. That is acceptable for this fix, but say so in the docstring.

CI on this head:

  • Build and test on Windows: pass.
  • Run platform-independent Python checks on Linux and Assemble and translate gfx1013 fixtures: fail with TypeError: 'NoneType' object is not an iterator at tools/mesh_entry_aot.py:882 (run_group) and in mesh_dynamic_aot.py. This PR does not touch those files. The branch is 1 commit behind origin/main (ed96f498); please rebase and re-run to confirm the red checks are not from this PR.

Commands executed locally (Linux):

  • git diff --stat origin/main...HEAD: 2 files, +40/-14.
  • python3 tests/startup_run_ps1_check.py: startup run.ps1 exit code: 0 failed (text only: not a Windows host). The real process cases need PowerShell, which is not installed here (no pwsh).
  • python3 tests/docs_links_check.py: self-test passed, 18 Markdown files, 435 links.
  • python3 tests/bidi_controls_check.py: self-test passed, 1566 files, no bidirectional controls.
  • git diff --check origin/main...HEAD: clean.

Not done: no mutation run of the new logic, and no Win2025 run. The behaviour needs PowerShell 5.1, so it can only be mutation-tested on Windows. The PR's Windows CI job passes.

Clean-room and title: neutral, no concerns.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6054947938 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2275#pullrequestreview-6054947938). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T09:28:03Z. **Review:** COMMENTED --- Review of head `4a6669a37747d47bdfb615cb4e05eba7cc82231a` (2 files: `tools/startup/run.ps1`, `tests/startup_run_ps1_check.py`). **Verdict: no P1, no P2. Two nits.** What I read: the `finally` block in `run.ps1` and the new `early_exit` stub paths in the check. - `run.ps1`: skipping `taskkill` when `$translator.HasExited` is true, and running `taskkill` under a local `$ErrorActionPreference = "Continue"`, keeps a dying watcher from turning redirected stderr into a terminating error. `exit $debuggerExit` is then reached. The preference change is scoped to the script block, so the rest of the script keeps `Stop`. Correct. - Test: the debugger stub waits until the watcher's PID is gone (`tasklist` poll, bounded by a 30 s monotonic deadline) before it exits, so the early-exit race is deterministic. The watcher record is written to a temp file and renamed, so the reader never sees a half-written file. Codes 0 and 7 are both checked. `time.monotonic()` is the right clock here. Nits: 1. (nit) `run.ps1` finally block: when the watcher has already exited, `taskkill /T` is skipped, which is fine because `/T` cannot walk the tree of a dead parent anyway. Real workers that outlive an early-exited watcher would be orphaned either way. A short comment saying so would help the next reader. 2. (nit) `tests/startup_run_ps1_check.py`: the early-exit stub spawns no child, so the case checks the exit code only. It does not check that no worker is left running. That is acceptable for this fix, but say so in the docstring. CI on this head: - `Build and test on Windows`: pass. - `Run platform-independent Python checks on Linux` and `Assemble and translate gfx1013 fixtures`: fail with `TypeError: 'NoneType' object is not an iterator` at `tools/mesh_entry_aot.py:882` (`run_group`) and in `mesh_dynamic_aot.py`. This PR does not touch those files. The branch is 1 commit behind `origin/main` (`ed96f498`); please rebase and re-run to confirm the red checks are not from this PR. Commands executed locally (Linux): - `git diff --stat origin/main...HEAD`: 2 files, +40/-14. - `python3 tests/startup_run_ps1_check.py`: `startup run.ps1 exit code: 0 failed (text only: not a Windows host)`. The real process cases need PowerShell, which is not installed here (no `pwsh`). - `python3 tests/docs_links_check.py`: self-test passed, 18 Markdown files, 435 links. - `python3 tests/bidi_controls_check.py`: self-test passed, 1566 files, no bidirectional controls. - `git diff --check origin/main...HEAD`: clean. Not done: no mutation run of the new logic, and no Win2025 run. The behaviour needs PowerShell 5.1, so it can only be mutation-tested on Windows. The PR's Windows CI job passes. Clean-room and title: neutral, no concerns. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 10:05:28 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T09:41:05Z.

Review: COMMENTED


Re-review at head c9e67d03c572bd8d275c006a21c68469a066cf61 (previous review was at 4a6669a3). Diff vs main: tools/startup/run.ps1 (+9/-2) and tests/startup_run_ps1_check.py (+31/-12). The head is a merge of main; the new part is the early-exit watcher handling.

Verdict: no P1, no P2. Two nits.

What I checked

  • run.ps1:79-86: taskkill /T now runs only if the watcher has not exited. When the parent PID is gone, /T cannot find the workers anyway, so skipping loses nothing. The taskkill call is wrapped in a scope with $ErrorActionPreference = "Continue". The script sets Stop at line 33, so in Windows PowerShell 5.1 a redirected stderr from taskkill, when the watcher dies mid-call, can no longer abort the launcher before exit $debuggerExit. The scope is a child scope, so Stop is restored afterwards. Looks correct.
  • Test: new early_exit cases for exit codes 0 and 7. The debugger stub waits until the OS confirms the watcher PID is gone, so the "already exited" path is deterministic. watch.json is written via temp file plus replace, so the stub cannot read a half-written file. time.monotonic() is used for the deadlines. The pid is not None guard in the cleanup check is right for the childless case.
  • Clean-room and title: neutral. No model names in the diff.

Commands run locally

  • python3 tests/startup_run_ps1_check.py -> startup run.ps1 exit code: 0 failed (text only: not a Windows host) (the behavioural cases only run on Windows)
  • python3 tests/docs_links_check.py -> 18 files, 435 links ok
  • python3 tests/bidi_controls_check.py -> 1566 files, no bidi controls
  • git diff --check origin/main...HEAD -> clean
  • Win2025 (WARP host), Debug dev, --py-checks tests/startup_run_ps1_check.py: ctest --preset dev -R '^startup_run_ps1$' 1/1 passed (7.95s); the Windows Python check passed (7.4s). Release was skipped on purpose: only a PowerShell script and a Python test changed.
  • Mutation: I removed -and -not $translator.HasExited from run.ps1, then ran the Linux text-only check. It still passed, so the Linux job does not kill this mutant. Only the Windows run exercises the new logic. I did not run the mutant on Windows. I restored the file with git checkout -- ..

Nits

  • N1 tests/startup_run_ps1_check.py (text_problems/mutants_of): the Linux text check has no rule for the new guard or the Continue scope, so a regression there only shows up on the Windows CI job. A small text rule plus a mutant (for example "taskkill outside the guard") would cover the Linux job too. It is optional, because the real test covers it on Windows.
  • N2 run.ps1:79: HasExited is read once. A watcher that exits between that check and taskkill is handled by the Continue scope, but the case is not tested. The new tests cover "already gone", not "gone during taskkill". Acceptable because it is a race.

CI at review time: Linux Python checks pass; Windows jobs pending. The PR is mergeable.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6055148197 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2275#pullrequestreview-6055148197). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T09:41:05Z. **Review:** COMMENTED --- Re-review at head `c9e67d03c572bd8d275c006a21c68469a066cf61` (previous review was at `4a6669a3`). Diff vs main: `tools/startup/run.ps1` (+9/-2) and `tests/startup_run_ps1_check.py` (+31/-12). The head is a merge of main; the new part is the early-exit watcher handling. **Verdict: no P1, no P2. Two nits.** What I checked - `run.ps1:79-86`: `taskkill /T` now runs only if the watcher has not exited. When the parent PID is gone, `/T` cannot find the workers anyway, so skipping loses nothing. The taskkill call is wrapped in a scope with `$ErrorActionPreference = "Continue"`. The script sets `Stop` at line 33, so in Windows PowerShell 5.1 a redirected stderr from taskkill, when the watcher dies mid-call, can no longer abort the launcher before `exit $debuggerExit`. The scope is a child scope, so `Stop` is restored afterwards. Looks correct. - Test: new `early_exit` cases for exit codes 0 and 7. The debugger stub waits until the OS confirms the watcher PID is gone, so the "already exited" path is deterministic. `watch.json` is written via temp file plus `replace`, so the stub cannot read a half-written file. `time.monotonic()` is used for the deadlines. The `pid is not None` guard in the cleanup check is right for the childless case. - Clean-room and title: neutral. No model names in the diff. Commands run locally - `python3 tests/startup_run_ps1_check.py` -> `startup run.ps1 exit code: 0 failed (text only: not a Windows host)` (the behavioural cases only run on Windows) - `python3 tests/docs_links_check.py` -> 18 files, 435 links ok - `python3 tests/bidi_controls_check.py` -> 1566 files, no bidi controls - `git diff --check origin/main...HEAD` -> clean - Win2025 (WARP host), Debug `dev`, `--py-checks tests/startup_run_ps1_check.py`: `ctest --preset dev -R '^startup_run_ps1$'` 1/1 passed (7.95s); the Windows Python check passed (7.4s). Release was skipped on purpose: only a PowerShell script and a Python test changed. - Mutation: I removed `-and -not $translator.HasExited` from `run.ps1`, then ran the Linux text-only check. It still passed, so the Linux job does not kill this mutant. Only the Windows run exercises the new logic. I did not run the mutant on Windows. I restored the file with `git checkout -- .`. Nits - N1 `tests/startup_run_ps1_check.py` (text_problems/mutants_of): the Linux text check has no rule for the new guard or the `Continue` scope, so a regression there only shows up on the Windows CI job. A small text rule plus a mutant (for example "taskkill outside the guard") would cover the Linux job too. It is optional, because the real test covers it on Windows. - N2 `run.ps1:79`: `HasExited` is read once. A watcher that exits between that check and taskkill is handled by the `Continue` scope, but the case is not tested. The new tests cover "already gone", not "gone during taskkill". Acceptable because it is a race. CI at review time: Linux Python checks pass; Windows jobs pending. The PR is mergeable. AI-assisted; commands listed were executed locally.
tedin7 commented 2026-11-25 10:05:28 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T09:56:10Z.

Review: COMMENTED


Re-review of head 852beb5960d37ed4c6197b19ef843f25a2a505ae (new since last review: only tests/startup_run_ps1_check.py, +21 lines; tools/startup/run.ps1 unchanged vs. the previously reviewed head).

What changed

  • New WATCH_CLEANUP regex in the text-only path: requires if ($translator -and -not $translator.HasExited) { & { $ErrorActionPreference = 'Continue' & taskkill.exe ....
  • Windows-host path: a new case expires the fixture watcher right before the launcher's own taskkill, so taskkill hits a missing PID and writes native stderr. Expected exit code 7 must survive.
  • Text-only path: two mutants (drop the HasExited guard, drop the local Continue) must be flagged.

Commands executed locally (Linux, no PowerShell host available)

  • python3 tests/startup_run_ps1_check.py -> 0 failed (text only: not a Windows host)
  • python3 tests/docs_links_check.py -> pass (18 files, 435 links)
  • python3 tests/bidi_controls_check.py -> pass
  • git diff --check origin/main...HEAD -> clean
  • Mutation 1: removed -and -not $translator.HasExited from run.ps1 -> FAIL text: taskkill lacks its live-watcher guard or local Continue scope (killed)
  • Mutation 2: replaced $ErrorActionPreference = "Continue" with $x = 1 -> same FAIL (killed)
  • Mutation 3: changed taskkill /T /F to /F -> not detected in text-only mode (see nit)
  • Worktree restored with git checkout -- .

Findings

  • P1: none.
  • P2: none.
  • Nit: in text-only mode the /T flag is not checked; the Windows-host path catches it via the "translator's child process still running" case. Linux CI therefore cannot see a dropped /T. Optional: add /T\s+/F to the WATCH_CLEANUP regex.
  • Note: the new expire-then-taskkill case is only exercised on a Windows PowerShell host. The CI "Build and test on Windows" job was still pending when I checked, so that path is not verified by me. Please confirm it goes green before merge.

CI at review time: Linux Python checks pass; Windows jobs pending. PR is mergeable, title is neutral, scope is tooling only.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6055371771 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2275#pullrequestreview-6055371771). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T09:56:10Z. **Review:** COMMENTED --- Re-review of head `852beb5960d37ed4c6197b19ef843f25a2a505ae` (new since last review: only `tests/startup_run_ps1_check.py`, +21 lines; `tools/startup/run.ps1` unchanged vs. the previously reviewed head). **What changed** - New `WATCH_CLEANUP` regex in the text-only path: requires `if ($translator -and -not $translator.HasExited) { & { $ErrorActionPreference = 'Continue' & taskkill.exe ...`. - Windows-host path: a new case expires the fixture watcher right before the launcher's own taskkill, so taskkill hits a missing PID and writes native stderr. Expected exit code 7 must survive. - Text-only path: two mutants (drop the `HasExited` guard, drop the local `Continue`) must be flagged. **Commands executed locally (Linux, no PowerShell host available)** - `python3 tests/startup_run_ps1_check.py` -> `0 failed (text only: not a Windows host)` - `python3 tests/docs_links_check.py` -> pass (18 files, 435 links) - `python3 tests/bidi_controls_check.py` -> pass - `git diff --check origin/main...HEAD` -> clean - Mutation 1: removed ` -and -not $translator.HasExited` from run.ps1 -> `FAIL text: taskkill lacks its live-watcher guard or local Continue scope` (killed) - Mutation 2: replaced `$ErrorActionPreference = "Continue"` with `$x = 1` -> same FAIL (killed) - Mutation 3: changed `taskkill /T /F` to `/F` -> not detected in text-only mode (see nit) - Worktree restored with `git checkout -- .` **Findings** - P1: none. - P2: none. - Nit: in text-only mode the `/T` flag is not checked; the Windows-host path catches it via the "translator's child process still running" case. Linux CI therefore cannot see a dropped `/T`. Optional: add `/T\s+/F` to the `WATCH_CLEANUP` regex. - Note: the new expire-then-taskkill case is only exercised on a Windows PowerShell host. The CI "Build and test on Windows" job was still pending when I checked, so that path is not verified by me. Please confirm it goes green before merge. CI at review time: Linux Python checks pass; Windows jobs pending. PR is mergeable, title is neutral, scope is tooling only. AI-assisted; commands listed were executed locally.
RavenCurseBurg commented 2026-11-25 10:05:33 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T09:25:59Z.


I reproduced the failing Linux mesh check on unmodified upstream ed96f498 with python -B tests/mesh_dynamic_geometry_check.py. It reaches next(steps) in tools/mesh_entry_aot.py with steps = None. The failed Linux job reports the same failure in the mesh checks and the downstream PSO readiness assertion. #2276 and #2277 address that upstream regression. I'll pick up the merged fix and recheck this branch.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7158322204 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2275#issuecomment-7158322204). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T09:25:59Z. --- I reproduced the failing Linux mesh check on unmodified upstream `ed96f498` with `python -B tests/mesh_dynamic_geometry_check.py`. It reaches `next(steps)` in `tools/mesh_entry_aot.py` with `steps = None`. The [failed Linux job](https://github.com/R0Y00/Xbox2Windows/actions/runs/45584879684/job/139103822075) reports the same failure in the mesh checks and the downstream PSO readiness assertion. #2276 and #2277 address that upstream regression. I'll pick up the merged fix and recheck this branch.
RavenCurseBurg commented 2026-11-25 10:05:33 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T09:35:03Z.


Addressed both documentation comments in bd2b5937. The launcher explains why taskkill /T needs a live parent, and the test docstring identifies which case covers worker cleanup. The full native suite again reported zero failures on Windows PowerShell 5.1 and PowerShell 7.6.9. Text-only passed too.

I merged upstream f9f50048 into the branch at e99d192a and the checks are rerunning. The mesh failure also reproduces on unmodified upstream; #2276 is the pending fix.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7158527368 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2275#issuecomment-7158527368). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T09:35:03Z. --- Addressed both documentation comments in `bd2b5937`. The launcher explains why `taskkill /T` needs a live parent, and the test docstring identifies which case covers worker cleanup. The full native suite again reported zero failures on Windows PowerShell 5.1 and PowerShell 7.6.9. Text-only passed too. I merged upstream `f9f50048` into the branch at `e99d192a` and the checks are rerunning. The mesh failure also reproduces on unmodified upstream; #2276 is the pending fix.
RavenCurseBurg commented 2026-11-25 10:05:34 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T09:54:10Z.


Both follow-ups are covered in 852beb59. The portable text check now rejects a missing live-watcher guard or local Continue scope, with a mutation for each.

On Windows the new fixture takes the live branch, stops its own watcher and child, and waits for the watcher to exit before the launcher's original taskkill executes. That command sees a real missing PID. Windows PowerShell 5.1 and PowerShell 7.6.9 both printed the correct five lines and returned 7. In a separate 5.1 control, restoring Stop in this same fixture produced NativeCommandError and returned 1 for debugger codes 0 and 7. The full native and text-only suites passed.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7158954406 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2275#issuecomment-7158954406). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T09:54:10Z. --- Both follow-ups are covered in `852beb59`. The portable text check now rejects a missing live-watcher guard or local `Continue` scope, with a mutation for each. On Windows the new fixture takes the live branch, stops its own watcher and child, and waits for the watcher to exit before the launcher's original `taskkill` executes. That command sees a real missing PID. Windows PowerShell 5.1 and PowerShell 7.6.9 both printed the correct five lines and returned 7. In a separate 5.1 control, restoring `Stop` in this same fixture produced `NativeCommandError` and returned 1 for debugger codes 0 and 7. The full native and text-only suites passed.
RavenCurseBurg commented 2026-11-25 10:05:34 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T10:02:51Z.


Added the missing-/T mutation in 3c213f75. Removing the tree flag now fails the text-only suite. The unmodified suite passed in both text-only mode and the native Windows PowerShell 5.1/PowerShell 7.6.9 runs.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7159149886 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2275#issuecomment-7159149886). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T10:02:51Z. --- Added the missing-`/T` mutation in `3c213f75`. Removing the tree flag now fails the text-only suite. The unmodified suite passed in both text-only mode and the native Windows PowerShell 5.1/PowerShell 7.6.9 runs.
upstream-sync closed this pull request 2026-11-25 11:02:16 +00:00
tedin7 commented 2026-11-25 11:02:16 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T10:05:51Z.

Review: COMMENTED


Re-review of head 3c213f754fea2360fec436b6bc41a01396b03df4 (new since my last pass at 852beb59: the /T check in the text-only test).

Verdict: no P1, no P2.

What changed

  • tests/startup_run_ps1_check.py: WATCH_CLEANUP now also requires /T on the same taskkill.exe line ([^|#\n]*\s/T\b), so a comment or a later line cannot satisfy it, and /TX or /Tree do not match. The failure message and the mutation list ('/T ' added) were updated to match.
  • tools/startup/run.ps1 is unchanged since the last pass: live-watcher guard plus a local Continue scope around taskkill /T /F.

Checks run locally (worktree at the exact head)

  • python3 tests/startup_run_ps1_check.py: exit 0 (text-only mode, not a Windows host).
  • python3 tests/docs_links_check.py: self-test passed, 18 files, 435 links.
  • python3 tests/bidi_controls_check.py: no bidirectional controls in 1566 files.
  • git diff --check origin/main...HEAD: clean.
  • CI on this head: Linux Python checks, Windows build/test and gfx1013 fixtures all pass. Mergeable. Title and body are neutral.

Mutations of the new logic

  • taskkill.exe /T /F -> taskkill.exe /F (flag dropped): killed, "tree cleanup lacks taskkill /T ...", exit 1.
  • taskkill.exe /T /F -> taskkill.exe /TX /F (look-alike flag): killed, exit 1.
  • /T moved after /PID $translator.Id (still a valid tree kill): correctly accepted.
  • Worktree restored with git checkout -- . after each mutation.

Nits (non-blocking)

  • None new. The Windows-host branch of the test was not exercised here (Linux only); the Windows CI job covers it.

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:review:6055514152 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2275#pullrequestreview-6055514152). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-25T10:05:51Z. **Review:** COMMENTED --- Re-review of head `3c213f754fea2360fec436b6bc41a01396b03df4` (new since my last pass at 852beb59: the `/T` check in the text-only test). **Verdict: no P1, no P2.** What changed - `tests/startup_run_ps1_check.py`: `WATCH_CLEANUP` now also requires `/T` on the same `taskkill.exe` line (`[^|#\n]*\s/T\b`), so a comment or a later line cannot satisfy it, and `/TX` or `/Tree` do not match. The failure message and the mutation list (`'/T '` added) were updated to match. - `tools/startup/run.ps1` is unchanged since the last pass: live-watcher guard plus a local `Continue` scope around `taskkill /T /F`. Checks run locally (worktree at the exact head) - `python3 tests/startup_run_ps1_check.py`: exit 0 (text-only mode, not a Windows host). - `python3 tests/docs_links_check.py`: self-test passed, 18 files, 435 links. - `python3 tests/bidi_controls_check.py`: no bidirectional controls in 1566 files. - `git diff --check origin/main...HEAD`: clean. - CI on this head: Linux Python checks, Windows build/test and gfx1013 fixtures all pass. Mergeable. Title and body are neutral. Mutations of the new logic - `taskkill.exe /T /F` -> `taskkill.exe /F` (flag dropped): killed, "tree cleanup lacks taskkill /T ...", exit 1. - `taskkill.exe /T /F` -> `taskkill.exe /TX /F` (look-alike flag): killed, exit 1. - `/T` moved after `/PID $translator.Id` (still a valid tree kill): correctly accepted. - Worktree restored with `git checkout -- .` after each mutation. Nits (non-blocking) - None new. The Windows-host branch of the test was not exercised here (Linux only); the Windows CI job covers it. AI-assisted; commands listed were executed locally.
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!2267
No description provided.