pub struct Readiness {
pub author: RoleReadiness,
pub maintainer: RoleReadiness,
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 (and, for MAINTAINER, the further-unverifiable
adoption question — see RoleReadiness). It is the input to Capability::derive.
Fields§
Whether the AUTHOR role can sign, as far as this session can tell.
Was author_ready: bool until RFC 026. That asymmetry with MAINTAINER was right when AUTHOR
had nothing to be unsure about; prikk ≥ 0.41 answers binding for both roles, and
mismatch applies to both, so both get the same vocabulary.
maintainer: RoleReadinessWhether the MAINTAINER role can sign, as far as this session can tell.
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.