Skip to main content

Module gate

Module gate 

Source
Expand description

Gate-decision policy over an already-computed warble::BlastRadius (Phase 4a — the mutating guardrail described in blast-radius.md §6). Pure, no I/O: the host computes the radius (via crate::blast_radius_for_project), then this module turns it plus a threshold into a decision the host can act on (allow the apply, escalate to human approval, or hard-block it).

Structs§

GateThreshold
The thresholds a gate decision is evaluated against. All fields are optional: an absent max_severity/max_downstream simply never triggers that branch of the policy.

Enums§

GateDecision
The outcome of a gate decision — what the host should do with the pending mutating apply.

Functions§

decide
Pure policy over an already-computed radius. Returns the decision plus a human-readable reason (surfaced to the operator / logged, not machine-parsed).
parse_severity
Parse a warble::Severity from its human-readable name (the inverse of severity_str). Case-insensitive; returns None for anything else (the caller should reject an unknown flag value rather than silently defaulting).
severity_str
Human-readable name for a warble::Severity (the inverse of parse_severity).