[FEATURE] Audit authority, code quality and documentation in procd #1
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/procd#1
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
Audit
procdthroughout Phase 6. Own process materialization, staging, startup, metrics and terminal cleanup under authenticated authority receipts.Review each changed boundary at the final published revision. Prioritize security, reliability, then performance.
Proposed behavior and scope
Complete client entry census and independent zero-right placeholder disposal leave only the guarded SEND ingress.
The mediator closes configuration acquisition, scans the complete local capability window one query per turn, then verifies each distinct original control, client receiver and selected source owner. No new alias can be acquired during this interval. Equal cardinality plus each exact owner proves no surplus alias remains; unknown queries, malformed absence and changed kinds/rights refuse preparation. This keeps control progress bounded, retains original custody and uses linear queries with constant additional stack storage and unchanged arena geometry.
The audit fixed external-descriptor start/seal refusal and empty-table receiver-source disposal, both recorded with the bug-report template. Procd admits D..=D+A while Launchd derives the exact stream subset from its frozen plan; directory bindings add no descriptors. An empty Commit performs the same original DROP/absence barrier following Begin caller retirement, without requiring a dummy descriptor or grant.
Five new Posixd controls and three Procd controls are authored but unrun. Existing materialization, client census, seal, disposal and bounded VM controls remain; no new VM selector or relaxed acceptance gate is needed. Component architecture, applicable README, roadmaps, focused realm contract and technical manual are updated. Rust formatting was applied. Tests, builds, lint checks, manual builds, profiler runs and CI observation remain deferred; no execution or warnings-free result is claimed.
The fresh-process launch checklist item is complete under the testing override. Deny-only compatibility credentials/mode/ACL checks follow. Completion is 15.99%, with 20/460 parents and 427/884 sub-items. Both complete EriX guest-build generations and rebuilding Rust/LLVM inside EriX remain unproved. Reviews: Posixd, Procd, Integration, manual. Design ownership remains in Launchd, Procd and Posixd.
The separate rootless client requires two reciprocal descriptors plus one exact external Write descriptor at i32::MAX. It retains ingress-only native census, immutable startup/workspace ownership and cleanup. Shared lifecycle code requires six actual successful exits, retirement before START, absent stale clients, record reuse and a surviving peer. The final marker uses the original stdout lender after view retirement. Integration budgets 32 sources and 2640 canonical plan bytes, preserving ordinary exit and deadline gates.
Eleven new test functions and six inherited packaging controls are authored but unrun. Existing attenuation and source controls cover read-only mutation, redelegation, parent/symlink escape, replay, receipts and cleanup. Component documentation and the manual describe the bounded scenario. Formatting was applied. Tests, builds, lint checks, manual builds, profiler runs and CI observation remain deferred; no execution or warnings-free result is claimed. The witness covers binding metadata and disposal; it does not establish external backend byte I/O or complete caller-loss coverage.
The binding checklist item is complete under the testing override. Fresh compatibility-process launch and final inventory acceptance are next. Completion is 15.78%, with 19/460 parents and 425/884 sub-items. Both full EriX build generations and rebuilding Rust/LLVM inside EriX remain unproved. Reviews: Posixd, Exsh, Integration, manual. Design ownership: Launchd, Procd, Posixd.
The graph uses one original signed commit per shared dependency. The separately committed orchestration helper precedes its Rootd consumer and final catalog selection. All three catalogs retain immutable hashes without source replacement or branch fallback. Source inventory records 263 exact manifest edges. Two new source-budget controls and extended wire, alignment, layout and owner-loss controls are authored but unrun. The contracts and technical manual are updated.
Counted configuration and deployment storage are complete under the testing override. Complete bounded native binding scenario authoring remains open, so the containing binding item stays open. Tests, builds, lint checks, manual builds, profiler runs and CI observation remain deferred; no execution result is claimed. Completion is 15.72%, with 18/460 parents and 424/884 sub-items. Both full EriX build generations and rebuilding Rust/LLVM inside EriX remain unproved. Relevant reviews: Rootd, Loaderd, Exsh, Integration, manual; design ownership remains with Launchd, Procd and Posixd.
Directory authorities contribute no descriptor and old startup minors reject without fallback.
launchd
99b2fc19counts and emits the same allocation-free frozen-plan record selection and requires cursor exhaustion before committing the original startup hash. procd5586e0f5admits the exact requested count within the original mediator's checked D+A storage ceiling, retaining all native relation, receipt and lifecycle gates. It also adopts the authority-aware target layout and C+A+6 native capability extent, and removes an unused direct time-library dependency. posixd7e4450c2adopts the new scalar startup format while preserving the full rootless client census. No provider SEND is installed into the client; its guarded mediator ingress remains the only operation route.docs
eea18ab3updates the manual. Seven new controls are authored but unrun: one codec/version test, three descriptor-selection tests, two provisioning/count tests and one client-inventory test. Existing literal/malformed controls and target-layout bounds are updated; the public stream handoff/seal control now inspects actual external-only startup records. Formatting was applied. Tests, builds, lint checks, manual builds, profiler runs and CI observation remain deferred by user instruction; no execution result is claimed.Coordinated Rootd/Integration/Loaderd/Exsh adoption and complete bounded native binding scenario authoring remain open. This finishes external-descriptor accounting but adds no checkbox credit for a still-open deployment step. Completion remains 15.65%, 18/460 parents and 423/884 sub-items. Both full EriX build generations and rebuilding Rust/LLVM inside EriX remain unproved. See startup provisioning, binding design, shared API review, Bootstrap review, compatibility ABI review, Launchd review, Procd review, Posixd review, manual review and master completion.
Final mediator CPU custody design — proposed, not yet implemented or accepted:
Use two capability-free owned operations on the existing private Launchd–Procd route:
READ_REALM_FINAL_ACCOUNTING(0x437) andACK_REALM_FINAL_ACCOUNTING(0x438). Selector0x436belongs to the separately proposed Provision successor. No additional endpoint, identity query, capability transfer or authority is introduced.All fields are little-endian, with exact framing:
Every request correlation and identity word is nonzero; only the two assigned operations are admitted in their corresponding message types. Dispositions are
Unconfirmed=0,Measured=1, andNeverExecuted=2. Successful responses and ACK requests require Measured or NeverExecuted and a complete nonzero supervisor pair; NeverExecuted requires both counters zero. Measured permits zero counters: only an actual terminal measurement establishes this disposition. Failure responses preserve the valid request/op/child/realm selector, require Unconfirmed, and zero the supervisor pair and counters. They never invent caller identity. No all-zero digest sentinel is introduced: accounting binds the original native child, original realm and actual caller, and does not restate startup authentication.READ obtains the supervisor identity from actual native CLAIM, which Procd checks against the retained original supervisor. This also works before ContextProbe has supplied Launchd's descriptive identity. A successful READ returns that authenticated pair. Launchd additionally compares it to its retained bootstrap context when one exists. ACK must match actual CLAIM and every retained snapshot field. Parsing bytes proves no native effect or authority. Codecs reject short, surplus, malformed, reserved or mismatched fields; encoding preflights the complete value and output length before any write.
Current implementation: the published private provisioning and execution path includes counted startup, authenticated controller probing, private Start/Challenge and exact retirement. The dated transport and digest proposals below were implemented in the linked checkpoints. The current local validation and remaining native/accounting criteria are recorded under Tracking and rollout.
Lost-provision-reply retirement refinement — 24 September 2026 (implementation pending): RETIRE alone permits an all-zero startup digest to explicitly describe an unknown startup after a lost or malformed Provision response. The actual original Launchd caller, complete original child/generation and retained realm binding remain mandatory; the zero sentinel omits only digest correlation and never selects a replacement or confers authority. A supplied nonzero digest must still match exactly. START never permits this sentinel. Known pre-provision staged custody keeps its existing authenticated staged-abort route. Final retirement acknowledgment still requires actual exact-instance disposal and all locally owned transport/authority obligations, rather than native absence alone.
Private provisioning transport refinement — 24 September 2026 (implementation pending): the guarded preparation request remains non-starting. Add separate typed Procd operations for Provision (
0x433), private Start (0x434) and exact Retire (0x435), all admitted only from the original Launchd generation on its held private receiver. Provision carries a 48-byte request with exact child and realm identity plus explicit request/result byte budgets, and exactly one moved Generic SEND configuration receipt. Procd derives the actual child capability extent from its retained creation geometry, installs configuration at child slot 5, and computes page-rounded startup/workspace mappings beyond the recorded executable extent. Its successful 224-byte response returns the canonical 208-byte startup record after a 16-byte correlation/result/state prefix; failure carries no startup bytes. Start and Retire each carry 64 bytes with the original child/realm and canonical startup digest, preventing cross-stage substitution. These bytes constrain actual held routes and never confer authority.Procd has no existing own-process identity in its startup payload. Reuse native caller attribution through a separate 64-byte configuration ContextProbe/Ack before RBS1 construction. The probe carries correlation, realm/child and original Launchd identity, with zero controller fields; Launchd obtains the Procd pair from actual CLAIM, retains that original pair and echoes it in the correlated acknowledgment. Procd retains the accepted invocation through retirement before committing the resulting context. This adds no kernel identity query, process endpoint or permission to trust an arbitrary first challenge. Posixd still requires its supplied controller to match the challenge's actual native caller.
Launchd explicitly reserves four capability columns per admitted realm in its authenticated deployment geometry. It creates the configuration receiver before exporting SEND, binds an ancestor revoker to its own native lifetime, keeps a separate nested revoker for early retirement, and removes all bypass source aliases. Original executable-scope storage may be reused for temporary construction only after its absence is acknowledged. Procd retains the received configuration sender in an already empty role-owned scratch column, accounts for every mapped frame and setup alias, consumes the actual GRANT through operation 58 only after provisioning, and records uncertain start disposition before the native start effect. No grant-derived MINT capability or ordinary-start fallback is added.
Private Start completes only after native start and the independent control challenge have completed their owned caller cleanup; readiness uses Launchd's separate actual-child CLAIM and full startup digest. Invocation handles and application owners remain retained on cancellation, malformed response, lost reply, supervisor loss and partial disposal. Retire selects running termination after any possibly committed start and waits for exact terminal observation/destruction before acknowledging final retirement. Frame allocation and each handshake must preserve explicit ownership and bounded progress; ordinary staging and all existing refusal/cleanup witnesses remain required. Provision, Start, readiness, seal, publication and client I/O remain distinct acceptance steps.
Private mediator execution design — 24 September 2026 (implementation pending): the next native witness executes the actual Posixd binary using the existing serialized process mapping path. Private address-space-root routing remains separate work; source review found no dependency that requires it before this witness.
The shared contract will add a distinct counted RBS1 startup image: exact version/byte extent; original realm and generation; native child, Launchd supervisor and Procd controller identity pairs; ordered endpoint and writable-workspace records; explicit capability-window and request/result/receipt storage budgets. The initial schema admits exactly a control RECV endpoint and a configuration SEND endpoint, with no root object, Process route or factory. Reject unknown roles, surplus records, duplicate slots, reserved bits, arithmetic overflow and overlapping storage. Counts describe the supported bootstrap roles, while deployment inputs set storage budgets. Startup bytes are child-read-only/NX; Procd verifies installed inventory and separate private RW/NX workspace before execution. The consumer checks actual local capability types/rights. The complete canonical bytes are SHA-256 correlated in readiness and the independent control challenge; parsing and digests grant no authority.
Provisioning finishes by consuming the existing GRANT-only installer through native child-lifetime binding (operation 58), without adding MINT or another installer. Record uncertain binding/start effects before replying. Native start independently requires an empty installer census. Adopt generation-bound native running termination through a new Process operation 61: original child/generation and kill reason, zero reserved fields, no extra route or rights. The generation comparison and terminal transition share native lifecycle serialization; stale requests must never select a replacement. Its acknowledgment is distinct from terminal observation, invocation retirement and native destruction.
Posixd will register only its declared control receiver and use immediate owned operations to submit readiness through its declared configuration SEND while continuing bounded control progress. Launchd authenticates readiness from actual CLAIM origin. Procd independently challenges its retained control endpoint; COLLECT payloads do not attest a server identity. Both exchanges carry exact original identities and startup digest, admit no capabilities at this bootstrap stage, and retain every accepted native handle even on unusual immediate status. Configuration, sealing and client publication remain later separate gates.
Required evidence includes strict codecs and actual inventory denial; committed-effect/lost-reply ownership; wrong/stale caller and generation denial; running-child retirement; supervisor loss; and a maintained VM executing Posixd with native readiness and challenge. Existing unstarted staging regressions remain required. Subsequent acceptance still requires two mediators, two clients each, mediated byte I/O, cross-realm refusal and full retirement, followed by the external toolchain rebuild and both complete guest OS build generations.
Detailed scope and contracts
Staged construction without root capabilities — 15 September 2026
Add kernel-control operation 54, CREATE_STAGED_PROCESS_WITHOUT_ROOT_CAPS, and checked StagedProcessWithoutRootCapsV1 scalar framing. Successful creation returns a live Created process and nonzero generation whose CSpace contains exactly its requested primary endpoint, with no CNode, VSpace or TCB capabilities. Native CSpace/TCB/VSpace objects and the process's VSpace lifetime reference still exist. No child code executes during construction. The endpoint initially retains its ordinary full endpoint rights; operation 53 independently narrows it before bootstrap execution.
Keep the existing creation operation 32 and its producer behavior unchanged. The new selector is independently recognized: an older kernel refuses it, and callers must not fall back to old ignored flags or a child self-report. Admit it only on the existing Process endpoint family, without adding a capability type, endpoint factory or ChildPopulate creation authority.
Use the existing fixed request envelope. arg0 contains the caller-local install-grant destination in its low 32 bits; its upper half is zero. arg1 low/high halves contain child-local primary endpoint and caller-local endpoint-master destinations. arg2 low/high halves contain the child window base and optional caller-local VSpace destination. arg3 contains the 32-bit window length, with a zero upper half. Flag bit 0 means that the VSpace receipt is requested; all other flag bits are zero. When the bit is clear, arg2's upper half must be zero. This explicit presence bit distinguishes an omitted receipt from a real receipt in slot zero. All slot fields retain their full unsigned width; slot zero and otherwise vacant former root positions are ordinary requested slots, subject to native bounds, actual caller-window visibility and occupancy. The checked codec validates framing, not native capacity or authority. The native constructor requires a valid child window containing the primary endpoint.
The caller receives only its actual unique stage-bound install grant, endpoint master and optional MAP-only VSpace receipt. The grant is bound to the returned process/generation and exact child window. Existing capability ceilings, actual object identity and explicit disposal rules remain in force. Temporary native setup bindings must be gone before constructing the final primary endpoint and publishing the grant; otherwise former root positions would remain an unnecessary destination restriction. The TCB's independently held VSpace reference must keep backing alive even without any child or parent VSpace capability.
On failure, destroy the partial child and dispose only successfully created parent receipts. Preserve pre-existing or overlapping destinations and the original failure; uncertain cleanup fail-stops. Never treat a requested slot as evidence that its capability was created. The new contract supplies an initial inventory, not a permanent prohibition on later explicitly authorized installations or a sealed realm. The returned grant remains a real pre-start population authority that its owner must account for and retire.
Required checks include full-width codec/reserved-field cases, omitted versus slot-zero VSpace receipts, zero/former-root/last-slot endpoint destinations, invalid or inaccessible windows, occupied/overlapping outputs, exact parent and child inventories, no residual native objects, mapping/startup backing retention, attenuation through the actual grant and abort/terminal cleanup. Actual CPL3 creation/refusal/disposal must complement host tests. Procd adoption must select this operation only for the mediator role and preserve all ordinary start gates until authenticated grant return, minimum typed startup, retained native/nested guards, readiness, configuration/seal and fair retirement are independently implemented. No runnable realm or guest build is established by this constructor alone.
Native staged endpoint attenuation — 15 September 2026
Add kernel-control operation 53, ATTENUATE_STAGED_ENDPOINT_WITH_GRANT, with a checked ProcessBoundEndpointAttenuationV1 request. This is a new recognized operation; an older kernel must refuse it, and producers must never fall back to an unchecked or post-execution self-report. No syscall number or service endpoint permission is added.
Use the existing fixed KernelControlRequestV1 layout: arg0 low/high halves are the caller's actual install-grant slot and child endpoint destination; arg1 is the exact 32-bit rights mask, with its upper half zero; arg2 low/high halves are expected process and staging generation; arg3 and flags are zero. Both identity components are nonzero. Zero rights means exactly zero, never inheritance. Successful response values are zero.
The native handler must validate the actually held GRANT-bearing install grant, its record, exact expected process/generation, live Created child, grant window, endpoint type ceiling and actual primary endpoint slot. Its rights ceiling must cover the current endpoint rights as well as the requested result; a narrow installer cannot manage a broader existing binding. The new rights must be known, valid for endpoints and a subset of current rights. Update only that existing binding's rights, preserving native object identity, all other bindings and revocation associations. The change allocates no alias and needs no new destination. Repeating the same attenuation may succeed; restoring a removed right must fail. Running, dead, stale, foreign, missing and wrong-type targets must fail without effects.
Admit the operation only on the same Process and ChildPopulate control kinds as exact process-bound installation. Endpoint possession and descriptive IDs alone are insufficient: the actual held scoped grant remains mandatory. The immediate consumer is the future Procd bootstrap transaction, after the actual broad grant returns from Launchd. It will reduce the staged mediator's initial full endpoint to RECV before any private execution, providing independent native proof of that boundary.
Required coverage includes codec/reserved-field rejection, missing and moved grant, wrong process/generation, wrong target/type/window/ceiling, exact attenuation and retry, attempted amplification, post-start refusal, actual CPL3 effect checks and full cleanup. This primitive alone does not admit mediator execution: authenticated grant return, native lifetime and nested revoker custody, minimal root/bootstrap inventory, readiness, configuration/seal and fair retirement remain separate gates. The current ordinary start prohibition stays in force.
Staged mediator handoff contract — 15 September 2026
Reserve Loaderd operation
0x654(PREPARE_REALM) using the existing exact-executable preparation request/response layout. The operation selects the new Procd lifecycle class0x448(REALM_MEDIATOR); role values describe lifecycle policy and confer no capability authority. Launchd explicitly selects this operation after authenticating its executable object. The ordinary operation0x652keeps its existing behavior. Responses must echo the selected operation; no fallback is permitted.Loaderd validates the same sole exact-executable SEND receipt, authenticates the complete image graph, and uses the existing semantic materialization pipeline. The mediator's temporary initial endpoint occupies child-local slot 4, after native root slots 1–3. This slot is an ABI destination, not a realm-count or resource-budget restriction. The child remains staged. Procd retains the actual endpoint master in the existing managed scratch endpoint column; it never exports that master to Loaderd or Launchd. Only the actual move-only install grant travels Procd → Loaderd → Launchd. The derived ordinary stream installer is absent for this class. Reply loss aborts the exact stage and accounts for the retained endpoint, grant and VSpace; cleanup uncertainty remains fail-stop.
Launchd may inspect, abort and stop only its owned lifecycle classes. Root, driver and powerbox routes cannot use the mediator class; generic staged-start, ordinary startup/stream installation and automatic restart reject it. The future separate bootstrap transaction must receive the actual grant back, authenticate the live caller, install a typed receiver/rendezvous inventory using exact process-bound installation, dispose temporary aliases and configure the startup bytes before private execution. No existing start path may bypass that gate.
This staged handoff is the first implementation increment of typed realm bootstrap. Acceptance for this increment requires malformed/foreign operation rejection, exact executable and grant receipts, unstarted materialization, private master retention, no derived stream grant, and rollback coverage across the actual producer paths. It does not establish mediator execution, seal, publication, client I/O, retirement fairness or either complete guest build generation. Those remain required under the existing acceptance criteria. Native VM coverage of the coordinated producer graph is required before claiming runtime acceptance.
Current inventory: 10 Cargo targets (10 bin); manifests:
Cargo.toml. Include explicit and automatically discovered targets, supported features and target-specific configurations.Inventory every startup/runtime grant and authenticated peer, then success, denial, cancellation, failed transfer, restart and teardown. Trace callers and downstream providers so names, numeric identities and retained aliases never become implicit authority.
Planned native terminal-generation contract — 17 September 2026: Introduce operation 55 for exact native process/staging-generation/event-kind/status observations. The request has zero flags and arguments; malformed requests fail before dequeue. Successful responses preserve all four 32-bit fields, captured with the actual native terminal transition and retained after destruction. Empty queues return RETRY with zero values. These records constrain existing authority and confer no process-control capability.
Kernel, shared IPC, Procd and Rootd migrate together. Procd must match the native process/generation pair before cleanup, CPU-time observation, restart or service-event publication. Remove the superseded identity-free native selector after all maintained consumers migrate, with no fallback on unsupported kernels. Preserve queue reservation, ordering, wake and failure semantics. Validate actual exit/kill, generation reuse, empty/malformed input and cleanup failure, then strict component checks and original bounded native VMs on a coherent immutable revision graph.
This is the terminal-observation prerequisite for typed mediator bootstrap. The actual returned install grant already has a generation-checked endpoint-attenuation primitive for the first bootstrap effect. Guard custody, final receiver readiness, sealed publication, two mediators with real client I/O and both full guest builds remain separate mandatory work; this planned contract implements none of those by itself.
Authority, security and reliability
The final READ does not consume a row. Running terminal observation retains its existing measured user/system counters, original supervisor and exact child/realm after native destruction and capability cleanup. Explicit RETIRE retains its separate exact terminal-event disposition. Ordinary QUERY_PROCESS_TIMES must become non-consuming for mediator rows so it cannot bypass the new ACK; ordinary-process behavior is a separate tracked concern.
NeverExecuted must be an explicit retained outcome of successful exact AbortStaged before any native START attempt. A private Provision or Retire that owns rollback binds its realm correlation and engages this scalar obligation before its first possible cleanup effect. Preserve an active scalar-only row after its successful unstarted abort, using an explicit disposed-unstarted state rather than fabricating a terminal event, EXITED state or CPU measurement. Bind an otherwise unbound realm only from that authenticated exact owner's Retire request. The ordinary guarded PREPARE/ABORT path, which never enters running-bootstrap ownership, keeps its existing disposition. An uncertain START can never become NeverExecuted. An absent row or kernel NOT_FOUND is not an accounting outcome.
The managed-row allocator and exact cleanup predicate must recognize both measured-terminal and proved-unstarted dispositions, require empty native/capability custody, no pending scalar obligation and no retained original invocation reservation, and preserve every other existing gate. Repeated cleanup of an already disposed scalar row must not issue AbortStaged or native destruction again. Original supervisor death disables the accounting obligation before its cleanup loop, so successful unstarted cleanup cannot recreate a pending consumer after that death.
Launchd retains one final snapshot in the original RetainedRealmStart. Its retirement phases become: exact child/local/caller/event cleanup, READ and retirement of that original caller, atomic local profiler commit, ACK and retirement of that original caller, fully Retired. Independent local and serving cleanup continues during these phases. Malformed results, uncertainty and unknown owners retain the original record and cannot report successful ABORT or permit release_retired.
Use a production scalar sink in RealmTable, initialized with its pristine storage and lasting for the current Launchd generation. Keep separate measured-retirement and never-executed counts plus checked cumulative mediator user/system nanoseconds, separate from POSIX self/waited-child/job totals. Preflight every aggregate addition, then commit all totals and the original owner's recorded flag together without fallible I/O between them. Arithmetic refusal retains the unchanged totals and the owned snapshot; repeated progress never charges twice. The bounded aggregate does not retain an unbounded history; the original exact snapshot remains in its realm record until ACK and retirement. A Rust-only read accessor supports the existing diagnostic output route; no public cross-client metrics endpoint is added.
ACK carries that already committed snapshot. Procd reserves its exact row, checks its immutable pending snapshot and original native caller, encodes the correlated reply, and clears cpu_time_observation_pending only after canonical native COMPLETE success, before releasing that same reservation. Failed or noncanonical COMPLETE leaves the obligation pending; no incoming accounting request can trigger cleanup of an unrelated or unvalidated child. Native COMPLETE is not caller RELEASE. It copies the result into the original invocation's owned result storage, independently of the managed row. Launchd already owns the snapshot before sending ACK, and retains the original ACK invocation through COLLECT and acknowledged RELEASE. Thus managed-row reuse after successful ACK COMPLETE cannot erase the original result or local accounting evidence. Launchd's realm record still cannot be reused until its own ACK caller and all other owners retire. Route failure may prevent successful retirement, but cannot justify replay, inferred acknowledgement or a second charge.
Client death still follows this accounting path while Launchd lives. Exact Launchd-generation death discharges only its own remaining scalar obligation, as the existing process-lifetime sink ends with that generation. No durable cross-restart profiling history or inherited supervisor authority is claimed.
Record each finding's affected revision, invariant, reproduction, owner, regression coverage and resolution. Report suspected vulnerabilities through SECURITY.md and keep sensitive details private. Record a result and rationale for each audit criterion, including caller responsibilities when this component has no process or Rust target.
Acceptance criteria
Checklist
Independent literal codec fixtures, all offsets, exact sizes, malformed/surplus/zero identities, unknown operations/dispositions, reserved words, canonical failure zeroing, cross-child/realm/supervisor/operation correlation and unchanged output on failed encoding.
Non-consuming READ and ordinary mediator CPU query; real terminal consumer plus real managed allocator retains the row until exact ACK commit. Failed ACK COMPLETE, draining owner, malformed success and nonzero error owners preserve evidence and reservations.
Wrong actual CLAIM, stale original generations, changed disposition/counters and a replacement row cannot consume the original or replacement snapshot. Repeated reads remain identical. Measured zero is distinct from proved NeverExecuted.
Successful original staged abort preserves NeverExecuted only where final accounting is engaged; pre-Provision failure, lost Provision result and cancellation retain the original proof. Unknown native START never becomes unstarted. No duplicate native cleanup or invented terminal event occurs.
Launchd charges its separate production sink once, before ACK; overflow leaves both aggregate and pending snapshot unchanged. Malformed READ never charges. Lost READ/ACK/public-ABORT replies, client loss and repeated cancellation keep original owners. Exact supervisor loss does not resurrect pending accounting or alter another generation.
Native owned-result control: commit the exact ACK, reuse the Procd managed slot for another generation before the caller collects, then collect the original ACK bytes and retire that original invocation. The replacement stays unchanged; stale requests reject. Failed COMPLETE must prevent this reuse. Use the real retained result implementation, not a fixture that assumes its behavior.
Explicit RETIRE and spontaneous terminal observation converge; already consumed and unrelated queued terminal events keep their existing ownership, ordering and counter evidence.
Extend a maintained actual-service witness with an explicit capacity-derived number of create/start/retire cycles greater than the initially available mediator rows, while one other realm stays live. Verify full generations, stable reusable capacity, exactly-once final profiler contributions, nonzero measured CPU for an executed workload, final retirement and stale refusals. Read the actual production totals through an already supplied diagnostic output route; add no cross-client query authority. Preserve the original guest limits and required markers; report capacity/deadline constraints rather than hiding a leak by raising them.
Publish shared ABI first; use original coherent dependency pins, full supported strict host/native matrices, missing_docs/private rustdoc and thematic files under 1,000 lines. Update component architecture/roadmap and technical manual, then preserve complete original CI and native evidence. Existing two-mediator startup acceptance remains separate from final accounting acceptance.
Record origin, recipient, object, operations, delegation ceiling, lifetime and aliases for each relevant capability or caller-supplied authority-bearing value.
Audit ambient discovery/selectors, cwd/PATH/environment, numeric identities, inherited routes and host fallbacks; require explicit authorized intake.
Account for residual authority after success, error, cancellation, timeout, restart, failed transfer and teardown, including fork/exec where implemented.
Remove unnecessary endpoints, broad rights, duplicate aliases, provider/admin grants and debug routes.
Exercise stale generations, replay, pending replies, forged descriptive identity and object/path resolution races at the owned boundary.
Prove independent cleanup attempts and caller-specific error precedence; quarantine or terminate when retained authority cannot be accounted for.
Review unsafe/FFI/parser/arithmetic/lifetime/lock/publication invariants and add adversarial coverage where practical.
Inventory obsolete APIs, wrappers, fallback/dead paths and duplicate validators with their maintained callers.
Migrate callers and delete deprecated contracts/shims in a coherent signed revision graph; reject retired input versions where relevant.
Classify each size/count/depth/time bound as ABI, hardware, explicit resource policy or accidental limitation.
Test beyond removed boundaries and at allocation/ABI limits while preserving exhaustion errors, denial-of-service controls and bounded waits.
Keep every tracked authored code/test/script/workflow file below 1000 physical lines through thematic refactoring.
Run the deterministic tracked-source size gate, covering executable fixtures/generators and excluding only genuine non-code data or external payloads.
Audit production/test feature and symbol separation, including this repository's effect on rootd test orchestration.
Supply changes affecting rootd semantic surface to the maintained same-toolchain baseline; record a justified component-specific applicability result.
Check bootstrap ownership and development/release authority parity at this repository's producer/consumer boundary.
Use maintained integration#3 profiler evidence before optimizing; preserve live access checks, ownership and success criteria.
Audit build/CI inputs, secret handling, private outputs, symlink containment, deletion, subprocess bounds, warnings and host dependencies.
meaningful public/private inline documentation, crate/target
missing_docsenforcement without blanket allowances or hidden-API escapes, warning-denied private-item rustdoc and an undocumented-public-API negative gate.Validation: Run
cargo fmt --all -- --check, strict Clippy, unit/doctests and warning-denied builds/rustdoc for every owned crate/target under default and all valid feature, freestanding/host, SMP and profile combinations; test mutually exclusive combinations separately. Add focused VM regressions for runtime behavior and observe the older catalog and unit tests at the exact published heads.Documentation: update applicable README/ARCHITECTURE/ROADMAP in meta's canonical format and affected technical-manual TeX/API references; keep README evergreen and shared governance byte-identical to meta.
Evidence: record exact source/dependency revisions, commands, configurations, real exit status, CI run URLs and results; repeat the audit on final heads and obtain independent review of security closures. No skipped/pending/predecessor result counts as a pass.
Alternatives and tradeoffs
Refactor within the component unless shared semantics justify extracting common code. Preserve regression coverage before deleting superseded paths. Profile before optimizing, and document ABI limits, hardware limits and explicit quotas. Preserve security and reliability requirements.
Typed realm bootstrap installation design — 15 September 2026: The next bootstrap producer step requires validating the actual moved install grant against the intended child before any installation. Add Kernel-control operation 52, INSTALL_WITH_GRANT_FOR_PROCESS, using the existing fixed request/reply envelope: flags and arg3 are zero; arg0 packs grant slot in bits 0..31 and source slot in bits 32..63; arg1 packs child destination slot and exact requested rights; arg2 packs nonzero process ID and nonzero staged generation. Both response values remain zero. The operation is admitted only where grant installation is already allowed (process-control and child-population endpoints, with existing bootstrap control policy preserved). The held unique grant remains the authority; the supplied process/generation pair is an additional equality constraint, never a target-selection grant. Revalidate exact native grant binding, GRANT possession, child/staged identity and current staged liveness, slot and type/rights ceilings, actual source binding and empty destination before transfer. Unlike legacy zero-means-inherit installation, this operation always uses the exact supplied rights, including zero. Reject nonzero reserved input and zero identities deterministically; mismatched target identity must produce no installed alias or new revocation lineage. Keep old producer semantics unchanged until explicitly migrated. Share the native installation implementation and split the existing near-1000-line control dispatcher by responsibility. Tests must use actual moved install grants for distinct staged children, wrong/stale generations, occupied destinations, explicit zero rights, invalid fields, denied endpoint policy, preserved source/grant custody and native lifetime/revocation behavior. Connect the new checked operation to typed Procd bootstrap provisioning; a standalone scalar codec or host-only table is not realm runtime acceptance. Complete receiver readiness, setup-authority disposal, fair terminal/provider scheduling, two-realm byte I/O and both full guest builds remain required.
Process-bound installation checkpoint — 15 September 2026: Signed
f1105706cc19ed024a6cca79a29abc57c90c6661connects ordinary launch-description installation to native operation 52 with exact retained process/generation and SEND rights. Kernel rejection preserves pending stream state; staging disposal and exact child rollback remain owned across lost replies. Typed realm bootstrap and complete consumer image adoption remain open.Process-bound native acceptance — 15 September 2026: Signed Kernel
60da5858d7198185efd103f0e91e5ac2e0b63e67implements control operation 52, checking the actual moved install grant against expected process/generation with exact rights, including zero, under existing endpoint policies. Signed Procdf1105706cc19ed024a6cca79a29abc57c90c6661uses this operation in its actual ordinary launch-description producer while retaining the narrow SEND receipt, pending state and exact failure cleanup. All 162 Integration helpers pass after updating the exact policy assertion to require the new marker; its initial mismatch remains recorded. Typed realm bootstrap, mediator startup/readiness/configuration/seal, complete consumer image adoption, fair terminal/provider retirement, broader native disposal failures and both full EriX-in-EriX build generations remain open. The new inventory covers 76 repositories, 2,950 code files below 1,000 lines and 158 direct missing_docs crate-root gates; complete inline documentation and whole-codebase authority closure remain open.The mediator class cannot use ordinary start, immediate commit, TTY provisioning, powerbox installation or automatic restart. Procd has forty native binary builds and six new mediator refusal/cleanup regressions. No Posixd executable or coordinated realm VM acceptance is claimed. Actual grant-return provisioning, authenticated caller ownership, typed startup memory/inventory, readiness, configuration/seal, client I/O, fair retirement, complete consumer image adoption and both full guest build generations remain open.
Detailed scope and contracts
Native bootstrap destination correction — 15 September 2026
The temporary endpoint destination is now child-local slot 4, after the mandatory CSpace, VSpace and TCB roots in slots 1–3. This proves the constructor boundary; coordinated mediator startup, seal, client I/O, retirement and full guest builds remain open.
Six mediator authority/cleanup tests cover ordinary-path refusals. Actual grant-return provisioning, authenticated receiver readiness, configuration/seal, client I/O, fair retirement, whole-codebase authority/documentation closure and both complete guest build generations remain required. No runnable Posixd realm or guest-build acceptance is claimed.
Stale and already observed generations cannot initiate accounting or cleanup.
Typed mediator bootstrap, ordinary service-image adoption and both complete EriX builds inside EriX remain open.
The existing held Process or Root route remains
required; descriptive identities do not grant authority.
An absent or different generation acknowledges absence of only the requested
instance, with zero response values; it cannot mutate a replacement.
Required evidence includes exact wire and reserved-field controls, actual-object
generation/reuse and failed-release controls, consumer cleanup tests, and bounded
CPL3 native coverage. Ordinary mediator start, whole-image
admission and both complete builds inside EriX remain separate open gates.
Ordinary service-image execution remains required. Runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements.
The native pending caller must match a retained running
Launchd generation. The actual sole receipt must be INSTALL_GRANT with exactly
GRANT|MINT. Previously guarded, started, stale,
ordinary-role and malformed stages refuse before new effects.
Use the real returned grant and native
operation 53 to narrow the Created child's primary endpoint to RECV. Establish
an ancestor SEND branch under Kernel lifetime custody and a distinct nested
explicit revoker before any export.
Lost reply, rollback, abort, supervisor loss and terminal
cleanup must account for every reused scratch column, actual guard and exact
child identity.
Counted final receivers/configuration,
owned fair intake/provider/retirement progress, private execution, authenticated
readiness, initial receiver disposal, seal/publication, real two-realm client I/O
and both complete builds inside EriX remain required. Host models or this guarded
stage acknowledgment cannot substitute for those acceptance gates.
Matching consumer VM execution, runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements.
This adds no capability or process selector and changes no native ABI. Legacy transfer rendezvous, terminal intake and synchronous provider completion remain separate work before complete realm fairness or consumer VM acceptance.
Legacy terminal/provider progress, actual consumer VM execution, complete realm fairness and both full guest builds remain open.
No grant is constructed, copied, attenuated or retargeted. Malformed register shape rejects before context lookup; caller/window checks precede source lookup, then type/binding checks precede empty-destination admission. Ordinary validation refusal leaves inventory unchanged. Literal register, foreign/terminal caller, missing/fake binding, occupied destination, exact-rights/scope and actual CPL3 controls are required, followed by coordinated producer/consumer adoption and the remaining realm VM gates.
Owned receiver request-budget contract — 18 September 2026: Extend register-only REGISTER (0x4C) to take the actual local RECV slot, maximum request payload bytes and maximum request capability count in arguments 0–2; arguments 3–5 remain zero and successful RDX is zero. The byte/slot/receipt receive layout must be addressable and capability capacity must fit native private CSpace storage. The actual Running generation and held generic RECV endpoint remain the registration authority. SUBMIT compares actual payload length and capability count against that exact registration before request allocation, private-space reservation, native transfer or invocation serial acceptance. These budgets describe service-owned receiving storage; they add no global CALL-size ceiling, user-pointer retention, foreign selector or capability grant. Literal malformed/zero/exact registration controls, rejected-inventory checks, actual CPL3 calls and existing VM oracles are required. Actual consumer VMs, complete fair realm progress and both full guest builds remain open acceptance requirements.
Existing launch-description staging may be reused only with explicit exclusive ownership and proved completion of its former cleanup; add no broad Process authority or per-realm scratch column. Numeric identity or receipt metadata never replaces actual possession or scope validation.
The running service loop must give native retirement a turn before owned bootstrap and ordinary intake. Complete every independent local and child retirement action before relinquishing bookkeeping; uncertain cleanup cannot return a service to ordinary work.
Success requires a canonical correlated result, actual source-grant absence and complete invocation retirement. Preserve ordinary start refusal until realm configuration, readiness and sealing are complete.
Acceptance requires adversarial ownership/cancellation/partial-cleanup host controls, strict coordinated builds and real producer/consumer VM execution.
Actual Launchd runtime orchestration, full provider/terminal fairness, configuration, readiness, seal and both complete guest builds remain open.
Both are nonzero only for the realm mediator role; both must be zero for every other role. Reject the obsolete 56-byte shape.
The pair describes delegated lifecycle responsibility; numbers alone never confer creation, installation or rollback authority. Guard admission must match the original supervisor, never replace it with a later claimant.
Caller RELEASE initiates cancellation and must precede any ordinary abort request that could wait behind Procd delivery retirement.
Actual Launchd runtime preparation and scheduler adoption, deployment-sized ownership storage, adversarial host controls and real producer/consumer VM execution remain required.
Supervisor retirement exhausts active preparation and independent committed stages even after a cleanup refusal, preserving exact obligations and first errors. Actual Launchd owned producer/runtime adoption, coordinated consumer VM execution, complete fairness, configuration/readiness/seal and both full guest builds remain open.
Matching catalog adoption and real consumer VMs remain requirements; complete realm and full in-guest build acceptance remain open.
Original coherent realm source CI acceptance — 18 September 2026: Signed
ea41ec37d36058f0027507ed1ecdb34d773b2aafpasses CI 291 and CI 290. Coherent catalog publication, actual consumer VMs and full guest-build acceptance remain separate open requirements.Tracking and rollout
Counted pipes and original-controller default SIGPIPE are implemented and signed/published: lib-ipc
fdbe4e08, lib-posixabi980a332e, posixd645be685, launchddfcb4d7d, procdf198cbf5, exsh165f2613, integrationc51e2f93, docs47a75253. The separate Integration helper60a44c20precedes final catalogs. The coherent closure contains 56 signed commits across 55 repositories, 206 Cargo selectors and 111 catalog selectors, with exact remote branch equality.RCF1/RCP1 version1.5 admits explicit unused rings of at least512 bytes, including pool-only plans without inherited descriptors. Compatibility1.11 adds Pipe opcode21 and matching Rust/C constants. Two lowest-free fd numbers, independent descriptions and one generation-bound counted ring remain unpublished until accepted native COMPLETE. Refusal cancels both ends; native invocation custody remains independently retained. FIFO scalar/vector writes of at most512 bytes are atomic, larger writes may be short, and blocking calls retain the original description and required free-space condition. Final aliases drive EOF/EPIPE; both-end retirement scrubs the whole ring before reuse. Unrelated closure cannot satisfy a wait.
Ignored, blocked and caught SIGPIPE preserve their distinct EPIPE/pending/handoff behavior. Default unblocked SIGPIPE freezes the original client. Posixd authenticates the original controller CLAIM and complete native context/digest before a one-shot policy decision. Procd polls through its existing mediator SEND, reserves both original rows through actual caller retirement, revalidates the original live relationship and issues at most one generation-checked kill. Native terminal observation, accounting, destruction and notification remain independently owned. A retiring original client discharges a drained poll without another kill; uncertain native custody stays fail-stop. Posixd receives no process-control capability, outbound route, ambient discovery or hidden capacity.
Ordinary byte/binding native clients exercise successful pipes, atomic writes, wraparound, alias closure, reuse and nondefault SIGPIPE. The separate realm-pipes scenario selects realm-pipe-client and requires real Killed(SIGPIPE), retained through retirement and reuse; an EPIPE return or normal exit fails that diagnostic. Explicit1024-byte packets and H=4/Q=1038 pool geometry are configured, with872-byte or3432-byte plan arenas. Existing native authority, lender and120-second deadline gates remain. Unit, transcript, selector and packaging controls are authored and unrun. The Exsh transcript ordering defect is repaired and published.
The pipe feature is accepted under that waiver. Event-driven poll/select, complete libc wrappers, asynchronous handlers and other native signal defaults remain separate work. Both full EriX guest-build generations and rebuilding external Rust/LLVM inside EriX remain required and unperformed.
Current progress is 17.84% weighted and 6.41% whole acceptance: 24/460 parents and 454/914 sub-items under 161 decomposed parents. One complete pipe parent and its seven explicit sub-items are accepted; original parent weights are unchanged.
Pipe contract, descriptor/namespace work, Phase6 master. Reviews: lib-ipc, lib-posixabi, posixd, launchd, procd, exsh, integration, docs.
Client scratch-column clarification — 25 September 2026: the original five-column design is implemented with C0 master, C1 receiver, C2 installer, C3 outer revoker and C4 temporary SEND. After independent master disposal, derive outer SEND into C0 and bind C3 into actual Procd lifetime; drop/query C4, derive inner SEND into C3 and inner revoker into C4, then drop/query C0. Begin retains C1 RECV, C2 GRANT, C3 SEND and C4 MANAGE. The authenticated first descriptor step follows Launchd’s original Begin RELEASE and drops/queries C1. Commit installs C3 into child slot5, drops/queries C3 and consumes/queries C2 through exact child-lifetime binding. Running custody retains C4; retirement visits C4 first. No sixth column or additional authority is added. Procd's contract describes source, recipient, rights and failure custody.
Private client producer checkpoint — 25 September 2026: signed Procd 3b84f4b0 implements original-relation client materialization, target-bound counted provisioning, streamed RCS1, seal, terminal/unstarted-disposal notification and role-neutral final CPU READ/ACK. Coordinated four-client VM acceptance and complete lost-preparation scalar recovery remain open.
Seal correlation audit — 25 September 2026: three new owned-admission controls reproduce a startup-versus-configuration digest mismatch in the client-lifecycle working tree. The comparison correction passes those focused controls; the fresh complete matrix is running. Track exact original failures and remaining VM acceptance in Procd issue9. The existing 64-byte seal request/72-byte reply remain unchanged. No guest execution or checklist credit is added.
Complete client admission/lifecycle design — 25 September 2026: the shared codec design now defines public Launchd operations6D5–6DD using only original owned realm/client handles; private Procd provisioning43D–441; distinct authenticated never-started client disposal messages; and LCH1v4 counted client-row/plan-byte storage. No public caller nominates a native process or capability identity. Freeze verifies the complete canonical plan before effects; private provisioning preserves grant MOVE, receiver COPY and independent source/caller retirement. Client Start follows the two-sided seal, and exact terminal outcomes remain in counted storage until realm retirement. The first immutable byte cohort is explicitly scoped; it is no permanent POSIX process ceiling. A dedicated rootless byte-client binary will use RCS1 and its own ingress only. Implementation, strict validation and the real four-client VM witness remain open.
Retained cleanup design — 25 September 2026: lifecycle failures must return the exact original materialization and linker transaction owners to a cleanup-only boundary. Each owner advances independently and is removed only after correlated acknowledged disposition; ordinary request serving remains unavailable while either is unresolved. Complete linker cleanup precedes process commit. An idempotent Abort confirms an already idle peer, while a different active transaction remains refused and a new Begin preserves any live predecessor. Procd must retain and advance failed cleanup before it can acknowledge absence. Existing operation widths and authority routes remain unchanged. Source implementation, whole-graph fault controls, coherent dependency validation and native evidence are required before acceptance.
Private client materialization contract — 24 September 2026: the existing materialization-begin frame carries only the supervisor pair. Role recognition alone cannot bind an actual client to its intended mediator before native creation. Use distinct private operations with explicit descriptive correlation, authenticated through the existing Loaderd and Launchd routes; no new capability or ordinary-launch fallback is introduced.
Loader
PREPARE_REALM_CLIENT(0x655) is exactly 340 bytes: retain the existing 316-byte exact-executable selection offsets, then realm ID/generation u64 at 316/324 and native mediator process/generation u32 at 332/336. Its distinct 176-byte reply retains the existing 152-byte result/grant/digest fields, then echoes the complete relation at 152/160/168/172 on both success and refusal. Existing failure-zero rules still apply to staged/grant IDs and digest evidence. The old 316/152-byte parsers reject this selector. The exact executable SEND retains COPY semantics and independent source disposal; the staged install grant retains MOVE semantics.Procd
BEGIN_REALM_CLIENT_MATERIALIZATION(0x43C) is exactly 88 bytes: existing 64-byte begin field offsets, then realm ID/generation at 64/72 and native mediator process/generation at 80/84. Require private role0x449, the original nonzero Launchd pair, and nonzero relation scalars. Generic Begin64 must reject role0x449; mediator Begin64 remains unchanged. The existing 36-byte noncommit reply recognizes the new selector and echoes request, operation and original transaction, with zero materialization and staged IDs. Encoding preflights the complete request; neither decoding nor scalar correlation authenticates the native origin.Before client CREATE, Procd authenticates actual Loaderd and the retained running Launchd, resolves the exact original Guarded and unstarted mediator, and checks the same supervisor. Because the final plan digest includes actual client generations, the first admitted client request may bind a previously unbound mediator to that realm pair before creation. Retain this first binding even if client creation later fails. All later client requests and counted Provision must match it. Reject the same realm pair on any other retained mediator belonging to that supervisor, including retirement or uncertain cleanup. Bootstrap-only Provision can still perform the first binding when there are no clients. Preserve the actual parent/mediator/client relationship through active materialization, staged commit, rollback and terminal custody; numeric realm metadata grants no authority.
Client startup, ingress installation, complete configuration, authenticated seal, source disposal and native caller retirement remain separate gates. Clients cannot start until committed seal and its caller retirement are proved. The required two-realm/four-client byte-I/O and cross-realm refusal witness remains open. This is the implementation contract; it adds no native or phase acceptance.
Wire precision for configuration and seal — 24 September 2026:
RCP1version1.0 uses Pull=1 and Reply=2. Its 96-byte common headeris magic/version at0/4/6, kind u16 at8, zero flags u16 at10, raw result
u32 at12, nonzero request u64 at16, complete realm context at24..64 and
configuration SHA-256 at64..96. Requests require result0 and add ordinal
u64 at96 plus reserved0 u64 at104. Replies echo ordinal at96. The validated
plan counts and ordinal determine the one allowed record kind and exact length;
payload length alone never selects policy or capability count. Preserve declared
client and descriptor record order; require unique public/native client pairs
and unique client/descriptor bindings without imposing numeric identity order.
RCS1version1.0 has the160-byte header already specified: magic/versionat0/4/6, header size/flags at8/12, total bytes16, realm pair24/32, native
client40/44, mediator48/52, Procd56/60, CSpace count64, ingress slot72,
zero-right placeholder slot76, request/result bytes80/88, workspace
address/length96/104, configuration digest112..144, descriptor count144
and reserved0 u64 at152. It fixes the intended SEND at slot5 and the
zero-right placeholder at4. At least one initial binding is required, matching
the plan's coverage rule. Request/result minima are40/32 bytes, derived from
the actual Read/empty-Write request and QueryAbi/Write/error reply framing.
These minima guarantee framing only. The count and every packet/mapping extent
are checked; the consumer independently verifies actual mapping, rights and
inventory. Descriptor records preserve plan order and contain no duplicate fd.
RSC1version1.0 shares the96-byte common header offsets above with its ownmagic and kinds SealProbe=1, Prepared=2, SealCommit=3, Sealed=4,
ClientTerminal=5 and ClientTerminalAck=6. Request results are zero; replies
retain raw application result words. The first four kinds are exactly96 bytes.
Both terminal request and acknowledgement are exactly112 bytes: original native
client process/generation at96/100, native terminal kind/status at104/108.
Only the existing Exited/Killed terminal kinds are valid; all32 status bits are
preserved. Acknowledgements echo the entire terminal description even on refusal.
All replies correlate exact kind, request, context, digest and optional terminal
description. Descriptive decoding does not authenticate Procd or prove cleanup.
Private Procd PrepareSeal and CommitSeal use operation selectors0x439/0x43A
with the existing64/72-byte action framing. Their digest is the canonical
configuration digest, with all bit patterns valid; there is no unknown-digest
sentinel for these operations. Successful dispositions Prepared=4/Sealed=5 are
operation-specific; every refusal uses Unconfirmed=0. Start and Retire retain
their existing startup-digest semantics. REALM_CLIENT is the distinct0x449
process class and cannot enter ordinary launch/start/restart policy.
Canonical record indices need not equal physical runtime row positions. Before
serving, Posixd may move whole owned client rows while retaining each canonical
client index, check public/native pair uniqueness by sorting, then use native-pair
order for lookup. Each move retains all receiver custody. Descriptor references
use canonical indices; result regions are assigned after the final order and
before any delivery or I/O effect. No sorting is permitted during serving.
This avoids new arena allocation and repeated quadratic validation in the I/O
path. Configuration must still prove all uniqueness, binding and channel-coverage
invariants before admission. No runtime acceptance is asserted by these codecs.
This completes the final scalar disposition required by the retained mediator accounting defect, in coordination with Launchd realm ownership and Phase 6 completion. Publish and validate the shared ABI before the Procd and Launchd consumers. Existing actual two-mediator startup acceptance does not establish repeated reuse or final accounting.
Counted client configuration continuation — 24 September 2026:
Proposed coordinated continuation: configure each private Posixd instance with two actual staged clients and mediator-owned bounded byte channels. Preserve the existing startup/control handshake and native identity checks. Configuration is canonical, counted and digest-bound; labels select already held owners and never confer authority. This is a first nonblocking byte-I/O slice. Full filesystem/TTY configuration, complete POSIX semantics, libc, all resource-retirement criteria, rebuilding Rust/LLVM inside EriX and both complete EriX guest builds remain required later work.
Introduce a separate RealmClient class admitted only through the original authenticated Launchd/private loader path. Ordinary start/restart and arbitrary numeric client or realm identities remain inadmissible. Stage/authenticate every client image first; freeze the canonical plan only after all actual native pairs are known; provision each digest-bound client startup later. Retain the exact original grant and all possible setup columns across every effect.
Reuse the client's original rootless bound Generic endpoint: attenuate its slot 4 alias to zero rights, retain the true parent master while deriving RECV and guarded SEND branches, install only SEND at client slot 5, and bind the branch and process lifetimes to Procd. Remove all masters/bypass and installation sources with independent absence proof before seal. Procd terminates the exact clients on mediator or Launchd loss as well as native Procd loss. Separate PrepareSeal and CommitSeal actions so no retained request waits for cleanup that its caller must perform. Client Start follows acknowledged committed seal only. Preserve queued/claimed terminal-event obligations and required final CPU-counter disposition for actual managed-record reuse.
Authenticate target geometry through the existing selected-image path. Posixd exports one immutable 96-byte target-generated descriptor in read-only file-backed ELF load storage: magic16
ERIXPXSCAPLAY001, then ten little-endian u64 words for version1, total size96, ELF machine, pointer bits, and client/descriptor/channel row size/alignment pairs. Sizes are nonzero and alignments powers of two; target fields match the selected executable. Loaderd extracts exactly one complete descriptor from its already authenticated root ELF bytes, refusing missing, duplicate, malformed or writable records. No host-derived type size or reopened pathname supplies geometry.An exact 144-byte BindRealmLayout request uses the existing authenticated LoaderMaterialization route: request/op u32, original active transaction u64, root ELF SHA-25632 and descriptor96. Its response uses the existing 36-byte materialization shape with zero noncommit materialization/staged fields. Procd accepts it only from actual Loaderd for that original active mediator transaction, retains the description through staged commit/rollback, and requires it before mediator commit. The startup carries the descriptor SHA-256, which Posixd compares against its own compiled descriptor before any typed arena borrow. Canonical checked sizing partitions client rows, descriptor rows, channel rows, plan bytes, ring bytes, retained per-client results and immediate packet storage; every multiplication, alignment, address and page round must fit. This grants no additional endpoint or allocation authority.
Ordinary endpoint transfer copies authority. Every source and possible receive destination remains owned across submission, collection and native retirement, including ambiguous results. Reserve each prospective receive slot before COLLECT; validate its normalized receipt and actual Generic kind/rights, then independently reconcile its disposal before reuse. Unique InstallGrant and RevocationGrant transfers keep MOVE semantics. Do not infer source deletion from successful copy or use deletion to manufacture successful unique-grant movement.
Track this continuation with Posixd realm lifecycle, POSIX ABI and Phase 6 completion. This is a proposed contract; no runtime or implementation acceptance is claimed.
The maintained
appliance-disk-image-realm-startup-positivescenario passes unchanged: both actual Posixd processes reach authenticated PrivateReady; A retires while B stays ready; B then retires; both stale handles are rejected; the initial shell exits successfully. The original required, unique, ordered and forbidden markers, expected guest exit0x10, 120-second guest hard limit and 45-second serial-progress limit all pass.This exercises counted minimum startup, actual capability census, setup-grant consumption and copied SEND disposal before Start, followed by native child registration, exact-origin readiness and the controller challenge. The packaged Posixd alias selects the same authenticated executable; no ordinary sidecar, extra child endpoint or fallback is introduced. Source-bound exercised gates are the evidence; no separate global inventory dump is claimed. Posixd's Ready caller remains its separately owned obligation until retirement. The successful explicit-retirement path does not exercise Launchd's spontaneous WAIT decoder, final CPU/profiler handoff, repeated row reuse, loss paths or capacity exhaustion.
Launchd's six strict local configurations pass 329 library and 69 runtime tests each; all 48 required commands are warning-free. The corrected native-faithful 14-test group includes COPY source retention, post-Provision caller retirement, separate source disposal/absence verification and failure preservation. Original Launchd CI155/156 also passes: four complete logs, 148,673 bytes, zero warning/failure candidates. Original Integration CI1791/1792 remains queued; earlier failures and regression reports remain preserved. The copied-SEND defect and its native startup regression are resolved at this scoped boundary. Relevant implementation reviews remain Launchd PR2, Procd PR2, Posixd PR5 and Integration PR12.
Configuration/seal/publication, four real clients and mediated byte I/O, complete running retirement and profiler disposition, rebuilding the external Rust/LLVM toolchain inside EriX and both complete EriX guest builds remain required and unproved. The WIP reviews remain unfinished.
Original Procd CI 310/311 at
4f3b01bf21932e86ac542f07e6ade05138cc0473passes: four complete terminal logs, 359,774 bytes, zero warning candidates; each Rust job passes 335 main and five probe tests. The later coherent native image still rejects first public START with INTERNAL, as retained in Integration issue 89; no runtime acceptance is inferred.Procd
4f3b01bf2193corrects the first-Challenge registration race and exact explicit-retirement event ownership. The first Challenge may remain pending on zero-owner NOT_FOUND only before acceptance, after a fresh exact SEND-only endpoint query and while the original child remains live. ContextProbe, BUSY, nonzero failure-owner custody and no-replay rules remain strict. Successful private RETIRE consumes only its original child's queued terminal event after proven native/capability disposition and before acknowledging the retained request; unrelated events and spontaneous WAIT remain available.Both focused controls fail against the original producer and pass after correction. The combined frozen source passes 335 default or 341 all-feature main tests plus five existing probe tests in each development/release configuration. Formatting, all thirteen strict Clippy selections, all nine native build selections, warning-denied host/native private rustdoc, original dependency checks and canonical Markdown checks pass with zero warnings. New original CI runs are being observed separately; no CI success or native acceptance is inferred from local checks.
The coherent image must also select the published Launchd empty-CLAIM correction and Posixd empty-CLAIM correction. Actual Posixd startup, authenticated readiness and independent retirement have not yet passed in that changed image. The earlier typed START NOT_FOUND result remains a failure; these source regressions do not retrospectively identify an unobserved guest substage.
Final mediator CPU-counter observation and managed-record reuse remain required separately. Configuration/seal, client publication and I/O, complete realm cleanup, full EriX guest builds and rebuilding the external Rust/LLVM toolchain inside EriX remain open in Phase 6 completion. Earlier dated evidence below applies to its stated source only.
Startup protection regression 6 remains open for actual guest acceptance.
Private provisioning implementation checkpoint — 24 September 2026: Procd now implements counted memory provisioning, controller attribution through actual native CLAIM, minimal child capability installation, consumed lifetime GRANT, retained private start/challenge and exact retirement after uncertain start. Launchd implements four disjoint capability columns per realm, guarded configuration transport, authenticated Ready/Start progress and independent cleanup. Accepted native handles remain owned through final retirement; an unaccountable successful zero handle stops ordinary intake. The initial synchronous Memd backing operation precedes the context probe and all mediator execution; bounded progress for the entire provisioning operation remains separate work.
Procd passes four strict configurations with 327 default/333 all-feature main tests plus five probe tests, nine native build/Clippy profiles and private rustdoc. Launchd passes six strict configurations with 393 tests each, native builds/Clippy and private docs. The published Posixd consumer and fourteen shared libraries use the same original immutable dependency graph. All 34 original CI runs across these seventeen repositories pass; all 68 complete logs (1,883,783 bytes) have zero warnings or failure candidates. Procd runs 306/307 and Launchd 149/150 cover these exact published heads.
The two-mediator Exsh/Integration startup witness is implemented locally and awaits the coherent service image and actual guest execution. The maintained dynamic builder has produced a checked Posixd PIE and its five original shared objects with exact dependency records and zero warnings; this proves artifact construction only. PrivateReady, Posixd's own Ready RELEASE, configuration/seal, client publication and mediated I/O remain distinct. Existing Exsh release-test compilation and native frame gates remain open. The next runtime acceptance must start both actual mediators, retire the first while the second remains ready, retire the second and reject both stale handles under the existing authority and 120-second guest deadline. Two mediators/four clients, cross-realm refusal, full EriX guest builds and rebuilding the external toolchain inside EriX remain required.
Default development/release configurations pass 311 main unit tests plus five probe tests each; all-feature development/release configurations pass 317 main unit tests plus five probe tests each. Formatting, strict host/native Clippy across supported profiles, warning-denied native and production-feature builds, private rustdoc and Markdown pass with zero warnings.
Coordinated producer provisioning, operation 58 supervisor-lifetime-binding adoption, actual Posixd start and native readiness/retirement VM acceptance remain pending. These source and host/build results do not establish a running realm or a full guest build.
Detailed scope and contracts
Runtime consumer dependency alignment — 15 September 2026
The product catalog, product VM acceptance and guest build remain pending.
Coherent runtime source adoption — 15 September 2026
Full commit selectors remain mandatory.
Native caller admission checkpoint — 15 September 2026
Forwarded SEND aliases, request-body identities, other lifecycle roles, reused generations and unavailable identity cannot acquire this dispatch permission. Other receivers retain their policy; rejected delivered transfers still undergo local disposal, and uncertain disposal stops ordinary continuation.
Five new producer controls exercise accepted event dispatch and refusals without consuming the private event.
Product runtime-image validation still requires a coherent original-commit dependency graph; this checkpoint does not claim a new Procd VM. Actual returned-grant custody, guarded bootstrap, readiness/configuration/seal, mediated client byte I/O, fair retirement and both complete guest build generations remain open.
Native caller admission — 15 September 2026
Before mediator bootstrap shares an existing receiver, Procd will authenticate every Launchd-ingress CALL using the kernel's pending-reply caller identity. The actual process and stage generation must match a retained, started, running Launchd record. A forwarded sender, another lifecycle class, stale generation, absent delivery or unavailable identity must not gain Launchd dispatch permissions. Receiver selection and caller authentication remain separate checks; request-body identity fields cannot authenticate the sender.
The check precedes operation-specific receipt validation and all handlers. Refused transfer-bearing calls retain actual receipt disposal; uncertain disposal still stops ordinary service operation. Other configured receiver policies remain unchanged. There is no new wire operation, capability grant, fallback identity or mediator start permission. Validate accepted dispatch, identity refusals and original transport errors, then run the strict producer matrix and appropriate runtime acceptance.
Actual grant return, guarded bootstrap, readiness/configuration/seal, mediated byte I/O and both complete guest build generations remain required.
Validated mediator constructor adoption — 15 September 2026
A refusal never falls back to operation 32.
Exact requests, omitted receipt/drop, materialization, refusal without fallback and unchanged ordinary behavior are covered.
Runtime-image adoption, authenticated grant return, guarded bootstrap routes, private execution, receiver readiness, configuration/seal, client I/O, fair retirement and both full guest build generations remain open.
Mediator constructor adoption — 15 September 2026
Scratch absence cleanup, complete failed-stage retirement, grant-only handoff, retained endpoint master and all ordinary mediator start gates remain required. A refusal of operation 54 must never fall back to operation 32.
Verify the exact constructor request, omitted receipt and drop, ordinary behavior, refused construction without fallback, materialization and final cleanup.
Authenticated grant return, guarded bootstrap routes, private execution, readiness, configuration/seal, fair retirement and both complete guest build generations remain open.
Construction without child root capabilities — 15 September 2026
Native prerequisite implemented at Kernel
6d2ca19c48d3663db4b3a1eba4e9b7588b351f6fwith shared IPC7c7712057cc5d16ab16a677a886caeac54814a16. Kernel operation 54 admits only actual Process endpoint holders and constructs a Created child with exactly one primary endpoint and no root capabilities. The native TCB retains address-space backing independently. The caller receives a unique install grant, an endpoint master and only an explicitly requested MAP-only VSpace receipt. The checked request distinguishes absence from a genuine slot-zero receipt. Former-root slots are usable; actual caller windows, native capacity, occupancy and child window scope remain enforced. Rollback disposes only successful new receipts and the partial child while preserving pre-existing bindings. Ordinary operation 32 remains unchanged. Initial inventory is not a seal or a permanent ban on later explicit installation. Both isolated native VMs pass; no runnable mediator follows from this prerequisite.Procd adoption, authenticated grant return, guarded bootstrap authority, private mediator execution, readiness, configuration/seal, client I/O, fair retirement and both complete guest build generations remain open. Ordinary mediator start gates remain closed. Whole-codebase semantic authority and private-item documentation audits remain incomplete.
Staged endpoint attenuation checkpoint — 15 September 2026
The grant must cover the current rights as well as the requested result. Exact zero and repeated reduction preserve object identity, other aliases and revocation associations; restored rights, stale or foreign targets, malformed fields and started children refuse.
Authenticated grant return, independently minimal bootstrap/root authority, retained native and nested guards, private mediator execution, configuration/seal, client I/O, fair retirement and both complete guest build generations remain open.
The new diagnostic will reserve a record, transfer exactly one SEND-only copy of its explicitly supplied startup cwd to the BEGIN-reserved receipt slot, select
bin/truewithin that initial root scope, require PREPARE/Guarded and READ/Guarded, then require ABORT/Retired and a stale READ/NOT_FOUND.No ordinary start, new endpoint, root capability or implicit namespace is introduced. Launchd must retire its received directory copy after exact resolution; Loaderd must return the original staged child and grant, and Procd must retain the actual returned grant and guarded sender branch before acknowledging Guarded. Abort must retire that exact stage and retained custody. Error telemetry must preserve application refusal codes and stop ordinary output after uncertain receipt disposal. The new actual VM retains the 120-second hard and 45-second progress limits and requires its own unique marker before ordinary shell exit. Full source/effect/frame proof, configured/sealed mediator execution, real client byte I/O, native Rust/LLVM rebuilding and both full EriX builds remain required.
The actual VM passes the eleven existing admission calls followed by BEGIN/Reserved, PREPARE/Guarded, READ/Guarded, ABORT/Retired and stale READ/NOT_FOUND. It transfers exactly one SEND-only copy of the explicitly supplied initial cwd to the authenticated reservation and selects
bin/trueinside that scope. The existing private Launchd route is reused; no new endpoint, root grant or implicit namespace is introduced.Eight actual frame observations retain complete workspace mapping but incomplete 97/63/100/100 runtime/all/admission/preparation proof in both policies; the full frame gate remains required.
Complete typed mediator bootstrap, readiness/configuration/sealing, real client byte I/O, complete source/effect/frame proof, native upstream Rust/LLVM rebuilding and both full EriX build generations remain required.
Launchd uses its existing endpoint factory and retains the private configuration RECV/GRANT alias; the child receives only its existing control RECV and a guarded configuration SEND. Counted startup records and actual receipts must agree, with all temporary setup/grant disposal acknowledged before the separate private start gate.
Readiness requires actual CLAIM caller identity plus an acknowledged challenge through the retained control endpoint. Child-read-only startup mappings do not revoke Procd's trusted memory-write authority, and ordinary writable LCS1 startup mappings cannot silently stand in for this new contract. The current staged-only retirement path must gain exact running-child cleanup. A surviving child-termination owner after Procd loss remains a prerequisite: SEND lifetime revocation alone does not destroy that child, and Rootd exits after bootstrap.
Existing native guarded-preparation acceptance remains separate; full runtime lifecycle, configuration/seal, real client I/O, full frame proof, native upstream toolchain rebuilding and both full EriX build generations remain open. No whole acceptance item is added.
An install grant alone must not confer child termination authority.
Signed commit 1c80383afe1460f8d250472284225670f893937c requires exact GRANT-only final installer receipts and selects the original shared dependency graph. Procd requests MINT only on actual derivation paths. It derives the final GRANT-only receipt into the disposed VSpace receipt slot and drops its delegating source before handoff.
Lifetime now exercises 27 ordinary CPL3 grant-right controls and requires INSTALL_GRANT_RIGHTS_OK before its existing cleanup assertions. These minimal native scenarios establish neither full service-image acceptance nor a guest build.
Full coordinated consumer acceptance remains open under Kernel design 19 and phase completion.
Catalog mismatch issue 68 is corrected; this does not establish full consumer acceptance.
The final installer was handed off from VSpace scratch slot 1056 while later TTY provisioning requires managed grant slot 1040. Signed Procd 10d972b652297fd656e9a6ac6dbdf197f362c7ce in WIP PR 2 derives the exact GRANT-only result, disposes its delegating source and uniquely relocates the result back to the empty managed grant slot. Refusals preserve original-stage rollback and remaining custody. Corrected full-service VM validation and original CI remain open; bug 4 remains open.
Acceptance remains 15/460 leaves, 3.48% weighted. Full consumer lifecycle, terminal accounting, source/effect/frame proof, Pagerd, profiler attribution, native external Rust/LLVM/runtime rebuilding and both full in-EriX build generations remain required.
Procd derives exactly GRANT into disposed VSpace scratch, drops its delegating source and uniquely relocates the result into the now-empty managed grant slot before handoff. Four 291/296-unit configurations, four native builds, formatting, strict Clippy and private rustdoc pass without warnings; relocation refusal and occupied-destination controls retain original-stage cleanup.
Canonical acceptance remains 15/460 leaves, 3.48% weighted. Original-generation terminal accounting, provider/lifetime completion, source/effect/frame proof, the 128-page Pagerd gate, profiler attribution, native external Rust/LLVM/runtime rebuilding and both full EriX-in-EriX build generations remain required.
Host controls include nonzero final counters after actual reclamation and ID reuse, original observer death, pending-final-charge destruction refusal, malformed requests, wrong callers, immutable errors and lost-acknowledgement reply retry.
Actual guest instructions check repeat observations and CPU queries, exact acknowledgement and absent-acknowledgement retry; executing children require nonzero user and kernel counters after native reclamation.
Procd and Rootd consumer adoption, ordinary and mediator metric retention/consumer loss, manual updates, full service/profiler scenarios, complete authority/source/frame audits and full regression acceptance remain open under Kernel design 20. Canonical acceptance remains 3.48% weighted; 15 of 460 items. Native upstream Rust/LLVM/runtime rebuilding and both full EriX guest build generations remain mandatory and unproven.
Mediators retain only scalar counters and the original authenticated supervisor identity after disposing all capability columns; supervisor death discharges the pending scalar observation and a replacement cannot inherit it. Bug 5 remains open for actual service acceptance.
These are pending full regressions, not successful runtime acceptance.
No new canonical acceptance leaf is closed: 15/460 and 3.48% weighted. Ordinary Launchd metric-consumer restart/disposal semantics, coherent service CPU/profiler VMs, complete realm/provider authority and I/O, source/effect/frame proof, Pagerd, native external Rust/LLVM/runtime rebuilding and both full EriX-in-EriX build generations remain required.
Ordinary consumer loss/restart and final reply disposition remain audited acceptance gaps. Full service CPU/profiler VM acceptance, complete realm lifecycle and both guest build generations remain open.
Five actual service VMs pass: shell CPU accounting, exec successor replacement, two-CPU read-only inspection, out-of-session denial and guarded realm preparation.
Remaining lifecycle control/event ownership, complete native fault/cleanup acceptance and the measured startup timing failures remain open. No whole acceptance leaf closes: 15/460, weighted 3.48%. Rebuilding the external Rust/LLVM toolchain inside EriX and using it in the required full EriX guest-build generations remain mandatory and unproven.
Related records and contracts
[FEATURE] [P02.R65] Audit authority, code quality and documentation in procdto [FEATURE] Audit authority, code quality and documentation in procderikinkinen referenced this issue from erix/lib-bootstrap2026-09-15 10:04:45 +02:00
erikinkinen referenced this issue from erix/lib-interrupt2026-09-15 10:07:26 +02:00
erikinkinen referenced this issue from erix/lib-service2026-09-15 10:07:28 +02:00
erikinkinen referenced this issue from erix/lib-time2026-09-15 10:07:31 +02:00
erikinkinen referenced this issue from erix/lib-log2026-09-15 10:07:36 +02:00
erikinkinen referenced this issue2026-09-15 10:12:02 +02:00
erikinkinen referenced this issue from erix/lib-ipc2026-09-15 12:49:11 +02:00
erikinkinen referenced this issue from erix/docs2026-09-15 12:49:15 +02:00
erikinkinen referenced this issue from erix/integration2026-09-15 12:54:08 +02:00
Signals and stop requests for started jobs now check the supervisor recorded at start before applying effects or returning cached results. The change is in #56, on top of the separated process-lifecycle stack.