pub struct GateRun {
pub recorded_at: String,
pub head: String,
pub branch: String,
pub exit: i64,
pub command: String,
pub inputs_hash: String,
pub session: String,
}Expand description
use majordomus_cli::gates::GateRun;
// what `majordomus evidence --gate` writes: a run, and the tree it was taken over
let run = GateRun {
recorded_at: "2026-01-01T00:00:00Z".into(),
head: "9b1e2d4".into(),
branch: "master".into(),
exit: 0,
command: "scripts/rust-check --ci".into(),
inputs_hash: "3f0a".into(),
session: "s-1".into(),
};
// the hash is what makes a run go stale rather than merely old: the same run read
// against a different tree is evidence about a tree that no longer exists
assert_eq!(run.exit, 0);
assert_ne!(run.inputs_hash, "0000");The task.gate ledger line that last reported a gate, as the ledger holds it.
Fields§
§recorded_at: StringWhen it was recorded, RFC 3339 UTC.
head: StringThe commit the ledger’s envelope stamped on it.
branch: StringThe branch it was recorded on.
exit: i64The exit status the gate reported. 0 is a pass.
command: StringThe command that produced it — narrative is not evidence.
inputs_hash: StringThe hash of the files that select the gate, as they stood when it ran.
session: StringThe session that recorded it.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GateRun
impl<'de> Deserialize<'de> for GateRun
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for GateRun
impl JsonSchema for GateRun
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for GateRun
impl RefUnwindSafe for GateRun
impl Send for GateRun
impl Sync for GateRun
impl Unpin for GateRun
impl UnsafeUnpin for GateRun
impl UnwindSafe for GateRun
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
Mutably borrows from an owned value. Read more