[FEATURE] Bind compiler evidence to an isolated invocation owner #15

Open
opened 2026-10-12 18:48:04 +02:00 by erikinkinen · 3 comments
Owner

Problem and motivation

Compiler evidence must remain tied to the actual approved program, source and
artifact-producing invocation through cleanup. Retiring a process group does
not account for detached descendants that could still modify an artifact.

Proposed behavior and scope

Add an isolated invocation owner for Exsh's host evidence producer. Integration
selects the signed source and independently approved runtime/input policy.
Complete compiler, artifact and packaging evidence must come from that original
owner; exported observations remain data. Existing frame and resource gates
continue to apply.

Complete compiler diagnostic output profile

A fresh complete compiler diagnostic may explicitly select a 512 MiB aggregate
producer-output profile, retaining the 2 GiB capture, 512 MiB transport, 1800 s
total, 240 s actual-tool quiet and 15 s actor-retirement selections. The existing
64 MiB producer-output profile and both original and separately selected checker
profiles remain unchanged. The new selection is a finite candidate rather than
an adequacy or completion claim.

Count every retained raw ELF/LLVM extent, its actual intake, derived observations,
native exports, actual write copies and rereads, as well as original source,
metadata, tool, runtime, sysroot and transport costs under their respective
aggregate owners. Register attempted extents before counter refusal, preserve
consumed charges and the original clocks, and retain exact partial output owners
through independent semantic cleanup. Unknown outputs or source copies prevent
parent resource teardown and cannot be converted to success by a receipt or
unproved process/group closure. Source declarations remain complete data, while
an actual filtered graph authenticates its selected signed edges and legitimate
members of each original signed tree without requiring inactive dependencies.

This selection does not admit immutable consumed inputs, generic filesystem or
physical-memory confinement, deployment/package provenance, typed callback or
SSA closure, Kernel effects, complete cleanup-frame proof or guest acceptance.

The material allowance covers counted retention, intake and controlled exports;
actual tool filesystem and storage confinement remain separate host premises.
A static line-IR diagnostic cannot replace the complete deployed PIC artifact,
native runtime/registry pairing or its required source and frame proof.

Authority, security and reliability

Complete producer admission will use one isolated supervisor for one original tool invocation. File, policy, signature and LLVM observations remain usable as data, but an existing process-group observation does not establish detached-descendant retirement. Neither a reported PID nor a successful group signal may close that obligation. The original checker and producer resource budgets remain unchanged.

The trusted workflow will capture the complete supervisor program from the actual selected, independently verified signed Exsh source tree, seal those original bytes, and acquire the Python executable from the independently approved tool policy. It will execute that sealed program through the retained approved executable descriptor with an explicit closed environment and isolated interpreter options. The reviewed host Python standard library, loader, Linux kernel and C runtime remain explicit platform premises. The workflow will retain the original returned process, pidfd, program capture, runtime capture and exclusive reaping custody before accepting any supervisor observation. Original source, executable, descriptor, process or namespace substitution refuses admission. A separately launched executable or caller-written receipt cannot establish this owner.

Before spawning, the workflow will exclusively create an anonymous local stream socket pair with close-on-exec descriptors. Only the original supervisor receives its selected endpoint. The workflow retains the other endpoint and closes the surplus inherited occupations. Originally sealed tool/input descriptors and the original working-directory descriptor are transferred at that same spawn through a complete role/descriptor inventory; no later ancillary descriptor transfer is admitted. The supervisor checks each expected role, actual file occupation, extent and required seals before acknowledging readiness. Tools receive only their selected tool/input/working-directory and stdout/stderr descriptors. They never inherit either control endpoint, the supervisor program descriptor or an unrelated peer descriptor. The supervisor becomes non-dumpable before tool creation and verifies that native state, so tool code cannot authenticate or rewrite its control program through same-user tracing. Admission also requires independently observed absence of effective, permitted and ambient tracing capabilities in tool recipients. Non-dumpability alone cannot exclude a privileged tracer. This protects channel lineage; it does not claim a general host sandbox.

Every transport frame will contain an exact versioned magic, message kind, monotonically increasing sequence, full original invocation digest and counted payload extent. The payload grammar has exact required fields and complete field/type/extent validation. The receiver checks the complete original correlation before using an observation or selecting authority. Foreign invocation digests, unexpected kinds, incorrect sequences, duplicate fields, truncated headers/payloads, trailing bytes, duplicate/replayed requests or replies, ancillary descriptors and messages after terminal completion freeze ordinary work. Declared extents are charged against the original remaining aggregate transport allowance before allocation. Readiness permits one correlated invocation request; it does not grant another executable, root, deadline or output allowance. Cleanup control can retire only the original retained invocation. It cannot replay execution or replace its first error.

The first implementation will explicitly support Linux x86-64 with the reviewed glibc signal/prctl ABI, original readable procfs visibility, pidfd acquisition/signalling/waiting and a single-threaded isolated supervisor with default, non-auto-reaping SIGCHLD and no foreign reaper. This is an isolated reaping boundary, not a thread-count limit on unrelated callers. The supervisor sets PR_SET_CHILD_SUBREAPER and independently reads it back before readiness. Its original PID namespace descriptor and actual credentials are retained and checked. Admission additionally requires a reviewed inherited no-new-privileges/seccomp boundary preventing PID/user namespace transitions, setns/unshare, credential-changing operations and ptrace/process-memory/control-descriptor acquisition. Legacy clone may create ordinary processes/threads but cannot request a new namespace; clone3 is unavailable until its pointed-to flags can be independently constrained. A tool needing one of these unavailable operations requires a separately reviewed custody backend. Missing native mechanisms, unreadable procfs, changed namespace/credentials, denied signalling or lost waitability retain uncertainty and refuse positive completion; no numeric fallback targets a replacement.

Only that isolated supervisor will adopt orphaned descendants. It creates no unrelated child cohort and has no foreign reaping callbacks. A current procfs child list is only a candidate inventory: each candidate must independently be an actual waitable original child before an original pidfd is acquired and correlated. Exclusive non-auto-reaping custody keeps that occupation reserved across acquisition; later signalling and terminal observation use the retained original pidfd. A PID printed by a tool is never a selector. Terminal reaping is performed only after the matching original terminal wait observation. The supervisor repeatedly retains and retires newly adopted children, including detached, nested and threaded descendants, while preserving every original handle and first uncertainty. The supported kernel parentage contract reparents children before exposing the exiting parent as a terminal zombie. Final closure therefore requires all originally retained children to be terminal/reaped, no creation-capable original member to remain, and an independent complete native wait including Linux __WALL clone-child semantics over the supervisor child scope returning ECHILD. An empty procfs list or a single no-event wait does not establish this closure. The parentage premise follows the reviewed Linux exit and wait implementation; unsupported clone/namespace semantics cannot be inferred into it. The actual running host kernel's relevant behavior must be independently admitted; its version string or the linked reference implementation is insufficient.

Once-only positive completion requires the original tool's successful status, complete output publication, full original descendant closure and no earlier uncertainty. The supervisor then emits one correlated terminal completion and waits for its matching acknowledgement before releasing its original control owner. Lost acknowledgement, partial creation, EOF, cancellation, supervisor restart, malformed transport or publication failure retain the original process/channel/descriptor/cohort owners and exact first error; they never replay the tool or terminal completion. Cleanup-only control may retire original known handles. It cannot turn a failed invocation into an admitted premise. A failed or incomplete retirement retains that original supervisor as cleanup custody rather than forgetting a possibly living detached member.

Every request, reply, header, retained tool stdout/stderr byte and supervisor diagnostic shares explicitly selected aggregate transport/output accounting. The original total deadline begins before supervisor creation. Only actual tool stdout/stderr bytes reset the original no-output clock; readiness, housekeeping, child observations and supervisor heartbeats cannot extend it. Cancellation and exhaustion freeze ordinary work under those same original owners. Bounded cleanup does not issue new ordinary work, reset the original deadline, reset accounting or imply success after expiry.

The workflow will bind complete original invocation, features, configuration, environment, signed source/dependency objects, approved runtime and sysroot inputs, emitted ELF/IR and exact packaging derivation to that same original owner. Exported observations remain reviewable data. Full source/frame acceptance still requires the original checker aggregate intake, paired mappings, complete typed provider/callback/SSA closure and separate Kernel register/write effects. Independent controls must cover descriptor/channel substitution, every malformed/duplicate/replayed transport boundary, original programme/runtime substitution, unsupported mechanisms, automatic/foreign reaping, credential/namespace change, detached/nested/threaded descendants, partial creation, actual output versus heartbeat stall timing, cancellation, original/peer lifetime observations, retained first uncertainty, stale pidfds, terminal replay and lost acknowledgement before this supervisor can admit a source premise.

Approved runtime acquisition custody

The actor's supervisor programme, selected approved Python interpreter and reviewed host interpreter/extension/loader runtime must already be bound by the original parent spawn owner. Before importing the native interoperation runtime, the signed entry independently validates the complete original inherited descriptor inventory, exact sealed programme/interpreter/input objects, task scope, credentials and unchanged original invocation/resource bindings. Original non-auto-reaping admission is inherited from the independently checked original parent through the reviewed exec signal semantics; Python-level default handler/mask observations are recorded before import, and the actual native SIGCHLD policy is independently read back immediately after the fixed interoperation import, before any tool/probe creation. Changed, automatic or foreign native reaping refuses readiness. The stage performs only the fixed original ctypes import; imports of the remaining signed supervisor modules occur afterwards and must not acquire another unexplained descriptor. Caller callbacks, import hooks, receipt fields, library paths and alternative module selections cannot stand in for that operation.

For the supported CPython/libffi host runtime, native extension initialization allocates and frees an initial closure to initialize its allocator. Its libffi trampoline initialization may acquire an original read-only file and retain that file in the native global trampoline owner for subsequent executable mappings. The successful allocation's free operation returns the allocation to the native cache; it does not retire the retained file owner. The independent actual _ctypes-only control observes that acquisition before any Python callback factory is used. This explains the wanted original owner and why closing its numeric descriptor while the native runtime still retains it would be unsafe. This backend accepts only the explained read-only native runtime acquisition geometry of that reviewed operation: no retained file, or its one original read-only trampoline backing object. That geometry follows the reviewed runtime's single retained trampoline-file owner; it is not an application/descendant/FD capacity ceiling. Any additional, writable, inherited, substituted, unsealed-original-input, unexplained or changed occupation refuses readiness. Unsupported native runtime acquisition behavior remains an explicit refusal; an interpreter version or filename never grants an exemption.

Complete actual before/after scopes establish original acquisition under exclusive fixed-operation custody. Each acquired native runtime owner retains its actual fstat identity, extent, mode/change clocks, read-only access flags, noninheritance, complete captured bytes and digest, and their original capture charges. The parent-owned interpreter and sealed programme occupations, original inherited objects, task/credential/reaper state and invocation/resource owners must remain unchanged. These observations establish wanted descriptor custody under the existing trusted host-runtime premise; they do not independently approve library bytes, authenticate a compiler/source/artifact premise, or prove the complete host runtime implementation. The descriptor stays wanted and intact until interpreter exit, and every tool/probe/channel recipient excludes it. Its unexpected close, rights change or numeric reuse freezes ordinary work and retains the original source/channel/process/resource owners; original authenticated terminal retirement remains separate. No replacement is opened, signalled or closed as the original object.

Mapping observations remain complete, separately accounted descriptive evidence. A different native mapping device view, equal inode, corresponding filename, inaccessible map_files link or successful mmap cannot authenticate descriptor acquisition or source membership. This host's earlier strict mapping refusal, four failed whole-owner controls and unsupported map_files results remain preserved. The new admission does not pretend those observations satisfied the old object-equality predicate. The narrower alternative instead relies explicitly on the reviewed fixed import's original native acquisition semantics; the original interpreter/extension/loader trust premise is unchanged.

Independent controls must cover the actual supported import acquisition and exact first-error behavior, unknown inherited descriptors, a read-only wrong object added outside the fixed import, additional/writable acquisitions, inherited flags, changed original inputs/programme/interpreter or task/reaper scope, original native descriptor close/reuse, tool/probe exclusion, output/capture exhaustion and complete original actor terminal retention. No mock observation may certify production readiness. Partial incoming frame retirement, once-only acknowledgement, independent native reaping, original aggregate/copy accounting and all source/frame acceptance refusals remain unchanged.

Primary implementation references explain the premise without copying an implementation into the product: CPython native extension initialization, libffi closure allocation and free, libffi trampoline file acquisition and retained owner. The observed host packages are CPython 3.14.8 and libffi 3.5.2; these package/version observations are descriptive, not approval selectors.

Original partial-frame retirement

After the first timeout or cancellation, the original incoming frame remains a cleanup-only owner of its exact header/body progress, retained bytes, complete counted reservation, channel, invocation digest and sequence. Only those same original bytes may be completed under the once-selected original cleanup clock; no buffer, reservation, error, ordinary elapsed/stall clock or sequence is reset. A complete original OUTPUT may be retained under the original aggregate output allowance, without renewing tool activity or source admission. If its retained extent exceeds that allowance, the original prefix is retained and the complete unknown/consumed output reservation remains charged; the first refusal persists. Completing the same bounded transport frame still permits independently correlated terminal-only control, but cannot recover ordinary output or tool access. An authentic once-only terminal acknowledgement may serve solely to retire the original actor and independently closed descendant cohort; it does not turn a timed-out invocation into positive compiler/source evidence and returns no failed reservation. No new ordinary request, positive completion, packet or partial outgoing acknowledgement may be replayed. Malformed correlation, unknown or truncated boundaries that cannot be completed, exhausted transport/capture allowance, lost original endpoint/process custody, partial outgoing ACK or absent independent terminal reaping retain the original uncertain owners and exact first error; they never authenticate another numeric process, source object or resource allowance.

Acceptance criteria

  • Bind actual signed supervisor source, approved executable/runtime and original spawn to a retained process and descriptor owner.
  • Admit the reviewed native platform and inherited confinement before tool creation, including subreaper readback and tracing/namespace/credential boundaries.
  • Enforce complete counted and correlated channel grammar, descriptor exclusions, replay refusal and once-only terminal acknowledgement.
  • Prove complete original descendant retirement with actual native handles and terminal observations, including detached, nested and threaded children.
  • Retain the first failure and original cleanup owners through malformed input, partial creation, cancellation, timeout, restart and acknowledgement loss.
  • Account original input/transport/output budgets and actual tool-output stall timing, without extending checker limits or replacing failed evidence.
  • Bind actual compiler configuration, signed source/dependency inputs, ELF/IR and packaging output; retain all remaining provider/SSA/Kernel effect gates.
  • Document the boundary and measure equivalent producer work; add the positive, malformed, authority-negative and cleanup controls described above.

Alternatives and tradeoffs

An in-process reaper depends on the caller's signal and thread policy. An isolated
supervisor provides a separate child scope, but needs an authenticated original
channel and complete native lifetime accounting. A namespace or syscall mode
that cannot meet that contract must refuse until a supported backend exists.

Tracking and rollout

Related: compiler/frame requirements,
Phase 6 and
shell implementation.
Implement the owned channel/platform/retirement boundary before consuming its
compiler premises. Remove the superseded admission path after preserving its
regression controls. Full source/frame admission and guest builds remain required.

Full compiler capture profile

The approved tool, interpreter and sysroot inputs alone contain 471,416,555
bytes. Retaining the source, IR, ELF and complete observations across the build
requires at least 1,081,722,692 bytes before the remaining package and native
inputs. These measured lower bounds exceed the existing small checker profile;
omitting input facts or treating a compact receipt as their capture cannot
establish admission.

Keep the existing 64 MiB input/output, 60-second total and 15-second quiet
checker profile unchanged. Add a separate, explicitly selected full capture
attempt: the producer receives 2 GiB aggregate capture, 512 MiB aggregate
transport including both copies, 64 MiB retained output, 1,800 seconds total and
240 seconds without progress. Its checker receives 1 GiB aggregate input,
64 MiB output, 300 seconds total and 15 seconds without progress.

These are finite candidate allowances, not evidence that they are sufficient.
Every input, observation, channel copy and original reservation remains charged;
the total clock never restarts. The first failure still freezes ordinary work,
and unused loans return only after complete native retirement. Preserve every
earlier resource refusal as a separate result.

Run the actual signed supervisor program with the exact approved compiler,
runtime, sysroot and complete source selection. The checker retains all existing
source, callback, provider, SSA, register/write, frame and mapping obligations.
A larger capture allowance cannot turn incomplete proof into PASS. Full EriX
guest builds and rebuilding Rust/LLVM inside EriX remain separate requirements.

## Problem and motivation Compiler evidence must remain tied to the actual approved program, source and artifact-producing invocation through cleanup. Retiring a process group does not account for detached descendants that could still modify an artifact. ## Proposed behavior and scope Add an isolated invocation owner for Exsh's host evidence producer. Integration selects the signed source and independently approved runtime/input policy. Complete compiler, artifact and packaging evidence must come from that original owner; exported observations remain data. Existing frame and resource gates continue to apply. ### Complete compiler diagnostic output profile A fresh complete compiler diagnostic may explicitly select a 512 MiB aggregate producer-output profile, retaining the 2 GiB capture, 512 MiB transport, 1800 s total, 240 s actual-tool quiet and 15 s actor-retirement selections. The existing 64 MiB producer-output profile and both original and separately selected checker profiles remain unchanged. The new selection is a finite candidate rather than an adequacy or completion claim. Count every retained raw ELF/LLVM extent, its actual intake, derived observations, native exports, actual write copies and rereads, as well as original source, metadata, tool, runtime, sysroot and transport costs under their respective aggregate owners. Register attempted extents before counter refusal, preserve consumed charges and the original clocks, and retain exact partial output owners through independent semantic cleanup. Unknown outputs or source copies prevent parent resource teardown and cannot be converted to success by a receipt or unproved process/group closure. Source declarations remain complete data, while an actual filtered graph authenticates its selected signed edges and legitimate members of each original signed tree without requiring inactive dependencies. This selection does not admit immutable consumed inputs, generic filesystem or physical-memory confinement, deployment/package provenance, typed callback or SSA closure, Kernel effects, complete cleanup-frame proof or guest acceptance. The material allowance covers counted retention, intake and controlled exports; actual tool filesystem and storage confinement remain separate host premises. A static line-IR diagnostic cannot replace the complete deployed PIC artifact, native runtime/registry pairing or its required source and frame proof. ## Authority, security and reliability Complete producer admission will use one isolated supervisor for one original tool invocation. File, policy, signature and LLVM observations remain usable as data, but an existing process-group observation does not establish detached-descendant retirement. Neither a reported PID nor a successful group signal may close that obligation. The original checker and producer resource budgets remain unchanged. The trusted workflow will capture the complete supervisor program from the actual selected, independently verified signed Exsh source tree, seal those original bytes, and acquire the Python executable from the independently approved tool policy. It will execute that sealed program through the retained approved executable descriptor with an explicit closed environment and isolated interpreter options. The reviewed host Python standard library, loader, Linux kernel and C runtime remain explicit platform premises. The workflow will retain the original returned process, pidfd, program capture, runtime capture and exclusive reaping custody before accepting any supervisor observation. Original source, executable, descriptor, process or namespace substitution refuses admission. A separately launched executable or caller-written receipt cannot establish this owner. Before spawning, the workflow will exclusively create an anonymous local stream socket pair with close-on-exec descriptors. Only the original supervisor receives its selected endpoint. The workflow retains the other endpoint and closes the surplus inherited occupations. Originally sealed tool/input descriptors and the original working-directory descriptor are transferred at that same spawn through a complete role/descriptor inventory; no later ancillary descriptor transfer is admitted. The supervisor checks each expected role, actual file occupation, extent and required seals before acknowledging readiness. Tools receive only their selected tool/input/working-directory and stdout/stderr descriptors. They never inherit either control endpoint, the supervisor program descriptor or an unrelated peer descriptor. The supervisor becomes non-dumpable before tool creation and verifies that native state, so tool code cannot authenticate or rewrite its control program through same-user tracing. Admission also requires independently observed absence of effective, permitted and ambient tracing capabilities in tool recipients. Non-dumpability alone cannot exclude a privileged tracer. This protects channel lineage; it does not claim a general host sandbox. Every transport frame will contain an exact versioned magic, message kind, monotonically increasing sequence, full original invocation digest and counted payload extent. The payload grammar has exact required fields and complete field/type/extent validation. The receiver checks the complete original correlation before using an observation or selecting authority. Foreign invocation digests, unexpected kinds, incorrect sequences, duplicate fields, truncated headers/payloads, trailing bytes, duplicate/replayed requests or replies, ancillary descriptors and messages after terminal completion freeze ordinary work. Declared extents are charged against the original remaining aggregate transport allowance before allocation. Readiness permits one correlated invocation request; it does not grant another executable, root, deadline or output allowance. Cleanup control can retire only the original retained invocation. It cannot replay execution or replace its first error. The first implementation will explicitly support Linux x86-64 with the reviewed glibc signal/prctl ABI, original readable procfs visibility, pidfd acquisition/signalling/waiting and a single-threaded isolated supervisor with default, non-auto-reaping SIGCHLD and no foreign reaper. This is an isolated reaping boundary, not a thread-count limit on unrelated callers. The supervisor sets PR_SET_CHILD_SUBREAPER and independently reads it back before readiness. Its original PID namespace descriptor and actual credentials are retained and checked. Admission additionally requires a reviewed inherited no-new-privileges/seccomp boundary preventing PID/user namespace transitions, setns/unshare, credential-changing operations and ptrace/process-memory/control-descriptor acquisition. Legacy clone may create ordinary processes/threads but cannot request a new namespace; clone3 is unavailable until its pointed-to flags can be independently constrained. A tool needing one of these unavailable operations requires a separately reviewed custody backend. Missing native mechanisms, unreadable procfs, changed namespace/credentials, denied signalling or lost waitability retain uncertainty and refuse positive completion; no numeric fallback targets a replacement. Only that isolated supervisor will adopt orphaned descendants. It creates no unrelated child cohort and has no foreign reaping callbacks. A current procfs child list is only a candidate inventory: each candidate must independently be an actual waitable original child before an original pidfd is acquired and correlated. Exclusive non-auto-reaping custody keeps that occupation reserved across acquisition; later signalling and terminal observation use the retained original pidfd. A PID printed by a tool is never a selector. Terminal reaping is performed only after the matching original terminal wait observation. The supervisor repeatedly retains and retires newly adopted children, including detached, nested and threaded descendants, while preserving every original handle and first uncertainty. The supported kernel parentage contract reparents children before exposing the exiting parent as a terminal zombie. Final closure therefore requires all originally retained children to be terminal/reaped, no creation-capable original member to remain, and an independent complete native wait including Linux __WALL clone-child semantics over the supervisor child scope returning ECHILD. An empty procfs list or a single no-event wait does not establish this closure. The parentage premise follows the reviewed [Linux exit and wait implementation](https://github.com/torvalds/linux/blob/v6.12/kernel/exit.c); unsupported clone/namespace semantics cannot be inferred into it. The actual running host kernel's relevant behavior must be independently admitted; its version string or the linked reference implementation is insufficient. Once-only positive completion requires the original tool's successful status, complete output publication, full original descendant closure and no earlier uncertainty. The supervisor then emits one correlated terminal completion and waits for its matching acknowledgement before releasing its original control owner. Lost acknowledgement, partial creation, EOF, cancellation, supervisor restart, malformed transport or publication failure retain the original process/channel/descriptor/cohort owners and exact first error; they never replay the tool or terminal completion. Cleanup-only control may retire original known handles. It cannot turn a failed invocation into an admitted premise. A failed or incomplete retirement retains that original supervisor as cleanup custody rather than forgetting a possibly living detached member. Every request, reply, header, retained tool stdout/stderr byte and supervisor diagnostic shares explicitly selected aggregate transport/output accounting. The original total deadline begins before supervisor creation. Only actual tool stdout/stderr bytes reset the original no-output clock; readiness, housekeeping, child observations and supervisor heartbeats cannot extend it. Cancellation and exhaustion freeze ordinary work under those same original owners. Bounded cleanup does not issue new ordinary work, reset the original deadline, reset accounting or imply success after expiry. The workflow will bind complete original invocation, features, configuration, environment, signed source/dependency objects, approved runtime and sysroot inputs, emitted ELF/IR and exact packaging derivation to that same original owner. Exported observations remain reviewable data. Full source/frame acceptance still requires the original checker aggregate intake, paired mappings, complete typed provider/callback/SSA closure and separate Kernel register/write effects. Independent controls must cover descriptor/channel substitution, every malformed/duplicate/replayed transport boundary, original programme/runtime substitution, unsupported mechanisms, automatic/foreign reaping, credential/namespace change, detached/nested/threaded descendants, partial creation, actual output versus heartbeat stall timing, cancellation, original/peer lifetime observations, retained first uncertainty, stale pidfds, terminal replay and lost acknowledgement before this supervisor can admit a source premise. ### Approved runtime acquisition custody The actor's supervisor programme, selected approved Python interpreter and reviewed host interpreter/extension/loader runtime must already be bound by the original parent spawn owner. Before importing the native interoperation runtime, the signed entry independently validates the complete original inherited descriptor inventory, exact sealed programme/interpreter/input objects, task scope, credentials and unchanged original invocation/resource bindings. Original non-auto-reaping admission is inherited from the independently checked original parent through the reviewed exec signal semantics; Python-level default handler/mask observations are recorded before import, and the actual native SIGCHLD policy is independently read back immediately after the fixed interoperation import, before any tool/probe creation. Changed, automatic or foreign native reaping refuses readiness. The stage performs only the fixed original ctypes import; imports of the remaining signed supervisor modules occur afterwards and must not acquire another unexplained descriptor. Caller callbacks, import hooks, receipt fields, library paths and alternative module selections cannot stand in for that operation. For the supported CPython/libffi host runtime, native extension initialization allocates and frees an initial closure to initialize its allocator. Its libffi trampoline initialization may acquire an original read-only file and retain that file in the native global trampoline owner for subsequent executable mappings. The successful allocation's free operation returns the allocation to the native cache; it does not retire the retained file owner. The independent actual _ctypes-only control observes that acquisition before any Python callback factory is used. This explains the wanted original owner and why closing its numeric descriptor while the native runtime still retains it would be unsafe. This backend accepts only the explained read-only native runtime acquisition geometry of that reviewed operation: no retained file, or its one original read-only trampoline backing object. That geometry follows the reviewed runtime's single retained trampoline-file owner; it is not an application/descendant/FD capacity ceiling. Any additional, writable, inherited, substituted, unsealed-original-input, unexplained or changed occupation refuses readiness. Unsupported native runtime acquisition behavior remains an explicit refusal; an interpreter version or filename never grants an exemption. Complete actual before/after scopes establish original acquisition under exclusive fixed-operation custody. Each acquired native runtime owner retains its actual fstat identity, extent, mode/change clocks, read-only access flags, noninheritance, complete captured bytes and digest, and their original capture charges. The parent-owned interpreter and sealed programme occupations, original inherited objects, task/credential/reaper state and invocation/resource owners must remain unchanged. These observations establish wanted descriptor custody under the existing trusted host-runtime premise; they do not independently approve library bytes, authenticate a compiler/source/artifact premise, or prove the complete host runtime implementation. The descriptor stays wanted and intact until interpreter exit, and every tool/probe/channel recipient excludes it. Its unexpected close, rights change or numeric reuse freezes ordinary work and retains the original source/channel/process/resource owners; original authenticated terminal retirement remains separate. No replacement is opened, signalled or closed as the original object. Mapping observations remain complete, separately accounted descriptive evidence. A different native mapping device view, equal inode, corresponding filename, inaccessible map_files link or successful mmap cannot authenticate descriptor acquisition or source membership. This host's earlier strict mapping refusal, four failed whole-owner controls and unsupported map_files results remain preserved. The new admission does not pretend those observations satisfied the old object-equality predicate. The narrower alternative instead relies explicitly on the reviewed fixed import's original native acquisition semantics; the original interpreter/extension/loader trust premise is unchanged. Independent controls must cover the actual supported import acquisition and exact first-error behavior, unknown inherited descriptors, a read-only wrong object added outside the fixed import, additional/writable acquisitions, inherited flags, changed original inputs/programme/interpreter or task/reaper scope, original native descriptor close/reuse, tool/probe exclusion, output/capture exhaustion and complete original actor terminal retention. No mock observation may certify production readiness. Partial incoming frame retirement, once-only acknowledgement, independent native reaping, original aggregate/copy accounting and all source/frame acceptance refusals remain unchanged. Primary implementation references explain the premise without copying an implementation into the product: [CPython native extension initialization](https://github.com/python/cpython/blob/v3.14.8/Modules/_ctypes/_ctypes.c#L6390), [libffi closure allocation and free](https://github.com/libffi/libffi/blob/v3.5.2/src/closures.c), [libffi trampoline file acquisition and retained owner](https://github.com/libffi/libffi/blob/v3.5.2/src/tramp.c). The observed host packages are CPython 3.14.8 and libffi 3.5.2; these package/version observations are descriptive, not approval selectors. ### Original partial-frame retirement After the first timeout or cancellation, the original incoming frame remains a cleanup-only owner of its exact header/body progress, retained bytes, complete counted reservation, channel, invocation digest and sequence. Only those same original bytes may be completed under the once-selected original cleanup clock; no buffer, reservation, error, ordinary elapsed/stall clock or sequence is reset. A complete original OUTPUT may be retained under the original aggregate output allowance, without renewing tool activity or source admission. If its retained extent exceeds that allowance, the original prefix is retained and the complete unknown/consumed output reservation remains charged; the first refusal persists. Completing the same bounded transport frame still permits independently correlated terminal-only control, but cannot recover ordinary output or tool access. An authentic once-only terminal acknowledgement may serve solely to retire the original actor and independently closed descendant cohort; it does not turn a timed-out invocation into positive compiler/source evidence and returns no failed reservation. No new ordinary request, positive completion, packet or partial outgoing acknowledgement may be replayed. Malformed correlation, unknown or truncated boundaries that cannot be completed, exhausted transport/capture allowance, lost original endpoint/process custody, partial outgoing ACK or absent independent terminal reaping retain the original uncertain owners and exact first error; they never authenticate another numeric process, source object or resource allowance. ## Acceptance criteria - [ ] Bind actual signed supervisor source, approved executable/runtime and original spawn to a retained process and descriptor owner. - [ ] Admit the reviewed native platform and inherited confinement before tool creation, including subreaper readback and tracing/namespace/credential boundaries. - [ ] Enforce complete counted and correlated channel grammar, descriptor exclusions, replay refusal and once-only terminal acknowledgement. - [ ] Prove complete original descendant retirement with actual native handles and terminal observations, including detached, nested and threaded children. - [ ] Retain the first failure and original cleanup owners through malformed input, partial creation, cancellation, timeout, restart and acknowledgement loss. - [ ] Account original input/transport/output budgets and actual tool-output stall timing, without extending checker limits or replacing failed evidence. - [ ] Bind actual compiler configuration, signed source/dependency inputs, ELF/IR and packaging output; retain all remaining provider/SSA/Kernel effect gates. - [ ] Document the boundary and measure equivalent producer work; add the positive, malformed, authority-negative and cleanup controls described above. ## Alternatives and tradeoffs An in-process reaper depends on the caller's signal and thread policy. An isolated supervisor provides a separate child scope, but needs an authenticated original channel and complete native lifetime accounting. A namespace or syscall mode that cannot meet that contract must refuse until a supported backend exists. ## Tracking and rollout Related: [compiler/frame requirements](https://git.erikinkinen.fi/erix/exsh/issues/4), [Phase 6](https://git.erikinkinen.fi/erix/integration/issues/65) and [shell implementation](https://git.erikinkinen.fi/erix/exsh/pulls/3). Implement the owned channel/platform/retirement boundary before consuming its compiler premises. Remove the superseded admission path after preserving its regression controls. Full source/frame admission and guest builds remain required. ### Full compiler capture profile The approved tool, interpreter and sysroot inputs alone contain 471,416,555 bytes. Retaining the source, IR, ELF and complete observations across the build requires at least 1,081,722,692 bytes before the remaining package and native inputs. These measured lower bounds exceed the existing small checker profile; omitting input facts or treating a compact receipt as their capture cannot establish admission. Keep the existing 64 MiB input/output, 60-second total and 15-second quiet checker profile unchanged. Add a separate, explicitly selected full capture attempt: the producer receives 2 GiB aggregate capture, 512 MiB aggregate transport including both copies, 64 MiB retained output, 1,800 seconds total and 240 seconds without progress. Its checker receives 1 GiB aggregate input, 64 MiB output, 300 seconds total and 15 seconds without progress. These are finite candidate allowances, not evidence that they are sufficient. Every input, observation, channel copy and original reservation remains charged; the total clock never restarts. The first failure still freezes ordinary work, and unused loans return only after complete native retirement. Preserve every earlier resource refusal as a separate result. Run the actual signed supervisor program with the exact approved compiler, runtime, sysroot and complete source selection. The checker retains all existing source, callback, provider, SSA, register/write, frame and mapping obligations. A larger capture allowance cannot turn incomplete proof into PASS. Full EriX guest builds and rebuilding Rust/LLVM inside EriX remain separate requirements.
Author
Owner

The isolated compiler supervisor is signed at 564e2b850511fe044366a7e16bc94a1b411ec500. Complete preparation now exposes a nested interpreter failure: Python tries to execute a descriptor that the child has already closed. This is tracked in Integration #114. Immutable interpreter and compiler-input consumption remain open.

The isolated compiler supervisor is signed at `564e2b850511fe044366a7e16bc94a1b411ec500`. Complete preparation now exposes a nested interpreter failure: Python tries to execute a descriptor that the child has already closed. This is tracked in [Integration #114](https://git.erikinkinen.fi/erix/integration/issues/114). Immutable interpreter and compiler-input consumption remain open.
Author
Owner

The compiler supervisor repair shares one native description pair across local files, sockets, pidfds and streams. It records acquisitions and partial I/O before cancellation, requires exact owner coverage before closure, and retires known peers without repeating uncertain effects. READY cleanup and the original absolute deadline use the same failure rules.

Removing repeated native policy checks reduced median pair-retirement time from 2.14 ms to 0.74 ms in an 80-child-per-source host sample. This covers that operation only. Inherited actor inventory, complete compiler/runtime/sysroot consumption, source/frame proof and the EriX guest builds remain open.

The [compiler supervisor repair](https://git.erikinkinen.fi/erix/exsh/commit/229ea950a8b5adc0acec2e995465baed957d3abd) shares one native description pair across local files, sockets, pidfds and streams. It records acquisitions and partial I/O before cancellation, requires exact owner coverage before closure, and retires known peers without repeating uncertain effects. READY cleanup and the original absolute deadline use the same failure rules. Removing repeated native policy checks reduced median pair-retirement time from 2.14 ms to 0.74 ms in an 80-child-per-source host sample. This covers that operation only. Inherited actor inventory, complete compiler/runtime/sysroot consumption, source/frame proof and the EriX guest builds remain open.
Author
Owner

The fresh signed-source compiler diagnostic completes in 227.63 seconds within the original limits, with outer cleanup confirmed. Helper preparation, metadata, compilation and all complete raw/derived artifacts are retained. The relay forwards genuine tool stderr through separately precharged portions without unlocking actor loans. Bootstrap detached lifetimes, immutable compiler-input consumption and full source/frame/deployment admission remain open. Fifteen certification warnings in the signature logs are tracked in Exsh #17; compiler and helper streams contain no warnings.

The fresh signed-source compiler diagnostic completes in 227.63 seconds within the original limits, with outer cleanup confirmed. Helper preparation, metadata, compilation and all complete raw/derived artifacts are retained. The relay forwards genuine tool stderr through separately precharged portions without unlocking actor loans. Bootstrap detached lifetimes, immutable compiler-input consumption and full source/frame/deployment admission remain open. Fifteen certification warnings in the signature logs are tracked in [Exsh #17](https://git.erikinkinen.fi/erix/exsh/issues/17); compiler and helper streams contain no warnings.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:33:49 +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#15
No description provided.