generated from erix/meta
[FEATURE] Audit and refactor authority, lifecycle and code quality across every repository #2
Labels
No labels
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/integration#2
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
Compatibility and self-hosting expand the number of clients and lifecycle paths. Existing ambient, residual or oversized explicit authority, obsolete APIs and duplicated or oversized code must be removed continuously across the complete codebase.
Proposed behavior and scope
Maintain an evidence-backed finding register and a closure record for every repository. Audit capability origin, delegation, revocation, parsing, unsafe code, build scripts, production/test boundaries and measured costs; migrate callers while deleting superseded paths and refactor every authored code file below 1,000 physical lines.
This issue records planned work; its unchecked criteria are not implementation proof. The normative basis is Phase 6 and AC1–AC24.
Authority, security and reliability
Review success, partial failure, cancellation, timeout, crash and identifier reuse. Preserve exact live object identity, caller-specific error precedence and cleanup uncertainty handling. Shared libraries must remain authority-free; performance changes cannot cache authorization success or broaden grants.
Apply the priority order: security, reliability, then performance. Keep suspected vulnerabilities in the repository’s restricted SECURITY.md reporting channel.
Acceptance criteria
category, severity, exact revision, invariant, reproduction, remediation owner, regression
test, status and closure evidence.
operations, delegation ceiling, lifetime and all aliases. Include boot handoff, service
registration, compatibility realms and tools.
cwd/PATH/env, numeric slots/PIDs, implicit devices, inherited routes, host filesystem
fallbacks and cache metadata; replace it with explicit grants.
restart, failed reply/transfer, fork, exec and teardown. Prove every alias is retired or its
necessary retention is documented.
provider/admin endpoints, duplicate aliases, unnecessary read/write/exec rights and debug
routes. Attenuate/remove it even when technically explicit.
endpoint impersonation and TOCTOU around path/object resolution. Test forged descriptive
identity without the corresponding capability.
caller-specific error precedence, including cleanup uncertainty overriding the triggering
error, and quarantine/terminate when required; never continue serving with an unaccounted
grant.
locks, interruption and publication order; give each unsafe block an exact safety argument and
adversarial test where practical.
obsolete wrappers and deprecated public/wire APIs with all callers.
signed graphs; test rejection of retired versions without silent permissive fallback. Do not
retain an obsolete API solely to avoid caller edits.
explicit resource policy or accidental implementation limit. Replace accidental limits with
checked caller-sized storage or authorized allocation.
preserve resource exhaustion errors, denial-of-service protection and mandatory bounded waits
instead of interpreting “no arbitrary limits” as “unlimited resources”.
scripts and generated-source templates. Refactor them into cohesive modules below 1,000 lines,
preserving meaningful APIs and tests.
data/external payload archives, not large authored tests or fixtures containing executable
logic. Split generators and their generated code too.
Move/delete remaining test orchestration/diagnostics from production rootd; carry every
retained move/delete classification to closure.
same-toolchain code size, imports, unsafe blocks, accepted messages and authority inventory,
not incomparable historical LoC estimates.
new compatibility work from adding policy or routine test orchestration back into rootd.
initd/bootd-style work stays Phase 7.3.deduplicate measured hot paths without caching successful access checks, broadening grants or
leaving invalidatable state unowned.
escapes, unsafe deletion, unbounded subprocesses, silent warning suppression and accidental
host dependencies.
and require zero unresolved in-scope authority, deprecated API, undocumented-code and
over-1k-code findings before Phase 6 acceptance.
feature flags and migration-only tests, including dynlink migration checks and the superseded
local planning archive. Preserve necessary evidence in historical artifacts/issues, then
delete obsolete active files and references; retain current specifications and security
assertions, not obsolete scaffolding.
policy, configuration and test path now replaced by dynlink intake. Map each former useful
assertion to maintained coverage, reject retired input, and preserve genuinely required
mount/bootstrap mechanisms with explicit scope. Inspect real consumers: a shared segment type
used by dynamic materialization or the EFI loader's pre-runtime boot contract is not removed
by name alone.
milestone terminology; replace milestone-based naming with semantic responsibility
names and update all consumers/tests atomically. Allow useful historical comments/docs and
real algorithmic concepts, not executable planning APIs hidden behind an exception.
inline explanations with a contributor/auditor walkthrough; merge semantically similar files
where useful while staying below 1,000 lines.
shared library; document genuine common semantics, variation, dependencies and boundaries
before extracting it. Do not abstract merely similar syntax or combine unrelated trust
domains.
metafirst,clone/branch it, implement documented/tested shared APIs, migrate callers, remove duplicates,
and add catalog/CI/manual/man-page/audit/PR entries. Add explicit checklist rows for every
resulting repository and use exact dependency commit pins without circular service/library
dependencies.
Repository audits are linked below. Each audit includes authority and code quality, inline documentation, relevant tests and current-revision CI. Each audit requires its own acceptance evidence.
For each implementation slice, retain actual formatting, strict Clippy, unit/doctest and warning-denied build results for all altered Rust repositories and valid configurations. Add relevant runtime VM coverage, monitor older unit/VM regressions in exact-head CI, and update canonical component documents and affected technical-manual/API material. Every authored code file must remain below 1,000 physical lines, with meaningful inline documentation and missing_docs enforcement in Rust crates.
Alternatives and tradeoffs
Inventory alone does not close a finding, and broad exemptions for small libraries or tooling conceal real boundaries. Prefer cohesive thematic modules and genuine shared semantics over arbitrary fragmentation or generic abstraction.
Repository audit issues
blockdboot-toolbootloadercoreutilscrashddeviceddocsdrv-acpidrv-i8042drv-ps2-keyboarddrv-ps2-mousedrv-rtc-cmosdrv-serialdrv-virtio-blockdynlinkde2fsdexshextopfatdfbcondhotplugdinputdintegrationirqdkernelkeydlaunchdlib-aeslib-blocklib-bootimglib-bootstraplib-capabilib-clilib-consolelib-constant-timelib-crclib-deflatelib-devicelib-driverlib-dynlinklib-ed25519lib-elflib-fs-cryptolib-fs-namelib-handofflib-inputlib-interruptlib-ipclib-loglib-partitionlib-servicelib-sha2lib-stdiolib-timelib-ttylib-vfsloaderdlogdmemdmetanamedpagerdpowerboxdprobedprocdramfsdrootdserialdsha2-tooltimedttydvfsdvspacedlib-posixabilib-cstdposixdTracking and rollout
Dependencies: meta#2
Dependencies identify required contracts and closure gates; preparatory inventory/design can proceed in parallel under one owner per edited file. Link bounded implementation issues and their PRs here before claiming acceptance. Use
feature/posix-compat, regular signed commits in the canonical contribution format, and WIP PRs linked to the exact coherent component graph. All cross-repository Cargo/catalog selections and CI helpers use full 40-character lowercase commit hashes, including transitive dependencies; do not substitute branch, tag or implicit HEAD selection.Close criteria only with their own reviewed deliverables and validation evidence. Pending, skipped, cancelled, failed or predecessor-only results remain distinct. Keep main images unchanged until explicit promotion direction; technical completion does not authorize merges, release tags or publication.
[FEATURE] [P02] Audit and refactor authority, lifecycle and code quality across every repositoryto [FEATURE] Audit and refactor authority, lifecycle and code quality across every repositoryerikinkinen referenced this issue from erix/kernel2026-09-12 08:35:12 +02:00
erikinkinen referenced this issue2026-09-12 09:18:44 +02:00