Skip to content

Bound ProcessRunner timeout across shell descendants#931

Merged
chubes4 merged 2 commits into
mainfrom
fix/930-process-tree-timeout
Jul 21, 2026
Merged

Bound ProcessRunner timeout across shell descendants#931
chubes4 merged 2 commits into
mainfrom
fix/930-process-tree-timeout

Conversation

@chubes4

@chubes4 chubes4 commented Jul 20, 2026

Copy link
Copy Markdown
Member

Summary

  • enforce ProcessRunner timeouts across shell descendants when launch-established tree containment is available
  • use one immediate force signal for verified POSIX process groups and checked taskkill /T /F on Windows
  • avoid descendant PID walking/signaling on unverified macOS/POSIX fallback paths
  • expose additive cleanup containment and verification diagnostics in both WP_Error and error_as_result envelopes

Closes #930.

How to test

  1. Run php tests/process-runner-command-spec.php.
  2. Run php tests/worktree-staleness-fetch-timeout.php.
  3. Run php -l inc/Support/ProcessRunner.php.
  4. Run php -l tests/process-runner-command-spec.php.
  5. Run composer validate --no-check-publish.

Compatibility

  • Public signatures and normal command results are unchanged.
  • Timeout result data gains an additive cleanup object.
  • Linux with setsid and Windows use verified tree containment. macOS and POSIX hosts without launch-established containment terminate only the owned parent and report cleanup.verified: false; they no longer risk signaling unrelated recycled descendant PIDs.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenAI gpt-5.6-sol via OpenCode
  • Used for: Diagnosed descendant timeout cleanup, implemented safe containment reporting, and added deterministic process tests; Chris reviewed and owns the change.

@chubes4
chubes4 merged commit 6c51616 into main Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ProcessRunner timeout blocks on shell descendants after terminating parent

1 participant