pub struct Gate {
pub id: String,
pub title: String,
pub scope: String,
pub required: bool,
pub status: GateStatus,
pub reason: String,
pub remediation: String,
pub source: String,
pub evidence: Option<GateRun>,
pub inputs: Vec<String>,
pub inputs_hash: String,
pub evaluated_at: String,
}Expand description
use majordomus_cli::gates::{Gate, GateStatus};
let gate = Gate {
id: "rust-check".into(),
title: "the crate builds, is formatted and passes its tests".into(),
scope: "apps/majordomus-cli".into(),
required: true,
status: GateStatus::Queued,
reason: "the plan selects it and no run has ever reported".into(),
remediation: "majordomus evidence --gate rust-check --exit 0".into(),
source: "the plan".into(),
evidence: None,
inputs: vec!["apps/majordomus-cli/**".into()],
inputs_hash: "3f0a".into(),
evaluated_at: "2026-01-01T00:00:00Z".into(),
};
// silence does not refuse and is not a pass either: it is a debt, reported as one
assert!(!gate.status.refuses());
assert!(gate.status.unverified());
assert!(gate.evidence.is_none());One completion gate: what it is, whether it applies, what it said, and what to do.
Fields§
§id: StringThe gate’s identity in the model.
title: StringOne line naming it, from the model’s own summary.
scope: StringWhat it is a gate over: the CI job that runs it.
required: boolTrue when the plan selects it and its verdict therefore decides completion. False for a gate the plan left out, and for one whose runner is only had on demand.
status: GateStatusWhat is known about it.
reason: StringWhy it is in this status, in words a worker can act on.
remediation: StringWhat would settle it, as a command.
source: StringWhere the gate is declared: the model, and the command it runs.
evidence: Option<GateRun>The run that last reported, when one has.
inputs: Vec<String>The pathspecs its evidence is taken over, derived from the model.
inputs_hash: StringThe hash of those files as they stand now, when it could be taken.
evaluated_at: StringWhen this judgement was made, RFC 3339 UTC. A judgement is about a moment.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Gate
impl<'de> Deserialize<'de> for Gate
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>,
Source§impl JsonSchema for Gate
impl JsonSchema for Gate
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ordered for Gate
impl Ordered for Gate
Source§fn order_key(&self) -> OrderKey<'_>
fn order_key(&self) -> OrderKey<'_>
The band is the rank and the id is both the label and the identity: what refuses comes first, then what is unverified, then the rest, and inside each band the repository’s one comparator decides. Declared on the type rather than written as a comparator beside the report, so every projection of a gate list is in this order.