Expand description
Production genesis labeling — content, enumeration, resolution, and the boot-time coverage gate for the native-MAC data plane (S1 activation, #567, epic #547).
S1’s mechanism already lives in hyprstream_rpc::auth::mac::genesis:
GenesisMap (an explicit path→label map with no catch-all default) and
GenesisReport (the completeness gate). This module supplies the pieces the
mechanism can’t: the actual content and the wiring that turns “a map exists”
into “every node in the running namespace is covered, and here is the
evidence.”
Four net-new pieces, in the order the boot path uses them:
NamespaceEnumerator— walks the production export surface (the/srv/{name}service inventory + the export-root skeleton +, optionally, a live [Namespace]’s mount prefixes) to produce the node set the completeness check runs against. Without a concrete node set the report is vacuous; this is what makes “every existing object” a finite, checkable list.SitePolicy— the site-policy label table. A small set of explicit per-node rules plus a conservative floor, materialized into concrete per-nodeGenesisMapassignments. This is the sanctioned “explicit*-style rule that materializes to concrete assignments” the genesis mechanism permits — never an implicit catch-all inside the map.CompositeObjectLabelResolver— the productionObjectLabelResolver: genesis static nodes → bind-time D2 descendant inheritance → CASBlobManifest-carried labels; a manifest present but unlabeled is denied; anything unresolvable returnsNone⇒ deny.GenesisGate— constructed at boot: it runs the enumerator, materialize, and report, and holds the resolver, so the startup path can log/emit theGenesisReportand a status surface can render coverage evidence.
The production resolver is consumed by the authoritative 9P translator PEP. Missing and unlabeled objects deny; there is no permissive fallback.
Structs§
- Composite
Object Label Resolver - The production
ObjectLabelResolver: composes the label sources the reference monitor needs, in priority order, and fails closed when none applies. - Generated
Node Coverage - Per-node label coverage of a service’s generated
vfs_nodes()table (#699 carrier (a)): each generated/srv/{service}/*node carries its MAC label as a property of its type, derived from the$vfsMacschema annotation at codegen (seehyprstream_rpc::metadata::VfsNode::mac_label). - Genesis
Gate - The boot-time genesis coverage gate: enumerate → materialize → report, holding the composite resolver ready for a PEP to consume once activation is decided.
- Namespace
Enumerator - Accumulates the set of node paths a genesis must cover, deduplicated and deterministically ordered.
- NoManifests
- The Stage-0 default manifest source: no CAS manifest store is wired to the
resolver yet, so every CID is unresolvable (
None⇒ deny). Honest and fail-closed — it never invents a label for content it can’t see. - Site
Policy - A site-policy label table: a set of explicit per-node rules plus a conservative floor for every other enumerated node.
Constants§
- EXPORT_
ROOTS - The export-root skeleton nodes the host VFS composes under (mirrors
server::routes::ninep::build_export_mount+ the#730host VFS layout). These are structural container directories, always present regardless of which services are running. - STANDARD_
NON_ SERVICE_ MOUNTS - Non-service mount points the standard namespace binds (see
services::namespace_builder::build_standard_namespaceandhyprstream_vfs::STANDARD_NAMESPACE_PATHS)./srv/modeland/srv/registryare also services, so they’re covered by the service inventory; these are the ones that are not services.
Traits§
- Manifest
Label Source - Resolves a content-addressed object (a CAS [
BlobManifest]) to its carried label. The seam between the composite resolver and the CAS manifest store.
Functions§
- floor_
label - The floor label for the existing world:
(Public, Unverified, {})— the lattice bottom. Used as the D2 clamp target for descendants / unlabeled carriers and as the value for explicitly-public structural nodes. - genesis_
lattice - The genesis lattice the floor labels are validated against.