pub struct GenesisGate { /* private fields */ }Expand description
The boot-time genesis coverage gate: enumerate → materialize → report, holding the composite resolver ready for a PEP to consume once activation is decided.
Constructed once at startup. It does not enable enforcement — it produces
the GenesisReport evidence (is_complete(), plus the unlabeled /
ill_formed lists) the activation decision gates on, and it owns the
production CompositeObjectLabelResolver that a real decider will later be
wired to.
Implementations§
Source§impl GenesisGate
impl GenesisGate
Sourcepub fn build(
nodes: Vec<String>,
lattice: Lattice,
policy: &SitePolicy,
manifests: Arc<dyn ManifestLabelSource>,
) -> Self
pub fn build( nodes: Vec<String>, lattice: Lattice, policy: &SitePolicy, manifests: Arc<dyn ManifestLabelSource>, ) -> Self
Build a gate from explicit parts, folding in the real generated-node
inventory (carrier (a), collected from every registered VfsNodeTable).
The generated inventory is part of the gate, not a manually-callable
helper: a generated node whose schema declared no $vfsMac (or a
non-pq-hybrid one) is an unlabeled finding that makes the report
incomplete, so enforcement cannot be enabled until every reachable
generated object class is annotated. Labeled generated nodes are
materialized into the genesis map (so the resolver resolves them);
unlabeled ones go into the resolver’s deny-set (so they deny, never
inherit an ancestor’s label).
Sourcepub fn production() -> Self
pub fn production() -> Self
Build the default production gate: the production node inventory, the
conservative site policy, the genesis lattice, and no CAS manifest source
wired yet (NoManifests, Stage 0). The generated-node inventory is
collected from the real VfsNodeTable registry.
Sourcepub fn generated_coverage(&self) -> &GeneratedNodeCoverage
pub fn generated_coverage(&self) -> &GeneratedNodeCoverage
Carrier (a) coverage over the real generated-node inventory: the
(path, label) pairs that resolved, and the paths that are findings
(unlabeled ⇒ deny). This is the per-node evidence an operator annotates
against before activation.
Sourcepub fn report(&self) -> &GenesisReport
pub fn report(&self) -> &GenesisReport
The completeness report over the enumerated node set.
Sourcepub fn resolver(&self) -> &CompositeObjectLabelResolver
pub fn resolver(&self) -> &CompositeObjectLabelResolver
The production object-label resolver (for wiring a real decider later).
Sourcepub fn into_resolver(self) -> CompositeObjectLabelResolver
pub fn into_resolver(self) -> CompositeObjectLabelResolver
Consume the gate and transfer its production resolver to the live PEP.
Sourcepub fn log_report(&self)
pub fn log_report(&self)
Emit the coverage report to the tracing log at boot. info on a complete
genesis; warn (with the gap lists) on an incomplete one, so an operator
activating enforcement sees exactly which nodes would deny. Log only —
never changes enforcement state.
Sourcepub fn render_report(&self) -> String
pub fn render_report(&self) -> String
Render a human-readable coverage report for a CLI / status surface. This is
the activation coverage-gate evidence: a summary line plus the full
unlabeled / ill_formed gap lists and the per-node label table.
Auto Trait Implementations§
impl Freeze for GenesisGate
impl !RefUnwindSafe for GenesisGate
impl Send for GenesisGate
impl Sync for GenesisGate
impl Unpin for GenesisGate
impl UnsafeUnpin for GenesisGate
impl !UnwindSafe for GenesisGate
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request