Bound autonomous release commands with process-tree deadlines #329

Closed
opened 2026-08-08 18:49:22 +00:00 by rockachopa · 0 comments
Member

Problem

ShellRunner.run() executes coding-agent and test commands without deadlines. A hung command or descendant can wedge the release worker indefinitely, leave its issue claimed, and block later autonomous delivery.

Scope

  • Add separately configurable positive agent and test deadlines plus a positive termination grace period.
  • Execute bounded commands in isolated process sessions.
  • On deadline, terminate the whole process group, escalate to kill after grace, reap descendants, and preserve bounded evidence.
  • Persist agent_timed_out / tests_timed_out; never continue to tests, push, or PR after timeout.
  • Document configuration and state transitions.

Acceptance tests

  • A stalled agent with a spawned child returns within deadline + grace, leaves neither process alive, records agent_timed_out, and does not run tests/push/PR.
  • A stalled test records tests_timed_out and does not push/open a PR.
  • Successful and non-zero commands retain current output and transitions.
  • Non-positive deadlines/grace are rejected before claiming an issue.

Evidence / non-duplication

Current origin/main 41eaf519 has no timeout argument in src/release_engine.py:126-139; all 167 historical issue titles/bodies and recent commits were checked. #14 introduced the engine and #307 isolated issue content from shell execution, but neither bounds command runtime or terminates process trees.

## Problem `ShellRunner.run()` executes coding-agent and test commands without deadlines. A hung command or descendant can wedge the release worker indefinitely, leave its issue claimed, and block later autonomous delivery. ## Scope - Add separately configurable positive agent and test deadlines plus a positive termination grace period. - Execute bounded commands in isolated process sessions. - On deadline, terminate the whole process group, escalate to kill after grace, reap descendants, and preserve bounded evidence. - Persist `agent_timed_out` / `tests_timed_out`; never continue to tests, push, or PR after timeout. - Document configuration and state transitions. ## Acceptance tests - A stalled agent with a spawned child returns within deadline + grace, leaves neither process alive, records `agent_timed_out`, and does not run tests/push/PR. - A stalled test records `tests_timed_out` and does not push/open a PR. - Successful and non-zero commands retain current output and transitions. - Non-positive deadlines/grace are rejected before claiming an issue. ## Evidence / non-duplication Current `origin/main` `41eaf519` has no timeout argument in `src/release_engine.py:126-139`; all 167 historical issue titles/bodies and recent commits were checked. #14 introduced the engine and #307 isolated issue content from shell execution, but neither bounds command runtime or terminates process trees.
timmy was assigned by rockachopa 2026-08-08 18:49:22 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stackchain/stackchain-dashboard#329
No description provided.