Skip to content

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

Closed
alexandersato0830 wants to merge 1 commit into
ProjectLeonida:mainfrom
alexandersato0830:codex/semantic-runner-register-cancel
Closed

alexandersato0830 wants to merge 1 commit into
ProjectLeonida:mainfrom
alexandersato0830:codex/semantic-runner-register-cancel

Conversation

@alexandersato0830

Copy link
Copy Markdown
Contributor

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 Cancel Windows semantic test subprocess trees (SEMANTIC-RUNNER-WINDOWS-CHILD-CANCEL) #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.

@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 commented Nov 28, 2026

Copy link
Copy Markdown
Collaborator

Thanks for this fix! It passed our maintainer testing (local release candidate, Windows 11: translator and Python suites with no new failure, game runs with no regression), but it now conflicts with main: #1437, merged a few minutes ago, rewrote the same lines of run_semantic_tests.py's run_module().

To get this merged, a rebase on main is all it needs. The resolution we used and tested locally:

Once it's rebased we'll re-run the tests and merge.

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

@github-actions github-actions Bot added the needs rebase Conflicts with the base branch: rebase it on main label Nov 28, 2026
@TheGeogeo

Copy link
Copy Markdown
Contributor

Duplicate check (diff reading only, no build): not a duplicate of #2201. This PR closes the race between Ctrl+C cancellation and a worker still inside Popen. #2201 kills a timed worker's whole process group on POSIX. They conflict textually in scripts/run_semantic_tests.py (git merge-tree).

Suggest keeping both: this one first once rebased (needs rebase; run_module on main now uses result_environment), then #2201 on top of it.

AI-assisted (Claude Code).

@aslan2142 aslan2142 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed against current main: closing the cancellation/registration race for semantic test children in scripts/run_semantic_tests.py looks solid (and distinct from #2201), but this branch conflicts with main and has no green CI run. Please rebase onto current main so CI runs cleanly.

(AI-assisted review.)

@aslan2142

Copy link
Copy Markdown
Collaborator

Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

@aslan2142 aslan2142 closed this Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with the base branch: rebase it on main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants