Preserve closed and sparse descriptors in external launches #27
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/exsh#27
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
duplicate, malformed, residual-capability and compatibility controls.
storage, actual receipt admission and descriptor-table compaction.
lender death and independent once-only cleanup have meaningful controls.
ownership without a replacement terminal or fixed fallback.
without synthetic EOF, native result codes or diagnostic fallback.
and status, with actual future results kept distinct from authored fixtures.
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.