pub struct FleetHitl {
pub mode: Option<Unanswered>,
pub auto_approve_tiers: Vec<RiskTier>,
}Expand description
Per-fleet approval policy. A floor, never a grant: every field here can only
make an outcome stricter or change WHO waits — none of them approves
anything, and there is deliberately no “auto-approve” knob (that is what
--yes is, and it stays unreachable from unattended fleet paths).
Fields§
§mode: Option<Unanswered>What an unanswered Ask-tier gate does. Absent → auto: defer when no TTY
is attached, wait when one is. Set it explicitly when the TTY is a bad
proxy for “somebody is watching” — a monitored ops fleet wants wait
even headless; a fleet that must never reach for a human wants deny.
auto_approve_tiers: Vec<RiskTier>Risk tiers this fleet’s owner has taken standing responsibility for: the gate approves them without asking, and records the auto-approval on the channel so the run is still auditable.
An explicit LIST, not a ceiling — RiskTier’s ordering would make
up_to: spend quietly cover network-egress too, and a grant nobody
meant to write is the whole failure mode this feature has to avoid.
crate::hitl::tier_may_be_granted bounds what may appear here.
Implementations§
Source§impl FleetHitl
impl FleetHitl
Sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Reject a policy that grants more than config is allowed to grant.
Loud at load time rather than silently ignored at the gate: a user who
wrote destructive here believes it took effect, and the gap between
that belief and the truth is where the damage lives.