pub struct EvidenceRecordInput {
pub suite: Option<String>,
pub crate_output: Option<String>,
pub origin: Option<String>,
pub provenance: Vec<String>,
pub coverage: Option<String>,
pub ledger: Option<LedgerTarget>,
pub run_record: Option<String>,
}Expand description
A run to record into the ledger.
Paths to what the runners already wrote, not a run to perform: the recorder reads a
report, carries into each result what that run measured about its own checkout, and
merges it. The reports are optional and may be given together; an absent origin is
local, and an absent ledger is the tracked one.
use majordomus_cli::capability::builtin::evidence::EvidenceRecordInput;
let input: EvidenceRecordInput =
serde_json::from_str(r#"{"suite": "tmp/report.tsv"}"#).unwrap();
assert_eq!(input.suite.as_deref(), Some("tmp/report.tsv"));
assert!(input.crate_output.is_none() && input.origin.is_none());
// what was not given is not written back as null: the shape a client reads is the
// shape it sent
assert_eq!(
serde_json::to_string(&input).unwrap(),
r#"{"suite":"tmp/report.tsv"}"#
);Fields§
§suite: Option<String>The runner’s TSV report: MJ_TEST_REPORT=<file> bash test/run.sh.
crate_output: Option<String>A file holding cargo test’s output, for the crate’s own integration tests.
origin: Option<String>Where the run happened: local (the default), ci or release.
provenance: Vec<String>A measurement per report: the file majordomus evidence stamp wrote at the end of
that run, as <file> or <producer>=<file> (suite, crate, coverage). Without a
producer word, the producer is the file’s own, else the only report given.
coverage: Option<String>A coverage summary: what scripts/rust-coverage --summary-json wrote.
ledger: Option<LedgerTarget>The ledger to merge into: repo (the default, the tracked ledger) or local (the
ignored one under .ai/local/, which moves no verdict).
run_record: Option<String>Also write the run record to this file.
Trait Implementations§
Source§impl BenchmarkCases for EvidenceRecordInput
impl BenchmarkCases for EvidenceRecordInput
Source§fn benchmark_cases(_: &CaseContext<'_>) -> Vec<NamedCase<Self>>
fn benchmark_cases(_: &CaseContext<'_>) -> Vec<NamedCase<Self>>
Source§fn benchmark_cases_json(ctx: &CaseContext<'_>) -> Vec<NamedCase<Value>>
fn benchmark_cases_json(ctx: &CaseContext<'_>) -> Vec<NamedCase<Value>>
Source§impl Clone for EvidenceRecordInput
impl Clone for EvidenceRecordInput
Source§fn clone(&self) -> EvidenceRecordInput
fn clone(&self) -> EvidenceRecordInput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EvidenceRecordInput
impl Debug for EvidenceRecordInput
Source§impl<'de> Deserialize<'de> for EvidenceRecordInput
impl<'de> Deserialize<'de> for EvidenceRecordInput
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 EvidenceRecordInput
impl JsonSchema for EvidenceRecordInput
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 more