pub enum Mode {
Auto,
Supervise,
}Expand description
How DevFlow drives the pipeline for a session.
Variants§
Auto
Run the pipeline without human gates until Ship (or repeated failure).
Supervise
Fire a Validate gate to Hermes → Human before Ship.
Implementations§
Source§impl Mode
impl Mode
Sourcepub fn should_gate(
self,
stage: Stage,
consecutive_failures: u32,
phase_validate_failures: u32,
) -> bool
pub fn should_gate( self, stage: Stage, consecutive_failures: u32, phase_validate_failures: u32, ) -> bool
Whether stage should fire a gate, given how many consecutive Validate
failures have already occurred this session and how many Validate
failures have been recorded for this PHASE in total.
- Ship always gates (both modes).
- Validate gates in EITHER mode once the per-phase total reaches
MAX_PHASE_VALIDATE_FAILURES(999.78/D-07) — evaluated ahead of the per-mode match, so it gates in Auto and is a harmless no-op in Supervise, which already gates. - Supervise gates at every Validate.
- Auto gates at Validate only after
MAX_CONSECUTIVE_FAILURESconsecutive failures.
Why phase_validate_failures is a parameter rather than an extra
disjunct at the call site. Several tests re-derive this expression to
mirror the production gating decision. A disjunct added at the call
site would leave every one of those mirrors compiling untouched while
silently no longer mirroring anything — a hand-audited equality that
34/D-06 already rejects in favour of structural guards. Taking the
number here makes the compiler enumerate every mirror instead.
Mirroring tests must pass the state’s own value, never a literal zero,
or they restore the same silent drift by a shorter route.
Sourcepub fn should_auto_loop(self, stage: Stage) -> bool
pub fn should_auto_loop(self, stage: Stage) -> bool
Whether a failed Validate at stage may auto-loop back to Code without a
human gate. Auto loops Code↔Validate; Supervise requires human approval.
Trait Implementations§
impl Copy for Mode
Source§impl<'de> Deserialize<'de> for Mode
impl<'de> Deserialize<'de> for Mode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnsafeUnpin for Mode
impl UnwindSafe for Mode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.