Skip to main content

Module mode

Module mode 

Source
Expand description

Execution mode and the mode-driven gate decision.

Mode is a per-session CLI flag on devflow start — there is no config file and no per-phase toggling.

  • Auto: Define and Plan run once. Code ↔ Validate auto-loop until clean. Then Ship. The only human gate is at Ship — unless Validate fails MAX_CONSECUTIVE_FAILURES times in a row, which forces a gate.
  • Supervise: Same pipeline, but Validate always fires a gate to Hermes → Human before advancing to Ship.

Structs§

ModeParseError
Error returned when parsing an unsupported mode name.

Enums§

Mode
How DevFlow drives the pipeline for a session.

Constants§

MAX_CONSECUTIVE_FAILURES
Number of consecutive Validate failures in Auto mode before a gate is forced.
MAX_INFRA_FAILURES
Ceiling for crate::state::State::infra_failures before an infrastructure-class fault chain (OOM/ResourceKilled, missing agent binary/AgentUnavailable) forces a terminal gate (D-08, 17-01).
MAX_PREFLIGHT_RETRIES
Ceiling for crate::state::State::preflight_retries before a preflight gate’s GateAction::LoopBack recursion aborts rather than polling another 7-day gate timeout (18f, D-18f backstop). A failing preflight is a readiness problem the operator is actively being asked about right now, not a transient infrastructure blip, so this takes the tighter MAX_CONSECUTIVE_FAILURES-style ceiling rather than the more lenient MAX_INFRA_FAILURES. Unlike those two counters, this one is NOT reset by transition() — it is reset by preflight success and by human approval (GateAction::Advance), both inside run_preflight (devflow-cli/src/main.rs).

Functions§

transition_resets_consecutive_failures
Whether transition() should zero crate::state::State::consecutive_failures when moving from from to to.