pub struct ConfigGate { /* private fields */ }Expand description
Memory-only plans cannot be replayed across a daemon restart. A successful generation commit changes the base revision and consumes its approval once.
Implementations§
Source§impl ConfigGate
impl ConfigGate
Sourcepub fn begin_approval(
&mut self,
digest: &Digest,
store: &mut ConfigStore,
current: &GateSnapshot,
facts: &ApprovalFacts,
) -> Result<ApprovalChallenge, GateError>
pub fn begin_approval( &mut self, digest: &Digest, store: &mut ConfigStore, current: &GateSnapshot, facts: &ApprovalFacts, ) -> Result<ApprovalChallenge, GateError>
Select a required surface. Legacy log policy and operator-app shortcuts
are deliberately absent: neither proves review of an immutable plan.
Sourcepub fn finish_approval(
&mut self,
attempt: u64,
reply: ApprovalReply,
store: &mut ConfigStore,
current: &GateSnapshot,
facts: &ApprovalFacts,
now_ms: u64,
) -> Result<u64, GateError>
pub fn finish_approval( &mut self, attempt: u64, reply: ApprovalReply, store: &mut ConfigStore, current: &GateSnapshot, facts: &ApprovalFacts, now_ms: u64, ) -> Result<u64, GateError>
Complete under the commit lock after a fresh snapshot and active-surface lookup. The transport must match a response frame, not an unsolicited request. A wrong answer consumes this attempt, never the pending plan.
Sourcepub fn invalidate_phone(&mut self, connection: u64) -> Vec<u64>
pub fn invalidate_phone(&mut self, connection: u64) -> Vec<u64>
The owner wakes each waiting client with surface-unavailable when the supervised callosum connection exits or is replaced by a swap. An old phone card must not remain pending until its response deadline.
Source§impl ConfigGate
impl ConfigGate
pub fn new(incarnation: String) -> Self
Sourcepub fn plan(
&mut self,
store: &mut ConfigStore,
kind: PlanKind,
candidate: GateSnapshot,
observed: &GateSnapshot,
review: impl FnOnce(&GateSnapshot, &GateSnapshot) -> Result<Changeset, GateError>,
) -> Result<ConfigPlanView, GateError>
pub fn plan( &mut self, store: &mut ConfigStore, kind: PlanKind, candidate: GateSnapshot, observed: &GateSnapshot, review: impl FnOnce(&GateSnapshot, &GateSnapshot) -> Result<Changeset, GateError>, ) -> Result<ConfigPlanView, GateError>
review enforces the approved schema and every affected project’s bounds
before asking admitted module reviewers. Refusals produce no plan.
Sourcepub fn rollback(
&mut self,
store: &mut ConfigStore,
generation: u64,
observed: &GateSnapshot,
current_programs: &GateSnapshot,
review: impl FnOnce(&GateSnapshot, &GateSnapshot) -> Result<Changeset, GateError>,
) -> Result<ConfigPlanView, GateError>
pub fn rollback( &mut self, store: &mut ConfigStore, generation: u64, observed: &GateSnapshot, current_programs: &GateSnapshot, review: impl FnOnce(&GateSnapshot, &GateSnapshot) -> Result<Changeset, GateError>, ) -> Result<ConfigPlanView, GateError>
Capture program identities for the reverse configuration’s launch specs at the restored paths at plan time. No executable bytes or historical identities are restored. The restored generation’s reviewed-program record is copied: its reviewers are known. If that generation has no record, the rollback has none either, so its modules owe re-review.