[FEATURE] Prepare acquisition scopes from an explicit directory root #28

Open
opened 2026-10-27 17:43:28 +01:00 by erikinkinen · 1 comment
Owner

Problem and motivation

The current acquisition-scope request preserves the transferred directory's existing root and cwd. Filesystem workloads need a dedicated directory as both root and cwd, with access confined to that selection.

Proposed behavior and scope

Add a separate rooted acquisition request carrying the existing realm/client/source handles and a raw relative directory selector. Resolve it through the existing directory-root path, then prepare the acquisition scope from the narrowed result. Keep the current unrooted request intact.

Use this for an explicit filesystem heap-test profile with a private root and RAM-backed /tmp. Grant the writer its prepared scope and clock; the peer retains no filesystem authority. Preserve existing byte-only profiles.

Authority, security and reliability

The caller must transfer its original directory authority. Selector bytes grant nothing and resolution must stay within that source's native ceiling. Positively retire broader anchors before publishing the selected directory as root and cwd.

Keep both provider and acquisition retirement keys, source/result handles and the first failure through preparation and cleanup. Use monotonic phases; uncertain completion must retain owners and prevent replay or reuse.

Acceptance criteria

  • Add a canonical rooted-request codec with independent literal, malformed-selector, capability-count and correlation controls; retain existing unrooted bytes.
  • Produce the narrowed scope through the genuine directory-root resolver without broader rights or default grants.
  • Preserve both cleanup paths across success, cancellation, lost replies, reentry and uncertain retirement.
  • Wire the explicit filesystem profile with counted resources, writer-only scope and peer denial; retain older byte/heap/thread/I/O controls.
  • Run the unchanged C file/cwd workload inside its private namespace and require complete cleanup.
  • Update the public protocol, component contracts and technical manual.

Alternatives and tradeoffs

The caller could select an already prepared root receipt, but that owner currently remains inside Launchd. An explicit selector lets Launchd reuse its existing narrowing path without exporting another authority handle.

Tracking and rollout

Related: Phase 6, C file adapters, cwd, and directory failure context. Define the request and lifecycle first, then adopt the filesystem workload and its native scenario.

## Problem and motivation The current acquisition-scope request preserves the transferred directory's existing root and cwd. Filesystem workloads need a dedicated directory as both root and cwd, with access confined to that selection. ## Proposed behavior and scope Add a separate rooted acquisition request carrying the existing realm/client/source handles and a raw relative directory selector. Resolve it through the existing directory-root path, then prepare the acquisition scope from the narrowed result. Keep the current unrooted request intact. Use this for an explicit filesystem heap-test profile with a private root and RAM-backed `/tmp`. Grant the writer its prepared scope and clock; the peer retains no filesystem authority. Preserve existing byte-only profiles. ## Authority, security and reliability The caller must transfer its original directory authority. Selector bytes grant nothing and resolution must stay within that source's native ceiling. Positively retire broader anchors before publishing the selected directory as root and cwd. Keep both provider and acquisition retirement keys, source/result handles and the first failure through preparation and cleanup. Use monotonic phases; uncertain completion must retain owners and prevent replay or reuse. ## Acceptance criteria - [ ] Add a canonical rooted-request codec with independent literal, malformed-selector, capability-count and correlation controls; retain existing unrooted bytes. - [ ] Produce the narrowed scope through the genuine directory-root resolver without broader rights or default grants. - [ ] Preserve both cleanup paths across success, cancellation, lost replies, reentry and uncertain retirement. - [ ] Wire the explicit filesystem profile with counted resources, writer-only scope and peer denial; retain older byte/heap/thread/I/O controls. - [ ] Run the unchanged C file/cwd workload inside its private namespace and require complete cleanup. - [x] Update the public protocol, component contracts and technical manual. ## Alternatives and tradeoffs The caller could select an already prepared root receipt, but that owner currently remains inside Launchd. An explicit selector lets Launchd reuse its existing narrowing path without exporting another authority handle. ## Tracking and rollout Related: [Phase 6](https://git.erikinkinen.fi/erix/integration/issues/65), [C file adapters](https://git.erikinkinen.fi/erix/lib-cstd/issues/14), [cwd](https://git.erikinkinen.fi/erix/posixd/issues/44), and [directory failure context](https://git.erikinkinen.fi/erix/launchd/issues/22). Define the request and lifecycle first, then adopt the filesystem workload and its native scenario.
Author
Owner

Rooted acquisition preparation is implemented in Launchd and LibIPC. Integration selects the separate filesystem heap profile, with a privately rooted scope for the writer and no filesystem grant for its peer. Native execution, complete cleanup and stack measurements remain open.

Rooted acquisition preparation is implemented in [Launchd](https://git.erikinkinen.fi/erix/launchd/commit/34106843d67092415a724f114a8ec213b07397a5) and [LibIPC](https://git.erikinkinen.fi/erix/lib-ipc/commit/4acc6c8559401a9bf3ff2a01885785e28d6fa836). [Integration](https://git.erikinkinen.fi/erix/integration/commit/acdeaf70b2b83143e9e4bb911ec67be45582a11c) selects the separate filesystem heap profile, with a privately rooted scope for the writer and no filesystem grant for its peer. Native execution, complete cleanup and stack measurements remain open.
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#28
No description provided.