Preserve closed and sparse descriptors in external launches #27

Open
opened 2026-10-25 23:36:24 +01:00 by erikinkinen · 0 comments
Owner

Problem and motivation

Build commands deliberately close standard descriptors while keeping other
files or pipes open. External launch currently requires all three standards,
and retained lender admission covers only standard-derived descriptions.
Native commands need faithful closure and surviving sparse originals such as
fd3/fd4 without dummy endpoints or new authority.

Proposed behavior and scope

Carry typed closure through launch intent, authenticated startup and native
adapters. Commands not using a closed role can run; actual use reports a local
descriptor error, never EOF or a replacement stream. Preserve every original
open description in caller-bounded authenticated storage, including nonstandard
aliases. Cover ordinary children, pipes, nested shells and exec. Keep open-only
wire bytes compatible and coherently migrate the counted storage contract.

Authority, security and reliability

Closed bindings convey no endpoint, receipt, cursor or cleanup authority.
Require fixed capabilities absent while surviving aliases keep original identity,
actual receipt source, cursor, generation and cleanup lifetime through compaction
and exec. Apply measured view policy only to open roles. Reserve complete catalog
capacity before effects, retain uncertainty and reject stale generations. Do not
reopen paths, create /dev/null, discover endpoints or infer authority from scalar
descriptor coordinates or serialized completion records.

Acceptance criteria

  • Canonical typed closure/startup absence has literal, contradictory,
    duplicate, malformed, residual-capability and compatibility controls.
  • Complete sparse original descriptions and shared cursors survive counted
    storage, actual receipt admission and descriptor-table compaction.
  • Nonstandard-only aliases, insufficient capacity, stale generations,
    lender death and independent once-only cleanup have meaningful controls.
  • Exec preserves original terminal, cwd, catalog and endpoint dependency
    ownership without a replacement terminal or fixed fallback.
  • Native commands not using closed descriptors run; actual closed use fails locally
    without synthetic EOF, native result codes or diagnostic fallback.
  • Native and serial/PS2 fixtures cover closure, aliases, parent restoration
    and status, with actual future results kept distinct from authored fixtures.
  • Component storage/authority documentation and owning manuals are updated.

Alternatives and tradeoffs

Dummy endpoints and EOF substitution change semantics and retain unwanted
capabilities. Removing only the shell check leaves startup and utility adapters
assuming fixed senders. Enlarging the three-row catalog imposes another arbitrary
limit. Typed absence and caller-counted originals reuse existing receipt,
capability-inventory and lifecycle boundaries. Terminal-only tools can retain
explicit documented requirements instead of substituting missing descriptors.

Tracking and rollout

Coordinate suppliers, shell, services, counted startup configuration and native
adapters through reviewable signed dependencies and authenticated successor
ownership. Keep source, compiler/unit checks and image acceptance distinct.
Link dependent PRs as they are created. Track the coordinated work with
native verification and the
phase checklist.

## Problem and motivation Build commands deliberately close standard descriptors while keeping other files or pipes open. External launch currently requires all three standards, and retained lender admission covers only standard-derived descriptions. Native commands need faithful closure and surviving sparse originals such as fd3/fd4 without dummy endpoints or new authority. ## Proposed behavior and scope Carry typed closure through launch intent, authenticated startup and native adapters. Commands not using a closed role can run; actual use reports a local descriptor error, never EOF or a replacement stream. Preserve every original open description in caller-bounded authenticated storage, including nonstandard aliases. Cover ordinary children, pipes, nested shells and exec. Keep open-only wire bytes compatible and coherently migrate the counted storage contract. ## Authority, security and reliability Closed bindings convey no endpoint, receipt, cursor or cleanup authority. Require fixed capabilities absent while surviving aliases keep original identity, actual receipt source, cursor, generation and cleanup lifetime through compaction and exec. Apply measured view policy only to open roles. Reserve complete catalog capacity before effects, retain uncertainty and reject stale generations. Do not reopen paths, create /dev/null, discover endpoints or infer authority from scalar descriptor coordinates or serialized completion records. ## Acceptance criteria - [ ] Canonical typed closure/startup absence has literal, contradictory, duplicate, malformed, residual-capability and compatibility controls. - [ ] Complete sparse original descriptions and shared cursors survive counted storage, actual receipt admission and descriptor-table compaction. - [ ] Nonstandard-only aliases, insufficient capacity, stale generations, lender death and independent once-only cleanup have meaningful controls. - [ ] Exec preserves original terminal, cwd, catalog and endpoint dependency ownership without a replacement terminal or fixed fallback. - [ ] Native commands not using closed descriptors run; actual closed use fails locally without synthetic EOF, native result codes or diagnostic fallback. - [ ] Native and serial/PS2 fixtures cover closure, aliases, parent restoration and status, with actual future results kept distinct from authored fixtures. - [ ] Component storage/authority documentation and owning manuals are updated. ## Alternatives and tradeoffs Dummy endpoints and EOF substitution change semantics and retain unwanted capabilities. Removing only the shell check leaves startup and utility adapters assuming fixed senders. Enlarging the three-row catalog imposes another arbitrary limit. Typed absence and caller-counted originals reuse existing receipt, capability-inventory and lifecycle boundaries. Terminal-only tools can retain explicit documented requirements instead of substituting missing descriptors. ## Tracking and rollout Coordinate suppliers, shell, services, counted startup configuration and native adapters through reviewable signed dependencies and authenticated successor ownership. Keep source, compiler/unit checks and image acceptance distinct. Link dependent PRs as they are created. Track the coordinated work with [native verification](https://git.erikinkinen.fi/erix/sha2-tool/issues/6) and the [phase checklist](https://git.erikinkinen.fi/erix/integration/issues/65).
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:50 +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/exsh#27
No description provided.