On this page

ADR 0228: Prove quiet leased process groups on macOS

Context

The real M14 application gate exposed an existing process-limit failure inside the application-test scope. A bounded-output command launched successfully, but Darwin returned EPERM from cancellation when its group contained only zombies. The cleanup error replaced the correct output-limit error. Both the C backend and interpreter reproduced it; the same commands outside the scope succeeded.

An isolated native probe separated authenticated lease, spawn/join and group cancellation. Lease and join succeeded. A complete process-group snapshot found the retained broker witness and retained direct child, both exited, while group SIGKILL returned EPERM. A separate same-session probe disproved a blanket claim that Darwin cannot join a zombie-only group.

Decision

Extend ADR0215's quiet-group proof to authenticated scope leases. A successful lease is carried explicitly through launch and cleanup. Keep the direct child unreaped while checking a complete group snapshot. Accept Darwin EPERM only when that snapshot contains both the separately retained broker witness and direct child, with no live member. Missing identities, failed/partial queries, untrusted groups and live members preserve the error.

The C backend uses its existing bounded sysctl snapshot. The interpreter's bounded trusted process-table query inherits its already-supervised app group; it does not create a new unleased group. Query failure kills and reaps only its owned direct query child. Existing nonleased behavior and Linux behavior remain unchanged. This does not claim app isolation or cleanup of uninterruptible processes.

Verification

The scoped fast-output regression was red before and green after the change on both backends. Maintain negative checks for live members, missing/wrong process identities, incomplete snapshots and absent lease provenance. The actual isolated M14 receipt-output-limit golden passes on C and interpreter. Broader gate results and platform limitations are recorded in the TUI validation ledger.