pub struct Isolation {
pub tier: Tier,
pub confinement: Confinement,
pub worker: Option<Worker>,
}Expand description
What actually confined one step (US-0508).
§Why this is recorded rather than inferred
A plan says which tier a tool needs, and a tier says what it can enforce on this host. Neither says what happened. A host that could not deliver what the plan assumed is exactly the case worth catching — a Profile C flow that silently ran in-process is a flow whose reproducibility claim is false — so the tier that ran the step writes down what it was and what it enforced, and the ledger keeps that beside the grant delta.
§Absent is not the same as none
The ledger holds an Option<Isolation>, and the two cases are different
facts. None means the runner did not say: nothing is claimed, and a
reviewer knows to go and ask. Some carrying Confinement::NONE means
the step ran with nothing enforced, which is a claim, and one somebody may
have to act on. Rounding either into the other would lose the difference
between an unaudited step and an unconfined one.
Fields§
§tier: TierThe tier that actually ran the step.
confinement: ConfinementWhat that tier actually enforced, per domain, on the host it ran on.
worker: Option<Worker>The reused worker that served it, where one did (US-0909).
None is a child of its own: one process, one call, gone afterwards.
Some means a warm worker served it, and names which — because “the
tool ran in a subprocess” stops being the whole answer once a
subprocess serves more than one step. Two steps confined identically
and served by the same worker are a different fact from two steps
that each had a process to themselves, and only one of them can be
investigated by asking what else that worker did.
Skipped when absent, so a cold child’s entry encodes exactly as it did before warm workers existed.
Implementations§
Source§impl Isolation
impl Isolation
Sourcepub const fn new(tier: Tier, confinement: Confinement) -> Self
pub const fn new(tier: Tier, confinement: Confinement) -> Self
A step that ran in tier, which enforced confinement.
In a child of its own: served_by is what says a
reused worker ran it instead.
Sourcepub const fn served_by(self, worker: Worker) -> Self
pub const fn served_by(self, worker: Worker) -> Self
Record that a reused worker served this step (US-0909).
Sourcepub const fn was_warm(&self) -> bool
pub const fn was_warm(&self) -> bool
Whether a reused worker served it, rather than a child of its own.
Sourcepub const fn unconfined(tier: Tier) -> Self
pub const fn unconfined(tier: Tier) -> Self
A step that ran in tier with nothing enforced at all.
The record a trusted in-process tool leaves when nothing stands between it and the machine. Written down rather than omitted: see the type documentation.
Sourcepub const fn is_virtualising(&self) -> bool
pub const fn is_virtualising(&self) -> bool
Whether the tier that ran it virtualises the machine — what Profile C asks for.
Sourcepub fn enforces_nothing(&self) -> bool
pub fn enforces_nothing(&self) -> bool
Whether nothing at all was enforced.
Sourcepub fn is_kernel_enforced(&self) -> bool
pub fn is_kernel_enforced(&self) -> bool
Whether every domain was refused by the kernel rather than by the host.
The question a reviewer asking “was this confined, or merely asked nicely?” is actually asking.