pub struct Readiness {
pub author_ready: bool,
pub maintainer_ready: bool,
pub read_only: bool,
}Expand description
Whether each signing role’s key material is available to the current session, plus whether the session is in read-only mode.
This carries no key material — only presence flags. It is the input to Capability::derive.
Fields§
True when an AUTHOR key id and seed are both present in the environment (presence only — the
seed value is never read; see stikk-prikk::env).
maintainer_ready: boolTrue when a MAINTAINER key id and seed are both present in the environment (presence only).
read_only: boolTrue when the session is in read-only mode (a global override, or the default when no signing
readiness is present). When set, no capability above Capability::Viewer is granted.
Implementations§
Source§impl Readiness
impl Readiness
Sourcepub const fn none() -> Self
pub const fn none() -> Self
A session with no signing readiness and no read-only override — the Viewer default.
Sourcepub const fn may_operate(self) -> bool
pub const fn may_operate(self) -> bool
True when a human at the machine may run recovery actions (doctor repair, lock clearing, compaction) under explicit confirmation (design AC-04; RFC 012 F-a).
Lives here, not on Capability, because the one fact that decides it — read_only — is
exactly what Capability::derive discards on the way to a Capability: by the time a
capability exists, a read-only session and a no-keys session are indistinguishable, so
may_operate could not be implemented correctly as a Capability method. AC-04’s
“orthogonal to the [mutating axis]” describes how Operator is derived — any human at the
machine, not a signing role — never an exemption from the global read-only switch: FR-121
governs, and a read-only mode that still permits clearing another writer’s lock would itself be
the “confident-but-wrong picture” (T-T4) this project refuses. Each recovery action still
carries its own typed confirmation (FR-102) regardless of this check.