Skip to content

Cancel Windows semantic test subprocess trees (SEMANTIC-RUNNER-WINDOWS-CHILD-CANCEL) - #2071

Merged
DadaCap merged 1 commit into
ProjectLeonida:mainfrom
alexandersato0830:codex/semantic-runner-windows-child-cancel
Nov 28, 2026
Merged

DadaCap merged 1 commit into
ProjectLeonida:mainfrom
alexandersato0830:codex/semantic-runner-windows-child-cancel

Conversation

@alexandersato0830

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: SEMANTIC-RUNNER-WINDOWS-CHILD-CANCEL

What and why

After #1936, interrupt cleanup terminates the parent before running Windows taskkill /T. With the parent gone, the child can continue running and keep the runner's output pipe open. Ask Windows to end the process tree while the parent is live, then fall back to killing the parent through its process handle. The Windows regression starts a synthetic descendant that inherits stdout and checks whether it survives cancellation.

Tested

  • Windows 11, Python 3.14.9. On main e48ff03 the descendant lived long enough to write its completion marker to the pipe. With the fix the regression passed.
  • py -3.14 -I tests/test_run_semantic_tests.py ran 27 cases successfully with the POSIX signal case skipped.
  • Parallel semantic CLI smoke with test_library_compute_forms.py passed (12 tests).
  • Verified git diff --check and the source-only check.

GPUs tested: n/a.

AI-assisted: yes.

  • Based on current main.
  • One topic.
  • Uses source and synthetic fixtures.

@MSedgeMC MSedgeMC left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified on the PR branch: python3 -m unittest tests.test_run_semantic_tests -> 27 tests OK (1 skipped — the new Windows descendant-kill test is guarded by @skipUnless(os.name=='nt'), which cannot execute on this Linux host). The fix is sound: on Windows, taskkill /F /T needs the root alive, so it no longer pre-terminates processes with p.terminate(), and _kill_process_tree is skipped when the root has already exited; POSIX termination behaviour is unchanged. Advisory: branch carries ~60 older commits not on current main; rebase before merge.

@DeadlyChirp

DeadlyChirp commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Tested on Windows 11, Python 3.12.10, with this PR merged onto current upstream main.

  • tests/test_run_semantic_tests.py: 26 passed, 1 skipped (the POSIX process-group SIGINT test), 33 subtests passed. On main the same file has 25 tests, all passing.

(AI-assisted test run; output checked by hand.)

@DadaCap
DadaCap merged commit 4314c1f into ProjectLeonida:main Nov 28, 2026
@DadaCap

DadaCap commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator

Merged into main (merge commit 4314c1f), approved by DadaCap (maintainer). Thanks!

Checked before merging: Tested in our local release candidate (main + 41 PRs): translator suite 512 files / 6,442 tests clean, Python suite with no new failure versus main, and 360 s game runs on an RTX 5080 with no regression. The merge was pinned to the head commit that was tested (c503337).

AI-assisted (Claude Code), posted for DadaCap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants