Reap semantic test children that race cancellation (SEMANTIC-RUNNER-REGISTER-CANCEL) #2073

Open
github-bot wants to merge 1 commit from github-bot/gh-2073 into main AGit
Owner

@⁠alexandersato0830 on GitHub · 2026-11-25 19:35 UTC · original
alexandersato0830:codex/semantic-runner-register-cancel → main · +68 −4 · 2 files · 1 commits · open

Claimed in the coordination issue as: SEMANTIC-RUNNER-REGISTER-CANCEL

What and why

The parallel runner can report cancellation while a worker is between launching its subprocess and registering it. The cancellation snapshot then misses the child. Share a cancellation event with workers and check it before launch and under the registration lock. A late child is terminated and reaped by its worker. The regression holds a real subprocess launch at that boundary with thread events.

Tested

  • Windows 11, Python 3.14.9. Main e18b59a printed interrupted and returned 130, then the held child reported normal completion. The regression passed with the fix.
  • 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).
  • git merge-tree confirmed this patch applies alongside #2071.
  • 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.
**@⁠alexandersato0830** on GitHub · 2026-11-25 19:35 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2073) `alexandersato0830:codex/semantic-runner-register-cancel` → `main` · +68 −4 · 2 files · 1 commits · open Claimed in the coordination issue as: [SEMANTIC-RUNNER-REGISTER-CANCEL](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608) ### What and why The parallel runner can report cancellation while a worker is between launching its subprocess and registering it. The cancellation snapshot then misses the child. Share a cancellation event with workers and check it before launch and under the registration lock. A late child is terminated and reaped by its worker. The regression holds a real subprocess launch at that boundary with thread events. ### Tested - Windows 11, Python 3.14.9. Main `e18b59a` printed `interrupted` and returned 130, then the held child reported normal completion. The regression passed with the fix. - `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). - `git merge-tree` confirmed this patch applies alongside #2071. - Verified `git diff --check` and the source-only check. GPUs tested: n/a. AI-assisted: yes. - [x] Based on current `main`. - [x] One topic. - [x] Uses source and synthetic fixtures.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:16:54 +00:00
Author
Owner

@⁠DeadlyChirp on GitHub · 2026-11-26 10:01 UTC · original · edited 2026-11-26 10:30 UTC

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

**@⁠DeadlyChirp** on GitHub · 2026-11-26 10:01 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2073#issuecomment-7188798766) · edited 2026-11-26 10:30 UTC 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.)
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2073/head:github-bot/gh-2073'
git switch 'github-bot/gh-2073'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2073'
git switch 'github-bot/gh-2073'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2073'
git switch 'github-bot/gh-2073'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2073'
git switch 'main'
git merge --squash 'github-bot/gh-2073'
git switch 'main'
git merge --ff-only 'github-bot/gh-2073'
git switch 'main'
git merge 'github-bot/gh-2073'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.