test(code-runtime-python): pin the reap-poll group-emptied arm with a dispose-timing case

The review's premise that the group-emptied arm could not be pinned was
incorrect; the same-group reap case already exercises it. This adds the missing
seam-observable case: dispose() while a setsid orphan holds the pipes and the
run is unresolved — settle kills the child, the group empties (the orphan is in
its own session), and the poll finalizes promptly instead of waiting out the
60 s grace. The v8 ignore on that arm is removed.
This commit is contained in:
Chinesezjc
2026-08-31 15:02:38 +08:00
committed by Tianyi Cui
parent 9b7b5489be
commit bc08f405cc
2 changed files with 25 additions and 2 deletions
@@ -1825,8 +1825,6 @@ export class PythonCodeRuntime extends CodeRuntime {
// final hard bound where nothing more can be done.
let hardDeadline = 0
const pollGroup = (): void => {
/* v8 ignore next -- the group-emptied arm needs the close-driven settle to win the
* race against the grace SIGKILL; no seam-observable test pins that interleaving. */
if (groupEmpty()) {
// The group is gone; the grace SIGKILL is moot. Cancel it (it may not
// have fired yet) and finalize. graceTimer is always defined here: