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

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

Problem and motivation

Audit lib-time throughout Phase 6. Define time formats, checked conversions and time-service contracts without implicit clock authority.

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 0abe15305754fcfc463febbfd43ed85ae820253c 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 41 and CI 42 passes; all four terminal logs are complete (58,655 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.

Actual admission dispatch, coordinated consumer VMs, runnable mediators and both full builds inside EriX remain separate open acceptance requirements.

Tracking and rollout

Coordinated native consumer acceptance remains separate in PR2.

Each of the four default/all-feature development/release selections passes 23 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.

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.

Related records and contracts
Repository Links
docs issue 1
integration issue 2
kernel issue 20
## Problem and motivation Audit `lib-time` throughout Phase 6. Define time formats, checked conversions and time-service contracts without implicit clock authority. 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 `0abe15305754fcfc463febbfd43ed85ae820253c` 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 41](https://git.erikinkinen.fi/erix/lib-time/actions/runs/41) and [CI 42](https://git.erikinkinen.fi/erix/lib-time/actions/runs/42) passes; all four terminal logs are complete (58,655 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. Actual admission dispatch, coordinated consumer VMs, runnable mediators and both full builds inside EriX remain separate open acceptance requirements. ## Tracking and rollout Coordinated native consumer acceptance remains separate in [PR2](https://git.erikinkinen.fi/erix/lib-time/pulls/2). Each of the four default/all-feature development/release selections passes 23 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-time/issues/1), [WIP PR](https://git.erikinkinen.fi/erix/lib-time/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. ### 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). <details> <summary>Related records and contracts</summary> | Repository | Links | | --- | --- | | docs | [issue 1](https://git.erikinkinen.fi/erix/docs/issues/1) | | integration | [issue 2](https://git.erikinkinen.fi/erix/integration/issues/2) | | kernel | [issue 20](https://git.erikinkinen.fi/erix/kernel/issues/20) | </details>
erikinkinen changed title from [FEATURE] [P02.R54] Audit authority, code quality and documentation in lib-time to [FEATURE] Audit authority, code quality and documentation in lib-time 2026-09-12 08:02:33 +02:00
Author
Owner

The clock client now pins LibIPC 61b43723 in 61366c28. This is part of the Vfsd dependency repair; the existing interfaces are unchanged, and Integration consumer adoption is in progress.

The clock client now pins LibIPC `61b43723` in [61366c28](https://git.erikinkinen.fi/erix/lib-time/commit/61366c283cd4bd235dc8e9626c6f0b575797f3db). 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:59 +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-time#1
No description provided.