Cancel Windows semantic test subprocess trees (SEMANTIC-RUNNER-WINDOWS-CHILD-CANCEL) #2071
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2071"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by alexandersato0830 on 2026-11-25T19:31:31Z.
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
e48ff03the 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.pyran 27 cases successfully with the POSIX signal case skipped.test_library_compute_forms.pypassed (12 tests).git diff --checkand the source-only check.GPUs tested: n/a.
AI-assisted: yes.
main.Imported from ubiquitarianism/leonida. Originally posted by MSedgeMC on 2026-11-25T19:35:59Z.
Review: APPROVED
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.
Imported from ubiquitarianism/leonida. Originally posted by DeadlyChirp on 2026-11-26T10:01:04Z.
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.)
Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T08:01:39Z.
Merged into
main(merge commit4314c1f33), 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 (
c50333730).AI-assisted (Claude Code), posted for DadaCap.