land: kill-survivors

AF
11h ago
+2146-101

Accepted agent delivery; branch-keyed search descriptor included.


Summary by cubic

Reports processes that survive a bash kill. After a timeout, bash_kill, or cancelled call, AFT now re-checks the task's process group and names any member still running in live_descendants, the task text, and the completion notice — a process AFT cannot signal, such as one started with sudo and owned by another user, used to be reported as a clean kill.

  • Surviving members are listed with pid, owner, and executable name only, since arguments can hold credentials and are never kept in the record, status, or notice.
  • A check that cannot read every process reports listing_incomplete and keeps the members it did find; an unreadable /proc reports listing_failed, and a null list always carries the reason. A bash_kill on a finished task re-signals a group whose last check was incomplete or missing, but never one last seen empty.
  • macOS no longer drops another user's process from the listing, PTY tasks are checked after a kill, and a terminal state published mid-kill no longer skips the check.
  • The group listing is bounded: it describes at most 16 members cheaply and counts the rest without reading their command lines.
  • The bridge exports LiveDescendant and the unavailable reasons; docs now recommend bounding sudo commands yourself with timeout or a trap, since AFT cannot kill them.

RetriggerView in GreptileConfidence Score: 5/5

The changes since the previous review appear safe to merge.

Summary

AFT reports processes left running after a kill, without saving their arguments.

  • AFT reports processes that remain after a bash task is killed.
  • A later kill reaches a finished task’s group only when its identity still matches.
  • Plugins can read typed survivor details and reasons for missing lists.

No new actionable issues were found in the changes since the previous review.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Check task process group] --> B[Display up to 16 members]
  A --> C[Save up to 1,024 process identities]
  B --> D[Status and completion notice]
  C --> E[Later kill of finished task]
  E --> F{Saved process still in group?}
  F -->|Yes| G[Signal group and check survivors]
  F -->|No| H[Leave group alone]

Reviews (5) · Last reviewed commit: "mason: recognise a finished task's group..." · Reviewed by Greptile