[FEATURE] Audit authority, code quality and documentation in coreutils #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/coreutils#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
coreutilsthroughout Phase 6. Implement native utility applets and their per-operation authority policy over explicit launch and stream grants.Review each changed boundary at the final published revision. Prioritize security, reliability, then performance.
Proposed behavior and scope
Current inventory: 2 Cargo targets (1 bin, 1 lib); 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.
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.
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
9a6f84afa0a450c157bc28293e367f9e00132c3fpasses CI 55 and CI 54. Coherent catalog publication, actual consumer VMs and full guest-build acceptance remain separate open requirements.Tracking and rollout
All 39 maintained local checks pass: development/release feature matrices (145, 146 unit tests per selection), strict host/native Clippy, warning-denied builds, private rustdoc, applicable doctests and component-specific checks, formatting and exact dependency-source validation. Native binaries have executable read-only entry pages and no writable executable pages. Original CI62 and CI63 pass; their complete logs are independently reviewed with zero warnings. No unchanged CI was rerun. Coordinated VM configuration/seal/four-client I/O, repeated managed-row reuse, profiler observation and both full builds inside EriX remain open under the phase checklist. This dependency work earns no separate feature-completion credit.
Counted private startup dependency adoption — 24 September 2026.
These host/build results do not establish actual running mediator readiness or retirement, a complete service-image pass, configuration/seal, client I/O, or either required guest rebuild.
Tracking: owning issue, WIP PR and Phase 6 acceptance.
Detailed scope and contracts
Command and boot dependency alignment — 15 September 2026
The product catalog, product VM acceptance and guest build remain pending.
Full catalog equality and actual consumer-image validation remain required under Integration regression 68. This dependency checkpoint does not close full lifecycle, frame or self-hosting acceptance.
Full service CPU/profiler VM acceptance and guest builds remain open in Phase 6 completion.
Counted endpoint-selected exact mutation
Replace the fixed 252-byte public VfsExactMutationRequestV1 with borrowed
VfsExactMutationRequestV2. Its 24-byte prefix contains request ID and the existing
exact operation at offsets 0/4, explicit version 2 at offset 8, reserved zero at
12 and the complete u64 destination-byte length at 16. Rename alone supplies one
raw basename after offset 24; other admitted effects have an empty tail. Empty,
NUL, slash and dot rename components refuse. Checked full extent and actual
caller/transport storage replace the fixed width and UTF-8 restriction. The
version/reserved fields distinguish valid old requests, including two-byte old
rename names, without fallback or retaining the deprecated public API.
The exact endpoint still supplies the original immutable operation and entry;
no source, parent, namespace, handle selector, new endpoint or capability is
introduced. Vfsd admits complete status capacity before provider effects and
passes the borrowed destination through the original retained owner. Existing
one-use/definite-refusal/uncertain-effect consumption and original cleanup rules
remain authoritative. Neither larger names nor descriptive status grant rights.
Migrate LibIPC, Vfsd dispatch and Coreutils source callers and controls in one
signed source graph. Coreutils uses actual encoded length and a single call;
wrong correlation, unknown status, malformed/lost replies or unexpected authority
never trigger effect replay. Retire all unwanted receipts before refusal and
preserve uncertain cleanup classification. Share the exact status-call framing,
receipt retirement and scratch clearing with existing truncation instead of
adding another transport copy. Preserve the caller's original endpoint ownership.
Author literal V2 byte layout, complete raw names, short/surplus tails, version
and reserved separation, bad shape, output canaries, operation ceilings, short
status preflight, original-provider binding/cleanup and real transport controls.
Update component contracts and maintained manual TeX. Tests/builds/checks,
generated documents, VM/profiler execution and CI observation remain deferred.
Both direct compiled IPC selectors in adopting consumers use the new immutable
revision; runtime catalogs and compiled Rootd helpers remain unchanged pending
coherent runtime adoption. Legacy directory/consumer frames and complete
cross-provider/self-hosting acceptance remain open.
Tracking: codec audit/design,
native ownership,
Coreutils audit,
Phase 6 tracker.
Review: LibIPC PR2,
Vfsd PR3,
Coreutils PR2,
Docs PR4.
The original ENUMERATE
endpoint owns cursor tokens bound to its scope generation; names and tokens
grant no native authority. Old exact generic frames refuse without fallback.
Refusals release the reservation; equal native positions
reuse their token. Different owners and replacement generations cannot inherit
old tokens. Caller names stay unchanged on refusal.
Remaining compatibility/legacy namespace lifetime, complete
cross-provider refusal/restart controls and coherent runtime adoption stay open. Full EriX guest
generations and external Rust/LLVM rebuilding inside EriX remain required and
unperformed; no executed pass or measured speedup is claimed.
Counted endpoint-selected directory enumeration
Replace the exact-endpoint use of fixed public readdir frames with dedicated
VfsExactReadDirectoryRequestV2 and VfsExactReadDirectoryResponseV2. The 32-byte
request has correlation/op at 0/4, version 2/reserved zero at 8/12, the original
endpoint-local cursor at 16 and u64 name capacity at 24. There is no public
handle, provider, candidate or namespace selector. The original ENUMERATE
endpoint remains the sole authority. Old 24-byte requests refuse on this route;
generic namespace/provider V1 contracts remain until their live users migrate.
The response has a 56-byte prefix: correlation/op at 0/4, version 2 at 8,
known result at 12, next token at 16, node kind/end flag at 24/28, observed size
at 32, complete u64 name length at 40 and reserved zero at 48. One complete raw
name follows. End and refusal have no entry, zero metadata and no name bytes;
refusal preserves the request token. A successful entry has a known kind and
a distinct nonzero token. Check the complete shape, original correlation and
offered capacity before publishing any caller-visible name or cursor.
Vfsd retains counted full native cursor state and reserves a position before
observation. Preserve native mount composition, original metadata identity and
known-size checks, original candidate retirement and equal-position reuse.
Admit complete response/name storage before publishing the reserved position;
short capacity, malformed input, provider refusal and stale identity release
the reservation without advancing the original token. Complete raw names replace
the fixed 240-byte copy. Preserve original owner retirement and generation
isolation. No path reopening, hidden fallback or name-derived authority.
Coreutils advertises the minimum of actual caller name storage and actual IPC
reply capacity, submits one call to the original endpoint, retires unexpected
receipts, validates all framing/correlation and only then copies complete names.
Erase message scratch on every return; failed admission leaves caller names
unchanged. Keep lease ownership and existing utility cursor behavior unchanged.
Use shared explicit call/disposal effects and independent reply fixtures.
Author literal codec, actual provider/position/metadata, transport cleanup and
long raw utility-listing controls. Update inline/component/manual contracts and
publish signed source with both IPC selectors in Vfsd/Coreutils coordinated.
Runtime catalogs and compiled Rootd helpers remain unchanged. Tests/builds/checks,
generated references, VM/profiler execution and CI observation remain deferred.
Complete cross-provider lifetime/restart and guest self-hosting remain open.
Tracking: codec design,
native ownership,
Coreutils audit,
Phase 6 tracker.
Related records and contracts
[FEATURE] [P02.R04] Audit authority, code quality and documentation in coreutilsto [FEATURE] Audit authority, code quality and documentation in coreutilserikinkinen referenced this issue from erix/lib-ipc2026-10-01 22:56:31 +02:00
erikinkinen referenced this issue from erix/vfsd2026-10-01 22:56:32 +02:00
erikinkinen referenced this issue from erix/docs2026-10-01 22:56:34 +02:00
erikinkinen referenced this issue from erix/integration2026-10-01 22:56:37 +02:00