Skip to content

fix(wake): reap owned descendants after the app-server leader exits #205

Closed

Description

@abruption

What happened

Stability audit finding F06 / P2 (2026-09-27). Priority is an audit recommendation, not a claim of a production incident.

Wake cleanup sends SIGTERM to the process group, but waits only for the leader. If the leader exits promptly, the SIGKILL fallback is skipped even when an owned descendant is still alive.

A synthetic app-server forked a child that ignored SIGTERM. Wake returned timed_out / activation_deadline_exceeded, the leader exited with -15, and the child remained alive in the same owned PGID. Independent review and a separate rerun reproduced this; only the fixture's own processes were cleaned.

What you expected

Bound cleanup of the owned process group, not only the leader. Preserve PID/PGID ownership and reuse safeguards; never signal unrelated processes.

Environment

  • Baseline: published session-peer v1.0.1, commit 55168c3bea5a49e81916fdead57d3634def6b1d6.
  • Reproduction: isolated source/tag fixtures; no live message/ACK tests or production mutation.
  • Audit environments: macOS arm64, Python 3.14.7; Control tests use Node 22.14.0. Linux evidence is explicitly identified above where applicable.
  • Discovery output: not applicable to this fixture; no real session identifiers or credentials are included.

Source evidence

Acceptance criteria

  • Exercise prompt leader exit with a TERM-resistant child and verify no owned descendants survive the cleanup deadline.
  • Cover normal completion, cancellation, timeout, already-exited processes, and repeated cleanup.
  • Keep outcome semantics: process cleanup does not retract a request already submitted to another session.

Scope and limitations

Distinct from the MCP subprocess-tree issue, where descendants are not signalled at all.

Target: v1.0.2 stability work. This issue does not authorize a release or operating-service changes. Offline reproduction establishes the failure mechanism, not attribution of historical #161 incidents.

Checked

  • Searched existing issues for duplicates.
  • Removed credentials, conversation contents, private paths and real device/session identifiers.
  • Used isolated fixtures without weakening inbound permissions.

Activity

  1. added this to the v1.0.2 milestone on Sep 27, 2026
  2. added
    bug
    on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions