Skip to main content

Module genesis

Module genesis 

Source
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:

  1. 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.
  2. SitePolicy — the site-policy label table. A small set of explicit per-node rules plus a conservative floor, materialized into concrete per-node GenesisMap assignments. This is the sanctioned “explicit *-style rule that materializes to concrete assignments” the genesis mechanism permits — never an implicit catch-all inside the map.
  3. CompositeObjectLabelResolver — the production ObjectLabelResolver: genesis static nodes → bind-time D2 descendant inheritance → CAS BlobManifest-carried labels; a manifest present but unlabeled is denied; anything unresolvable returns None ⇒ deny.
  4. GenesisGate — constructed at boot: it runs the enumerator, materialize, and report, and holds the resolver, so the startup path can log/emit the GenesisReport and 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§

CompositeObjectLabelResolver
The production ObjectLabelResolver: composes the label sources the reference monitor needs, in priority order, and fails closed when none applies.
GeneratedNodeCoverage
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 $vfsMac schema annotation at codegen (see hyprstream_rpc::metadata::VfsNode::mac_label).
GenesisGate
The boot-time genesis coverage gate: enumerate → materialize → report, holding the composite resolver ready for a PEP to consume once activation is decided.
NamespaceEnumerator
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.
SitePolicy
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 #730 host 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_namespace and hyprstream_vfs::STANDARD_NAMESPACE_PATHS). /srv/model and /srv/registry are also services, so they’re covered by the service inventory; these are the ones that are not services.

Traits§

ManifestLabelSource
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.