[FEATURE] Declare optional terminal lifecycle authority #25

Open
opened 2026-10-24 02:46:01 +02:00 by erikinkinen · 1 comment
Owner

Problem and motivation

Native command startup should give each command only the terminal operations its authenticated manifest declares. Commands that only read or write streams do not need the session-owner lifecycle endpoint.

Proposed behavior and scope

Add an explicit session-lifecycle manifest bit. Launchd derives the optional child destination only from the authenticated manifest; executable names, arguments and stream selections cannot enable it. Preserve the existing destination record as a selector, with zero representing no child endpoint where optional destinations are encoded.

Procd keeps its independently owned lifecycle endpoint for process teardown, but installs a child alias only when the selected destination is nonzero. Native startup checks require the exact SEND endpoint when declared and prove that slot absent otherwise. Update the shell, monitor and time-command declarations for their actual lifecycle consumers, plus coordinated catalogs and documentation.

Authority, security and reliability

The declaration bounds installation and grants no authority by itself. Keep exact owner, process generation, destination-window, rights and duplicate-slot checks. Parent and Procd teardown authority remain separate from the child's optional alias. Preserve first-error precedence and stop on uncertain cleanup; do not broaden stream endpoint rights or grant lifecycle access for geometry reads.

Acceptance criteria

  • Define and document the explicit manifest declaration and optional child destination semantics.
  • Select and install the child alias only under authenticated policy, preserving owner teardown and slot validation.
  • Reject missing or unexpected lifecycle capabilities during complete native startup inventory checks.
  • Migrate actual consumers and maintained manifests/catalogs without command-name authority rules.
  • Cover omitted, declared, malformed, duplicate, cleanup and consumer startup paths, including the matching integrated graph.

Alternatives and tradeoffs

Dropping an unused alias after startup shortens its lifetime but still delegates it. Needs-based installation avoids that grant while preserving the supervisor's own cleanup route. The existing wire destination can carry absence without adding a separate capability namespace.

Tracking and rollout

Coordinate LibIPC, LibCapabi, Launchd, Procd, Exsh, Coreutils, Extop and Integration. Supports native SHA-2 and Phase 6. Keep the selected producer/consumer graph coherent before enabling the new command profile.

## Problem and motivation Native command startup should give each command only the terminal operations its authenticated manifest declares. Commands that only read or write streams do not need the session-owner lifecycle endpoint. ## Proposed behavior and scope Add an explicit session-lifecycle manifest bit. Launchd derives the optional child destination only from the authenticated manifest; executable names, arguments and stream selections cannot enable it. Preserve the existing destination record as a selector, with zero representing no child endpoint where optional destinations are encoded. Procd keeps its independently owned lifecycle endpoint for process teardown, but installs a child alias only when the selected destination is nonzero. Native startup checks require the exact SEND endpoint when declared and prove that slot absent otherwise. Update the shell, monitor and time-command declarations for their actual lifecycle consumers, plus coordinated catalogs and documentation. ## Authority, security and reliability The declaration bounds installation and grants no authority by itself. Keep exact owner, process generation, destination-window, rights and duplicate-slot checks. Parent and Procd teardown authority remain separate from the child's optional alias. Preserve first-error precedence and stop on uncertain cleanup; do not broaden stream endpoint rights or grant lifecycle access for geometry reads. ## Acceptance criteria - [x] Define and document the explicit manifest declaration and optional child destination semantics. - [x] Select and install the child alias only under authenticated policy, preserving owner teardown and slot validation. - [x] Reject missing or unexpected lifecycle capabilities during complete native startup inventory checks. - [ ] Migrate actual consumers and maintained manifests/catalogs without command-name authority rules. - [ ] Cover omitted, declared, malformed, duplicate, cleanup and consumer startup paths, including the matching integrated graph. ## Alternatives and tradeoffs Dropping an unused alias after startup shortens its lifetime but still delegates it. Needs-based installation avoids that grant while preserving the supervisor's own cleanup route. The existing wire destination can carry absence without adding a separate capability namespace. ## Tracking and rollout Coordinate LibIPC, LibCapabi, Launchd, Procd, Exsh, Coreutils, Extop and Integration. Supports [native SHA-2](https://git.erikinkinen.fi/erix/sha2-tool/issues/4) and [Phase 6](https://git.erikinkinen.fi/erix/integration/issues/65). Keep the selected producer/consumer graph coherent before enabling the new command profile.
Author
Owner

LibIPC b66983f5, LibCapabi ebacd400, Launchd 903a5cf4 and Procd 6131bc66 implement the optional lifecycle declaration, exact startup inventory and child-alias omission. Procd keeps its own teardown sender. Consumer manifest flags and the coordinated image graph are being migrated before enabling the new profile.

LibIPC `b66983f5`, LibCapabi `ebacd400`, Launchd `903a5cf4` and Procd `6131bc66` implement the optional lifecycle declaration, exact startup inventory and child-alias omission. Procd keeps its own teardown sender. Consumer manifest flags and the coordinated image graph are being migrated before enabling the new profile.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:33 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
erix/launchd#25
No description provided.