pub enum EpochEnforcement {
Enforced(Arc<dyn EpochRevocation>),
EnforcedElsewhere {
gate: &'static str,
},
Unenforced {
reason: &'static str,
},
}Expand description
Required typed stance on the sv epoch axis (RFC_202607150428 §7 Q3, resolved 2026-07-17).
Every super::VerifyConfig carries exactly one of these — the
former epoch: Option<Arc<dyn EpochRevocation>> slot let four
shipped consumers silently skip the axis (None was both “not yet
wired” and “deliberately unwired”, indistinguishable). Silence is
now unrepresentable: a verify site that does not enforce the axis
must SAY SO, in a variant whose name and payload are greppable and
whose boot declaration is visible in logs (STANDARDS_FAILURE_MODE
§4 — emission IS declaration).
── Variant semantics ──────────────────────────────────────────────
Enforced— the engine gates every verify through the port (check_epoch::run): missingsvrejects (unstamped, S6), stalesvrejects, substrate-down rejects fail-closed. The only variant that reaches the port.EnforcedElsewhere— the axis IS enforced on this request path, by a named gate outside this engine call. Sole legitimate case today: PAS self-verify, whereport.current(sub)would self-loop into the samesession_version_repothat performs the bump, so thesession::livenesssingle gate checkssvAFTER verify (accounts-api/src/auth.rs). Boot-declares at INFO — a correct configuration must not cry wolf at WARN.Unenforced— a declared, bounded gap: this deployment has no epoch substrate (RCW/CTW: no KVRocks, separate DB, published-SDK consumers — RFC_202607150428 §6·S5 deferral). Boot-declares at WARN so the gap is permanently visible in logs.
The engine short-circuits (admits past the sv axis) for both named
non-Enforced variants — identical wire behavior to the retired
None, but the stance is now typed, named, and logged.
Variants§
Enforced(Arc<dyn EpochRevocation>)
sv axis gated through the port on every verify (fail-closed).
EnforcedElsewhere
sv axis enforced by a NAMED gate elsewhere on the same request path (engine skips; the gate runs outside this verify call).
Unenforced
sv axis NOT enforced at this deployment — a declared, bounded
gap. declare() WARNs at boot.
Implementations§
Trait Implementations§
Source§impl Clone for EpochEnforcement
impl Clone for EpochEnforcement
Source§fn clone(&self) -> EpochEnforcement
fn clone(&self) -> EpochEnforcement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more