Files
Pulse/scripts
pulse-triage[bot] d11aff19e7 Drain killed backend task process groups during cleanup (#5443)
**Drain killed backend task process groups during cleanup**

After sending SIGKILL to each owned task process group, stop_tasks()
only waited on direct subshell leaders (wait "${pids[@]}"). When a
leader had already exited on SIGTERM (or as the failing task) while a
TERM-ignoring or orphaned descendant only just received SIGKILL, the
runner could return before the kernel finished tearing down that
descendant, leaving a live process in state R and failing
test_release_backend_queue.py in Build and Test (run 46185958683,
job 141105938366).

Add wait_for_task_groups() to wait with a bounded 5-second deadline
(re-sending SIGKILL while live non-zombie processes remain in any owned
process group, and ignoring dead/zombie states Z/X/x so unreaped
orphans awaiting init cannot stall cleanup), invoked only when
kill -0 -- "-$pid" reports remaining processes in an owned group.
Add regression tests covering TERM-ignoring descendants after leader
exit, live group draining, and zombie-only groups.

Contract-Neutral: Internal process-group teardown wait and regression
tests in scripts/run-release-backend-tests.sh only; no release gate CLI,
coverage, CPU lease, timeout, or public contract delta.

**Verify /proc matches current PID namespace during cleanup wait**

wait_for_task_groups() checked only os.path.isdir('/proc'), which stays
true inside PID-namespaced sandboxes whose /proc mount still reflects
the host namespace (observed in preflight proof sandbox where
/proc/603/stat raised FileNotFoundError). Verify
os.readlink('/proc/self') == str(os.getpid()) and /proc/<self>/stat
before scanning /proc so wait_for_task_groups falls back to
os.kill(-pgid, 0) instead of silently skipping SIGKILL, assert SIGKILL
termination in the live-group test, and skip only the /proc-dependent
zombie-only subtest when /proc does not match the current PID namespace.

Contract-Neutral: Internal /proc PID-namespace check in
wait_for_task_groups() and matching sandbox guard in
test_release_backend_queue.py only; no release gate CLI, coverage, CPU
lease, timeout, or public contract delta.

---
Fleet candidate `20261128T203514Z-delivery-trust` from the
`delivery-trust` lane. Reviewed tip
`e22b1f3f0968255733103b223ac2c247231742a7` on `main`.

[How Pulse handles
triage](https://github.com/rcourtman/Pulse/blob/main/docs/AI_TRANSPARENCY.md)
2026-11-28 21:17:19 +00:00
..
…
…
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
…
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-03-18 16:06:30 +00:00
2026-11-28 00:28:19 +00:00
2026-03-18 16:06:30 +00:00