Skip to content

Commit 28cef1e

Browse files
docs(vrs): specify bounded helper teardown
agent-tool: Codex agent-tool-version: 0.145.0 agent-runtime: Codex 0.145.0 agent-session-lookup: unavailable tooling-profile: dotfiles@unknown-dirty
1 parent 9cad112 commit 28cef1e

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

docs/vrs/requirements.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ accepted.
5252
deterministic st2 reconciler keeps declared local processes converged; the
5353
root observes host-local runtime health, diagnoses failures, performs bounded
5454
recovery, and escalates what it cannot resolve.
55+
- **R32 Bounded helper teardown:** After st2 spawns a bounded non-interactive
56+
helper, input delivery failure or deadline expiry targets the helper's entire
57+
process group, not only its direct child, so teardown includes descendants
58+
that outlive that child. st2 either reaps the direct child before returning or
59+
transfers wait ownership to a background reaper; the failure remains bounded
60+
and reports its originating input error or timeout.
5561
- **R22 Quiet coordination after events:** A network with minimal or default
5662
personas stays quiet while useful work continues. Agents coordinate only after
5763
an inbox DING, a durable failure, a real blocker, a completion or decision

docs/vrs/spec.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,18 @@ validate ──► materialize ──► host-local st2 scheduler/reconciler
473473
failing to restart the agent, or terminally parking it, suppresses companion
474474
launch and stops an exact generated companion proved live; explicitly
475475
authored sibling tasks remain independent.
476+
- **R32:** Bounded non-interactive helpers such as `pty list --json` and
477+
`pty metadata patch` start in a fresh session whose leader PID is also its
478+
process-group ID. Standard output and error use regular temporary files, so a
479+
descendant inheriting those descriptors cannot hold a capture pipe open.
480+
After spawn, an input setup or write failure or a deadline expiry sends
481+
`SIGKILL` to the process group and explicitly terminates the direct child.
482+
st2 waits for that child until the cleanup deadline; if it cannot finish the
483+
wait synchronously, a background waiter takes ownership before the failure
484+
returns. The process-group signal reaches a descendant that outlives the
485+
direct child; terminating the direct child alone does not. [PR
486+
#202](https://github.com/compoundingtech/st2/pull/202) provides
487+
descendant-lifetime and direct-child-reap evidence for this contract.
476488
- **R06:** st2 passes the complete effective task definition to the underlying
477489
launcher so manual and supervised restarts are equivalent. Harness readiness
478490
that depends on a dynamically selected account belongs to that declared

0 commit comments

Comments
 (0)