generated from erix/meta
[FEATURE] Audit authority, code quality and documentation in lib-capabi #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/lib-capabi#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
lib-capabithroughout Phase 6. Define native capability, rights, slot and service-intake contracts used at authority boundaries.Review each changed boundary at the final published revision. Prioritize security, reliability, then performance.
Proposed behavior and scope
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: 4 Cargo targets (1 lib, 3 test); 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.
Initial target-root inventory found no direct/shared
missing_docspolicy attests/job_broker.rs; verify and enforce it with meaningful rustdoc.The coherent IPC dependency checkpoint is signed as
984c9f7b0ca910488f8c5b035d2f0cb88f18d304, selecting IPCde6892790de69f40f749c393d24078b287b36175for Kernel issue 7. All27 strict local checks and push CI 212/PR CI 213 pass. Capability APIs and intake policy are unchanged; native rollout and full audit acceptance remain open in WIP PR #2.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
missing_docsenforcement without blanket allowances or hidden-API escapes, warning-denied private-item rustdoc and an undocumented-public-API negative gate.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.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.
Owned invocation wire and native acceptance — 15 September 2026: Signed Kernel
5f497adaefa526108a0439e0e071717dddb85334, shared IPCde968da19898bef532ddb3b5974bb9562f51dee5, capability ABIa001a26f0eb3aebec3f5fd02a28d98f1bc23f8a0and Integration9030b217c490db6ad3ec60a799cb025eccbfcdb1implement and exercise the immediate owned invocation boundary. Destination capacity and descriptive receipt capacity are independent; spare capacity acquires no authority and repeated collection cannot duplicate transfers. The real three-process CPL3 scenario passes all eight operations, full-span pointer/rights/overflow/reserved-field rejection, actual returned selectors, payload/capability/origin checks, collection after server exit and repeated receipts. A second request rejects premature relinquishment, enters draining on caller release and retires only after the exact server acknowledgment. All 162 maintained Integration helper commands pass; three prior correct concurrent-run lock refusals are retained and their sequential checks pass on unchanged executable inputs. Current full-suite acceptance remains open, as does the intermittent quota cause in Integration issue 18. Reachable backend disposal-failure coverage, broader revocation/generation-reuse scenarios, producer adoption, realm runtime, complete authority/inline-documentation audits and both full EriX-in-EriX build generations 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.
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.
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.
Actual admission dispatch, coordinated consumer VMs, runnable mediators and both full builds inside EriX remain separate open acceptance requirements.
Tracking and rollout
All four local configurations pass 192 tests each; all 33 required checks pass without warnings. Review remains WIP; this dependency checkpoint adds no native runtime acceptance.
Each of the four default/all-feature development/release selections passes 192 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.
Mediator slot documentation now describes absent child root capabilities, guarded RECV attenuation before execution and exactly-GRANT staged custody.
Native mediator execution, coordinated runtime acceptance and full guest builds remain open.
Detailed scope and contracts
Construction without child root capabilities — 15 September 2026
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.
Staged endpoint attenuation checkpoint — 15 September 2026
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.
Actual binding, descendant stopping, safe reclamation, coherent consumer adoption and CPL3 evidence remain open in Kernel #19.
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.
Runtime acceptance remains open; phase completion retains native upstream toolchain rebuilding and both EriX guest generations.
Original native stream event times — 30 September 2026
Alias creation, metadata queries, empty or refused operations and terminal device progress do not query a historical clock.
Ttyd receives an exact authenticated SEND-only Timed endpoint for this source purpose; Launchd uses its already admitted endpoint. Clean refusal remains Unknown.
The seeded boundary control retains the whole original object and proves the intended no-clock refusal contract when executed; no runtime reproduction or practical path to 2^64 bytes is claimed.
They cover source-event independence, unknown evidence, full-range dates, malformed replies, receipt cleanup, exact SEND-only admission, alias/retirement/reuse and overflow refusal. The existing realm workload now requires successful inherited fstat and original PTY clock evidence with stable birth before and after realm retirement; its independent transcript remains 385 calls.
The full status/directory feature remains open for complete FAT metadata and whole-feature integration. Both full EriX guest build generations and external Rust/LLVM rebuilding inside EriX remain required and unperformed.
Related records and contracts
[FEATURE] [P02.R32] Audit authority, code quality and documentation in lib-capabito [FEATURE] Audit authority, code quality and documentation in lib-capabierikinkinen referenced this issue from erix/integration2026-09-19 23:04:20 +02:00
The capability ABI now pins LibIPC
61b43723in 1cbb0db9. This is part of the Vfsd dependency repair; the existing interfaces are unchanged, and Integration consumer adoption is in progress.