[FEATURE] Audit authority, code quality and documentation in vfsd #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/vfsd#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
vfsdthroughout Phase 6. Mediate mount namespaces and exact filesystem-object grants without letting descriptive paths authorize operations.Review each changed boundary at the final published revision. Prioritize security, reliability, then performance.
Proposed behavior and scope
Directory cleanup after handoff — 29 September 2026: signed lib-ipc
b0b42939, vfsd8f34a3e2and launchd79bcc9d4add cap-free retirement through Launchd's held private resolver after the operation SEND alias is discarded. The digest includes a non-reused object identity; plain cwd and inherited descendants are ineligible, and stale requests cannot select reused records.Launchd requires exact reply identity, matching header/body status and provider OK or NOT_FOUND. Transport absence does not prove provider disposal. Every injected receipt is retired independently. lib-bootstrap
b00c8732and lib-time49b5e713align immutable dependencies; docs1c13c2e8updates the manual. Fourteen codec, provider and transport regressions are authored but unrun. Formatting was applied; tests, builds, lint checks, manual builds and CI observation remain deferred by the user, with no pass claimed.This completes a cleanup prerequisite. Authenticated public source preparation, counted original-source custody, seal handoff, dedicated recipient stream views and coordinated image adoption remain unfinished. The published Posixd consumer and Vfsd close barrier remain part of the binding contract. Completion stays 15.53%, 18/460 parents and 421/884 sub-items; no additional acceptance credit is assigned to this checkpoint. Both full EriX build generations and rebuilding Rust/LLVM inside EriX remain unproved. See directory ownership, binding design, Launchd review, Vfsd review and master completion.
Eight regression tests are authored but unrun, including real directory pins, parent preservation, either provider-close failure, terminal-caller loss and receiver-disposal failure. The exact runtime is extracted into a focused module; changed code files remain below 1,000 lines. Formatting was applied. Tests, builds, lint checks, VM runs, manual builds and CI observation remain deferred by the user. The source-confirmed close-ordering defect uses the bug-report template and is implementation-closed under that testing waiver, with no runtime pass claimed.
Actual Launchd source preparation and delivery, Posixd retained provider callers and local alias disposal, Rootd/Integration publication and coordinated dependency selection remain unfinished. The image catalog still selects its earlier graph. Full binding acceptance remains open; recalculated accounting stays 15.53%, 18/460 parents and 421/884 sub-items complete. Both full EriX build generations and the external-toolchain rebuild inside EriX remain unproved. See binding design, Vfsd review, Posixd review and master completion.
Vfsd retains the effective policy behind the exact endpoint through cwd changes, redirection and redelegation; clearing request flags cannot recover access. The wire codec rejects operation-inappropriate flags, and older receivers reject unknown bits.
Codec, confinement, write-denial, receipt-destination and cleanup tests are authored but unrun. Component documentation and the filesystem-service manual describe the contract. The Vfsd dependency closure is pinned coherently; Integration still selects its earlier coherent graph. Counted root/stream configuration, Launchd custody, actual Posixd receipt binding and the native binding scenario remain implementation work. This prerequisite does not complete filesystem/stream binding or add checklist credit. Testing and CI observation remain deferred; no validation pass or full guest build is claimed. Tracking: filesystem design, realm binding design, master completion.
Receipt-bound filesystem and stream configuration design — 29 September 2026 (implementation in progress): complete the binding of read-only source/toolchain directories, writable output/tmp directories, executable directories, root/cwd selectors and inherited streams to actual native receipts. The existing counted configuration only binds internal byte channels. Role names, path strings and a Generic SEND receipt do not themselves establish a directory's read/write or navigation ceiling.
First extend Vfsd's existing scoped launch-directory request with two directory-only flags:
DIRECTORY_ROOT(bit 1) pins the selected directory as the new navigation ceiling;DIRECTORY_READ_ONLY(bit 2, valid only together withDIRECTORY_ROOT) removes write authority. Existing zero-flag cwd derivation keeps its original ceiling; executable and manifest requests reject these directory flags. Unknown bits remain errors, so an old receiver cannot silently accept weaker semantics. Store the effective write ceiling behind the exact endpoint and carry it through cwd changes, nested directory resolution and redirection. Intersect it with the original namespace session; clearing request flags must never restore write authority. Anchor the new root to the selected provider object, retain original-object identity checks, and retire all independent pins on failure and close. Source and toolchain roots request both restrictions; output/tmp roots request a fresh ceiling without increasing their parent's access. Existing endpoint generation, release and uncertain-cleanup rules remain mandatory.Then extend the canonical configuration and explicit arena/deployment counts with typed root and stream records. Launchd resolves roots through its authenticated Vfsd route under the original owner's held directory capabilities and selects inherited streams from the same caller's live I/O owners. It retains original receipts and transfer ownership until exact source retirement. Posixd reserves custody before collecting each receipt, checks exact native QUERY/type/rights/slot evidence against the frozen realm/owner/role record, and seals only after transport ownership is fully retired. Numeric selectors never create routes. Teardown drops actual aliases and confirms absence before reuse, including cancellation and partial delivery. Storage remains explicitly counted without a fixed number of roots, directories or streams.
Author focused codec, confinement, stale/replayed receipt, two-realm and cleanup regressions and a bounded native binding scenario; keep test execution and CI observation deferred under the user's current instruction. Publish coordinated producer/consumer revisions and update the manual and master completion issue. This design does not claim completed root/stream binding or either full guest build.
Current inventory: 1 Cargo target (1 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.
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.
Tracking and rollout
All 42 maintained local checks pass: development/release feature matrices (136 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 CI94 and CI95 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.
VFS requires frozen Write for regular-file resize and live admitted file/directory custody for sync. Known refusals preserve original admission; uncertainty keeps cleanup-only custody, with no retry or pathname reopen.
No request or adapter adds a device, mount, credentials, new native rights or capability transfer.
They cover literal framing, unchanged output on refusal, full correlation, access direction, actual aliases and zero growth, storage/format refusal, clean recovery ownership, lost barriers/replies, retained cleanup and short reply capacity.
Existing ext logical-range conversions and sparse-gap traversal still need the size-boundary audit; compatibility truncate/ftruncate/fsync/fdatasync consumers, complete cancellation controls and new live workloads remain unfinished. Current phase completion remains 19.20% weighted, 7.61% whole acceptance: 27/460 parents and 486/949 children.
Both full guest EriX generations and external Rust/LLVM rebuilding remain required and unperformed.
Detailed scope and contracts
Cross-provider filesystem lifetime — signed source acceptance, 2 October 2026
Two live binding scenarios cover RAM, ext and separately selected FAT32/exFAT: conditional replacement/unlink, retained aliases and original identities, moved/detached directories, name reuse, supported links and read-only, cross-filesystem and unsupported-link refusals. Final media observers require reclaimed allocations, consistent reverse indices and clear undo ownership.
Both full EriX guest generations and external Rust/LLVM guest rebuilding remain required and unperformed.
Phase progress: 19.12% weighted, 7.61% whole acceptance; 27/460 parents and 485/949 sub-items.
Signed lifetime source acceptance:
Current-source acceptance now covers cwd navigation and contextual launch,
exact object/entry and redirection serving, together with compatibility shared
descriptions through namespace changes and original cleanup.
Vfsd's cwd and contextual
serving criteria are accepted; its original ownership and retired-bridge criteria
were already complete. The namespace issue also reconciles its provider criterion
with prior signed RAM/ext/FAT completion. Complete cross-provider live conditional
workloads, resource/refusal, recovery/reuse coverage and coherent runtime graph
adoption remain open. Full EriX guest generations and external Rust/LLVM rebuilding remain
required and unperformed.
Recomputed progress: 19.02% weighted, 6.81% whole acceptance; 25/460 parents and 482/949 sub-items.
Runtime consumer 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.
Signed 378181a5840fab0433e350cf6519e729f9283fdc requires explicit absolute selections for the regular disassembler, original Integration ownership helpers and a new evidence directory.
All thirteen parser controls and eight actual tool-boundary controls pass, including environment/PATH shadowing, rejected tool and input leaves, cached helper substitution, nonzero execution, diagnostics, output refusal and evidence preservation.
Full service VM and native external-toolchain/guest-build acceptance remain open in Phase 6 completion.
Original explicit-tool CI acceptance — 21 September 2026: signed 378181a5840fab0433e350cf6519e729f9283fdc passes both original CI 90/91. This closes the bounded host-tool correction; full guest and whole-program frame acceptance remain separate.
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.
Conditional retained-entry namespace custody — 1 October 2026
Exact response correlation distinguishes completed effects, definite no-effect refusals and uncertainty.
Missing, malformed or uncorrelated replies preserve cleanup and never permit replay. The installed namespace is currently immutable and append-only; future unmount/reconfiguration requires a persistent nonwrapping epoch.
Ext and FAT return explicit correlated unsupported no-effect dispositions for the new family. Their conditional transactions remain unfinished. Complete compatibility path/dirfd, ACL/sticky, final-link and trailing-separator mediation and legacy cwd migration remain open in the owning design. Required legacy cwd and administrative spelling guards remain.
Thirty-nine new Rust controls are authored and unrun: ten literal wire controls, seventeen RAM provider controls, eight actual Vfsd dispatch controls, and two explicit-refusal controls each for ext and FAT.
Both complete EriX guest generations and external Rust/LLVM rebuilding remain required and unperformed.
Related records and contracts
[FEATURE] [P02.R72] Audit authority, code quality and documentation in vfsdto [FEATURE] Audit authority, code quality and documentation in vfsderikinkinen referenced this issue2026-09-12 12:53:48 +02:00
erikinkinen referenced this issue from erix/lib-ipc2026-09-29 00:53:59 +02:00
erikinkinen referenced this issue from erix/lib-bootstrap2026-09-29 00:54:00 +02:00
erikinkinen referenced this issue from erix/lib-time2026-09-29 00:54:01 +02:00
erikinkinen referenced this issue from erix/docs2026-09-29 00:54:03 +02:00