[FEATURE] Audit authority, code quality and documentation in lib-bootstrap #1

Open
opened 2026-09-12 07:57:41 +02:00 by erikinkinen · 1 comment
Owner

Problem and motivation

Audit lib-bootstrap throughout Phase 6. Define and validate bootstrap byte contracts, role startup records and payloads shared by rootd and launched services.

Review each changed boundary at the final published revision. Prioritize security, reliability, then performance.

Proposed behavior and scope

Current inventory: 1 Cargo target (1 lib); manifests: Cargo.toml. Include explicit and automatically discovered targets, supported features and target-specific configurations.

Trace authority-bearing inputs through callers and public APIs. Confirm that the library acquires no service, hardware or host authority implicitly. Review startup, teardown and Rootd parity at the caller boundary when this crate owns no process, and justify each applicability decision.

Authority, security and reliability

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
  • 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_docs enforcement 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.

The observed push CI run is successful; complete log classification and a review-triggered run remain required.

Process-bound native acceptance — 15 September 2026: The signed helper checkpoint now passes both push and review CIs with complete warning-free logs. Component acceptance does not close complete realm or guest-build work.

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.

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.

Native producer/consumer migration, matching VM execution and full guest builds remain separate acceptance gates.

Runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements.

Returned-grant shared contract checkpoint — 18 September 2026: Signed revision 5d18cece2f79fc47525ede8082b28327ae08a066 is pushed. The coherent immutable dependency graph adopts the checked returned-grant bootstrap contract. Local runtime policy is unchanged. Default/all-feature development and release units, strict host/native Clippy, native builds and private-item rustdoc pass. Formatting and Markdown checks pass. Original CI 143 and CI 144 passes; all four terminal logs are complete (65,538 bytes), without warnings. Runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements.

Runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements.

Runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements.

Runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements.

Runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements.

Caller-bound realm admission and retained storage contract — 18 September 2026

Use distinct Launchd operations BEGIN_REALM 0x6D0, PREPARE_REALM 0x6D1,
ABORT_REALM 0x6D2 and READ_REALM 0x6D3. The existing 0x6B0–0x6BF range belongs
to filesystem providers and is not reused. Little-endian bodies are exact, with
nonzero request correlation and no fallback to ordinary launch transactions.

BEGIN_REALM is an authority-free 8-byte request (request ID, operation). Derive
session, authority realm, original process/generation and Running job from the
actual native pending caller. Reserve an independently budgeted realm record,
a nonwrapping generation and one disjoint executable-scope receipt slot before
replying. Client numeric identities or a bearer sender cannot select ownership.

PREPARE_REALM has a 32-byte prefix: request ID and operation (u32), realm record
ID and generation (u64 each), and selector byte length (u64), followed by exactly
that nonempty UTF-8 selector without NUL. Parsing adds no pathname or packet-size
ceiling. The request carries exactly one actual SEND-only directory endpoint to
the reserved receipt slot. Verify the original caller/job/session/authority realm
again and retire every unretained received capability on refusal. Resolve only
inside this explicit directory, authenticate the exact executable and manifest,
and call Loaderd's existing private PREPARE_REALM. Never imply a Posixd pathname,
Named route, root, cwd, TTY stream, ordinary job or public PreparedProcess input.

ABORT_REALM and READ_REALM are authority-free 24-byte requests: request ID,
operation and complete realm-record ID/generation. They require the same original
Running native owner. READ observes retained state only; ABORT must complete
independent source, invocation and exact-child retirement before its successful
acknowledgment. Parent terminality initiates the same retained cleanup internally.

All four operations have an exact 40-byte capability-free response: request ID,
operation, raw result and state (u32 each), record ID and generation (u64 each),
receipt slot and zero reserved word (u32 each). States are Unconfirmed=0,
Reserved=1, Preparing=2, Guarded=3, Retiring=4 and Retired=5. Success at BEGIN
requires Reserved, a nonzero complete handle and receipt slot. PREPARE success
requires Guarded; ABORT success requires Retired. READ returns an authenticated
nonzero state. Only successful BEGIN returns a receipt slot; every other result
has zero there. Failure always has Unconfirmed state; failed BEGIN has a zero
handle while other failures echo the original complete request handle. Unknown
nonzero result codes remain full-width. Unconfirmed proves no resource absence.
Correlate the complete response with the original request before using evidence.

Replace obsolete LCH1 v2 with exact 72-byte version3 startup policy. Preserve the
first 68-byte field order and append realm_capacity (u32 at offset68). Require an
explicit deployment value: zero disables new realm reservations, and nonzero
values allocate that many retained records and disjoint receipt slots. Validate
checked job-route + stream-route + realm-receipt arithmetic before leaving any
ordinary transaction receipt storage. No default or incidental fixed array sets
realm count. Coordinate shared startup codecs, Rootd payloads, Launchd arena and
Integration policy/packaging; old version/width must reject. Extend the native
capacity descriptor with the realm record's size/alignment and a new layout
version; do not assume ordinary reply records survive long enough for realms.

Keep original child, local scope/grant obligations and native invocation owners
independent. Actual scheduler progress must exclude ordinary and indirect blocking
peer calls while any native invocation needs progress. A permanently discharged
source slot is never revisited after reuse. Native release precedes ordinary
exact-child abort; preserve first errors and exhaust independent cleanup without
returning uncertain state to normal operation. Guarded staging remains private
and unstarted, without exported SEND or a Running job. This initial admission
interface does not define configuration, readiness, sealing or publication.

Coordinated host negatives, strict source-bound build matrices and real consumer
VM execution are required. Two mediator processes, two clients per realm with
actual mediated I/O, complete fair progress, source/effect/frame admission and
both full builds inside EriX remain separate open acceptance requirements.

Coordinated Rootd and Integration adoption remains required before image acceptance. Actual admission dispatch, coordinated consumer VMs, runnable mediators and both full builds inside EriX remain separate open acceptance requirements.

Tracking and rollout

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.

Each of the four default/all-feature development/release selections passes 80 tests/doctests. Formatting, strict host/native Clippy, warning-denied builds, private rustdoc, Markdown and exact original dependency checks pass with zero warnings.

Actual running mediator readiness/retirement, complete service-image acceptance, configuration/seal, client I/O and both required guest rebuilds remain open.

Tracking: owning issue, WIP PR and Phase 6 acceptance.

Native mediator execution, coordinated runtime acceptance and full guest builds remain open.

Detailed scope and contracts

Runtime dependency alignment — 15 September 2026

Coherent product catalog adoption and product VM acceptance remain pending.

Validated mediator constructor adoption — 15 September 2026

A refusal never falls back to operation 32.

The existing shared graph follows signed IPC 7c771205 and applicable capability ABI 2d6b1283 through original Git objects; no dependency or helper authority is added.

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.

Coordinated actual consumers and matching native execution remain open under Kernel design 19. This dependency/wire checkpoint does not establish complete lifecycle acceptance or either full EriX build generation.

No local API or capability policy changes. Actual service consumer and coherent full VM adoption remain open in phase completion.

Original native stream identities — 30 September 2026

Ordinary namespace and executable routes cannot allocate one.

Original event times remain Unknown; this scalar metadata cannot turn an incomplete observation into successful compatibility status.

They cover literal wire rejection, atomic encoding, administrator isolation, lost-delivery allocation, binding refusal, exhaustion, directional lifetime, teardown/reuse, original ownership, malformed observations and receipt cleanup.

The full status/directory feature remains open for original native event-time capture, complete FAT metadata and whole-feature integration. Both full EriX guest build generations and external Rust/LLVM rebuilding inside EriX remain required and unperformed.

Counted retained program display — ownership and deployment design, 1 October 2026

Remove Launchd's fixed program display array while retaining independently
Vfsd-authenticated entry identity and native executable/manifest custody. No
selector, argv label, digest rendering or later pathname reopening may substitute
for the original complete program bytes.

Executable reply validation borrows the complete raw entry from the authenticated
reply after checking the native SEND receipt and entry digest. Ordinary preparation
copies it into the front of its existing caller-owned authentication scratch before
reusing transport storage; the remaining exact scratch range receives the manifest.
Private realm/client preparation continues to request digest-only evidence. No
file SEND is retained merely to keep display bytes alive.

A separate caller-supplied job-program byte arena owns display after authentication.
Each occupied generational job stores a checked offset/length, without a per-job
partition or pathname limit. Policy binding checks shape, original entry digest
and full remaining capacity before publishing either policy or display. Compaction
updates live offsets and clears released tail bytes. Stale handles cannot read or
retire a replacement. Successor adoption transfers the candidate range to the stable
job, retires the predecessor range exactly once and clears the candidate owner.
Terminal release retires bytes after the original native cleanup checks. Delayed
and runtime prompts borrow only the original job's range and retain existing
process, transaction, session and generation binding.

Deployment explicitly budgets job_program_bytes independently of transaction,
manifest and job-record counts. LCH1 V6 appends a positive u64 byte capacity at
offset 96 and has exact size 104; obsolete V5 is rejected without a default. The
Launchd target capacity descriptor advances to version 9, retaining its existing
type-layout words and adding this byte region in the same allocation order used
by Integration. LibBootstrap, Rootd, Launchd and Integration producers/consumers,
profiles, command-line forwarding and authored fixtures migrate together. Existing
capability-slot policy and authority ceilings do not change. The separately pinned
Rootd compiled helper remains unchanged.

Author long/raw entry, exact capacity, scratch reuse, compaction, stale generation,
successor transfer, delayed prompt and cleanup controls, plus literal startup and
image geometry cases. Keep original failure precedence and uncertain cleanup.
Update component contracts and manual TeX. Tests, builds, checks, generated manuals,
VM/profiler execution and CI observation remain deferred by request. The containing
native migration and full guest/toolchain builds remain open until actually handled.

Native SEND and entry-digest
validation return a borrowed complete raw label; ordinary preparation copies it
before transport reuse and admits the sidecar in the remaining exact scratch. Labels create no capability or replacement authority.

Seven new controls cover long raw preparation, reused caller scratch, original
job ownership, capacity/identity refusal, compaction, stale generations, successor
transfer, literal startup geometry and missing/unaddressable budgets.

The containing native migration remains open for remaining provider/name adapters,
complete cross-provider lifetime/refusal controls and coherent runtime catalog
adoption. Existing broad acceptance remains unchanged. Full EriX guest build
generations, external Rust/LLVM rebuilding inside EriX and profiler evidence remain
required and unperformed.

Related records and contracts
Repository Links
docs issue 1, PR 4
exsh PR 3
integration issue 101, issue 2, PR 12
kernel issue 20
launchd issue 1, PR 2
lib-ipc PR 2, stream-metadata.md
powerboxd PR 2
rootd PR 2
ttyd PR 3
vfsd PR 3
## Problem and motivation Audit `lib-bootstrap` throughout Phase 6. Define and validate bootstrap byte contracts, role startup records and payloads shared by rootd and launched services. Review each changed boundary at the final published revision. Prioritize security, reliability, then performance. ## Proposed behavior and scope Current inventory: 1 Cargo target (1 lib); manifests: `Cargo.toml`. Include explicit and automatically discovered targets, supported features and target-specific configurations. Trace authority-bearing inputs through callers and public APIs. Confirm that the library acquires no service, hardware or host authority implicitly. Review startup, teardown and Rootd parity at the caller boundary when this crate owns no process, and justify each applicability decision. ## Authority, security and reliability 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 <details> <summary>Checklist</summary> - [ ] 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](https://git.erikinkinen.fi/erix/integration/issues/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_docs` enforcement 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. </details> ## 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. The observed push CI run is successful; complete log classification and a review-triggered run remain required. Process-bound native acceptance — 15 September 2026: The signed helper checkpoint now passes both push and review CIs with complete warning-free logs. Component acceptance does not close complete realm or guest-build work. 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. 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. Native producer/consumer migration, matching VM execution and full guest builds remain separate acceptance gates. Runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements. Returned-grant shared contract checkpoint — 18 September 2026: Signed revision `5d18cece2f79fc47525ede8082b28327ae08a066` is pushed. The coherent immutable dependency graph adopts the checked returned-grant bootstrap contract. Local runtime policy is unchanged. Default/all-feature development and release units, strict host/native Clippy, native builds and private-item rustdoc pass. Formatting and Markdown checks pass. Original [CI 143](https://git.erikinkinen.fi/erix/lib-bootstrap/actions/runs/143) and [CI 144](https://git.erikinkinen.fi/erix/lib-bootstrap/actions/runs/144) passes; all four terminal logs are complete (65,538 bytes), without warnings. Runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements. Runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements. Runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements. Runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements. Runnable mediator bootstrap, fair retirement and both complete builds inside EriX remain separate open acceptance requirements. Caller-bound realm admission and retained storage contract — 18 September 2026 Use distinct Launchd operations BEGIN_REALM 0x6D0, PREPARE_REALM 0x6D1, ABORT_REALM 0x6D2 and READ_REALM 0x6D3. The existing 0x6B0–0x6BF range belongs to filesystem providers and is not reused. Little-endian bodies are exact, with nonzero request correlation and no fallback to ordinary launch transactions. BEGIN_REALM is an authority-free 8-byte request (request ID, operation). Derive session, authority realm, original process/generation and Running job from the actual native pending caller. Reserve an independently budgeted realm record, a nonwrapping generation and one disjoint executable-scope receipt slot before replying. Client numeric identities or a bearer sender cannot select ownership. PREPARE_REALM has a 32-byte prefix: request ID and operation (u32), realm record ID and generation (u64 each), and selector byte length (u64), followed by exactly that nonempty UTF-8 selector without NUL. Parsing adds no pathname or packet-size ceiling. The request carries exactly one actual SEND-only directory endpoint to the reserved receipt slot. Verify the original caller/job/session/authority realm again and retire every unretained received capability on refusal. Resolve only inside this explicit directory, authenticate the exact executable and manifest, and call Loaderd's existing private PREPARE_REALM. Never imply a Posixd pathname, Named route, root, cwd, TTY stream, ordinary job or public PreparedProcess input. ABORT_REALM and READ_REALM are authority-free 24-byte requests: request ID, operation and complete realm-record ID/generation. They require the same original Running native owner. READ observes retained state only; ABORT must complete independent source, invocation and exact-child retirement before its successful acknowledgment. Parent terminality initiates the same retained cleanup internally. All four operations have an exact 40-byte capability-free response: request ID, operation, raw result and state (u32 each), record ID and generation (u64 each), receipt slot and zero reserved word (u32 each). States are Unconfirmed=0, Reserved=1, Preparing=2, Guarded=3, Retiring=4 and Retired=5. Success at BEGIN requires Reserved, a nonzero complete handle and receipt slot. PREPARE success requires Guarded; ABORT success requires Retired. READ returns an authenticated nonzero state. Only successful BEGIN returns a receipt slot; every other result has zero there. Failure always has Unconfirmed state; failed BEGIN has a zero handle while other failures echo the original complete request handle. Unknown nonzero result codes remain full-width. Unconfirmed proves no resource absence. Correlate the complete response with the original request before using evidence. Replace obsolete LCH1 v2 with exact 72-byte version3 startup policy. Preserve the first 68-byte field order and append realm_capacity (u32 at offset68). Require an explicit deployment value: zero disables new realm reservations, and nonzero values allocate that many retained records and disjoint receipt slots. Validate checked job-route + stream-route + realm-receipt arithmetic before leaving any ordinary transaction receipt storage. No default or incidental fixed array sets realm count. Coordinate shared startup codecs, Rootd payloads, Launchd arena and Integration policy/packaging; old version/width must reject. Extend the native capacity descriptor with the realm record's size/alignment and a new layout version; do not assume ordinary reply records survive long enough for realms. Keep original child, local scope/grant obligations and native invocation owners independent. Actual scheduler progress must exclude ordinary and indirect blocking peer calls while any native invocation needs progress. A permanently discharged source slot is never revisited after reuse. Native release precedes ordinary exact-child abort; preserve first errors and exhaust independent cleanup without returning uncertain state to normal operation. Guarded staging remains private and unstarted, without exported SEND or a Running job. This initial admission interface does not define configuration, readiness, sealing or publication. Coordinated host negatives, strict source-bound build matrices and real consumer VM execution are required. Two mediator processes, two clients per realm with actual mediated I/O, complete fair progress, source/effect/frame admission and both full builds inside EriX remain separate open acceptance requirements. Coordinated Rootd and Integration adoption remains required before image acceptance. Actual admission dispatch, coordinated consumer VMs, runnable mediators and both full builds inside EriX remain separate open acceptance requirements. ## Tracking and rollout Complete client admission/lifecycle design — 25 September 2026: the [shared codec design](https://git.erikinkinen.fi/erix/lib-ipc/issues/1) 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. Each of the four default/all-feature development/release selections passes 80 tests/doctests. Formatting, strict host/native Clippy, warning-denied builds, private rustdoc, Markdown and exact original dependency checks pass with zero warnings. Actual running mediator readiness/retirement, complete service-image acceptance, configuration/seal, client I/O and both required guest rebuilds remain open. Tracking: [owning issue](https://git.erikinkinen.fi/erix/lib-bootstrap/issues/1), [WIP PR](https://git.erikinkinen.fi/erix/lib-bootstrap/pulls/2) and [Phase 6 acceptance](https://git.erikinkinen.fi/erix/integration/issues/65). Native mediator execution, coordinated runtime acceptance and full guest builds remain open. <details> <summary>Detailed scope and contracts</summary> ### Runtime dependency alignment — 15 September 2026 Coherent product catalog adoption and product VM acceptance remain pending. ### Validated mediator constructor adoption — 15 September 2026 A refusal never falls back to operation 32. The existing shared graph follows signed IPC 7c771205 and applicable capability ABI 2d6b1283 through original Git objects; no dependency or helper authority is added. 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. Coordinated actual consumers and matching native execution remain open under [Kernel design 19](https://git.erikinkinen.fi/erix/kernel/issues/19). This dependency/wire checkpoint does not establish complete lifecycle acceptance or either full EriX build generation. No local API or capability policy changes. Actual service consumer and coherent full VM adoption remain open in [phase completion](https://git.erikinkinen.fi/erix/integration/issues/65). ### Original native stream identities — 30 September 2026 Ordinary namespace and executable routes cannot allocate one. Original event times remain Unknown; this scalar metadata cannot turn an incomplete observation into successful compatibility status. They cover literal wire rejection, atomic encoding, administrator isolation, lost-delivery allocation, binding refusal, exhaustion, directional lifetime, teardown/reuse, original ownership, malformed observations and receipt cleanup. The [full status/directory feature](https://git.erikinkinen.fi/erix/posixd/issues/25) remains open for original native event-time capture, complete FAT metadata and whole-feature integration. Both full EriX guest build generations and external Rust/LLVM rebuilding inside EriX remain required and unperformed. ### Counted retained program display — ownership and deployment design, 1 October 2026 Remove Launchd's fixed program display array while retaining independently Vfsd-authenticated entry identity and native executable/manifest custody. No selector, argv label, digest rendering or later pathname reopening may substitute for the original complete program bytes. Executable reply validation borrows the complete raw entry from the authenticated reply after checking the native SEND receipt and entry digest. Ordinary preparation copies it into the front of its existing caller-owned authentication scratch before reusing transport storage; the remaining exact scratch range receives the manifest. Private realm/client preparation continues to request digest-only evidence. No file SEND is retained merely to keep display bytes alive. A separate caller-supplied job-program byte arena owns display after authentication. Each occupied generational job stores a checked offset/length, without a per-job partition or pathname limit. Policy binding checks shape, original entry digest and full remaining capacity before publishing either policy or display. Compaction updates live offsets and clears released tail bytes. Stale handles cannot read or retire a replacement. Successor adoption transfers the candidate range to the stable job, retires the predecessor range exactly once and clears the candidate owner. Terminal release retires bytes after the original native cleanup checks. Delayed and runtime prompts borrow only the original job's range and retain existing process, transaction, session and generation binding. Deployment explicitly budgets job_program_bytes independently of transaction, manifest and job-record counts. LCH1 V6 appends a positive u64 byte capacity at offset 96 and has exact size 104; obsolete V5 is rejected without a default. The Launchd target capacity descriptor advances to version 9, retaining its existing type-layout words and adding this byte region in the same allocation order used by Integration. LibBootstrap, Rootd, Launchd and Integration producers/consumers, profiles, command-line forwarding and authored fixtures migrate together. Existing capability-slot policy and authority ceilings do not change. The separately pinned Rootd compiled helper remains unchanged. Author long/raw entry, exact capacity, scratch reuse, compaction, stale generation, successor transfer, delayed prompt and cleanup controls, plus literal startup and image geometry cases. Keep original failure precedence and uncertain cleanup. Update component contracts and manual TeX. Tests, builds, checks, generated manuals, VM/profiler execution and CI observation remain deferred by request. The containing native migration and full guest/toolchain builds remain open until actually handled. Native SEND and entry-digest validation return a borrowed complete raw label; ordinary preparation copies it before transport reuse and admits the sidecar in the remaining exact scratch. Labels create no capability or replacement authority. Seven new controls cover long raw preparation, reused caller scratch, original job ownership, capacity/identity refusal, compaction, stale generations, successor transfer, literal startup geometry and missing/unaddressable budgets. The containing native migration remains open for remaining provider/name adapters, complete cross-provider lifetime/refusal controls and coherent runtime catalog adoption. Existing broad acceptance remains unchanged. Full EriX guest build generations, external Rust/LLVM rebuilding inside EriX and profiler evidence remain required and unperformed. </details> <details> <summary>Related records and contracts</summary> | Repository | Links | | --- | --- | | docs | [issue 1](https://git.erikinkinen.fi/erix/docs/issues/1), [PR 4](https://git.erikinkinen.fi/erix/docs/pulls/4) | | exsh | [PR 3](https://git.erikinkinen.fi/erix/exsh/pulls/3) | | integration | [issue 101](https://git.erikinkinen.fi/erix/integration/issues/101), [issue 2](https://git.erikinkinen.fi/erix/integration/issues/2), [PR 12](https://git.erikinkinen.fi/erix/integration/pulls/12) | | kernel | [issue 20](https://git.erikinkinen.fi/erix/kernel/issues/20) | | launchd | [issue 1](https://git.erikinkinen.fi/erix/launchd/issues/1), [PR 2](https://git.erikinkinen.fi/erix/launchd/pulls/2) | | lib-ipc | [PR 2](https://git.erikinkinen.fi/erix/lib-ipc/pulls/2), [stream-metadata.md](https://git.erikinkinen.fi/erix/lib-ipc/src/branch/feature/posix-compat/docs/stream-metadata.md) | | powerboxd | [PR 2](https://git.erikinkinen.fi/erix/powerboxd/pulls/2) | | rootd | [PR 2](https://git.erikinkinen.fi/erix/rootd/pulls/2) | | ttyd | [PR 3](https://git.erikinkinen.fi/erix/ttyd/pulls/3) | | vfsd | [PR 3](https://git.erikinkinen.fi/erix/vfsd/pulls/3) | </details>
erikinkinen changed title from [FEATURE] [P02.R31] Audit authority, code quality and documentation in lib-bootstrap to [FEATURE] Audit authority, code quality and documentation in lib-bootstrap 2026-09-12 08:02:23 +02:00
Author
Owner

The bootstrap library now pins LibIPC 61b43723 in 8b56d050. Bootstrap also selects the matching LibCapABI revision. This is part of the Vfsd dependency repair; the existing interfaces are unchanged, and Integration consumer adoption is in progress.

The bootstrap library now pins LibIPC `61b43723` in [8b56d050](https://git.erikinkinen.fi/erix/lib-bootstrap/commit/8b56d0506179cd3ab21ae52a2c200bdf0aafc6e4). Bootstrap also selects the matching LibCapABI revision. This is part of the [Vfsd dependency repair](https://git.erikinkinen.fi/erix/vfsd/issues/34); the existing interfaces are unchanged, and Integration consumer adoption is in progress.
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:35 +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/lib-bootstrap#1
No description provided.