Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A timed-out command adapter can hang the browser evaluation runner on POSIX.
runProcesssignals only its immediate child, but waits for the child'scloseevent. If a launcher starts a worker that inherits stdout/stderr, that worker keeps the pipes open after the launcher is killed. The same problem occurs if the launcher exits before the deadline. The existing SIGKILL escalation still targets the exited launcher rather than the worker.Change
Start commands in a separate POSIX process group and send the existing SIGTERM/SIGKILL timeout signals to that group. This reaches workers even after the launcher exits. Clear the escalation timer on completion so it cannot signal a later reused group ID. Preserve the existing direct-child behavior on Windows.
Add real-process regressions for a running launcher, an already-exited launcher, and a descendant that ignores SIGTERM. Each descendant also has a bounded self-exit so the regression safely fails on unmodified code.
This fixes descendants that inherit the command's POSIX process group and keep its captured pipes open. Once the launcher and its pipes close, escalation is canceled; this is not a general background-process cleanup guarantee. Independently detached processes and Windows tree termination are outside this change.
Verification
On Linux / Node 24.22.1:
node --test evals/browser/tests/*.test.mjs: 30 passed, 0 failed.node evals/browser/cli.mjs validate: 10 cases / 19 fixture routes validated.git diff --check: passed.Windows/macOS execution, browser smoke, Rust/extension suites and full workspace lint were not run. No browser or Rust implementation changed.
AI assistance
Prepared and tested with OpenAI Codex. Submitted as a draft; no human-review attestation is claimed.