pub struct Summary {
pub schema_version: u32,
pub reason_code_version: u32,
pub exit_code: i32,
pub reason_code: String,
pub message: Option<String>,
pub next_step: Option<String>,
pub provenance: Provenance,
pub results: Option<ResultsSummary>,
pub performance: Option<PerformanceMetrics>,
pub seeds: Seeds,
pub judge_metrics: Option<JudgeMetrics>,
pub sarif: Option<SarifOutputInfo>,
}Expand description
Machine-readable summary for the PR gate
See: SPEC-PR-Gate-Outputs-v1.md for the full contract. Downstream MUST branch on (reason_code_version, reason_code) rather than exit code.
Fields§
§schema_version: u32Schema version for compatibility detection
reason_code_version: u32Version of the reason code registry. MUST be 1 for Outputs-v1. Downstream MUST branch on (reason_code_version, reason_code) rather than exit code.
exit_code: i32Exit code: 0=pass, 1=test failure, 2=config error, 3=infra error
reason_code: StringStable machine-readable reason code (e.g., “E_TRACE_NOT_FOUND”)
message: Option<String>Human-readable message describing the outcome
next_step: Option<String>Suggested next step when exit_code != 0
provenance: ProvenanceProvenance information for auditability
results: Option<ResultsSummary>Results summary
performance: Option<PerformanceMetrics>Performance metrics (optional)
seeds: SeedsSeeds for deterministic replay (E7.2). Always present for schema stability (order_seed/judge_seed null when unknown).
judge_metrics: Option<JudgeMetrics>Judge reliability metrics (E7.3). Present when run had judge evaluations.
sarif: Option<SarifOutputInfo>SARIF truncation (E2.3). Present when SARIF was truncated (N results omitted).
Implementations§
Source§impl Summary
impl Summary
Sourcepub fn failure(
exit_code: i32,
reason_code: &str,
message: &str,
next_step: &str,
assay_version: &str,
verify_enabled: bool,
) -> Self
pub fn failure( exit_code: i32, reason_code: &str, message: &str, next_step: &str, assay_version: &str, verify_enabled: bool, ) -> Self
Create a failure summary with reason code and next step
Sourcepub fn with_results(self, passed: usize, failed: usize, total: usize) -> Self
pub fn with_results(self, passed: usize, failed: usize, total: usize) -> Self
Set results summary
Sourcepub fn with_duration(self, duration_ms: u64) -> Self
pub fn with_duration(self, duration_ms: u64) -> Self
Set performance metrics
Sourcepub fn with_performance(self, performance: PerformanceMetrics) -> Self
pub fn with_performance(self, performance: PerformanceMetrics) -> Self
Set full performance metrics payload.
Sourcepub fn with_digests(
self,
policy_digest: Option<String>,
baseline_digest: Option<String>,
trace_digest: Option<String>,
) -> Self
pub fn with_digests( self, policy_digest: Option<String>, baseline_digest: Option<String>, trace_digest: Option<String>, ) -> Self
Set provenance digests
Sourcepub fn with_replay_provenance(
self,
bundle_digest: String,
replay_mode: &str,
source_run_id: Option<String>,
) -> Self
pub fn with_replay_provenance( self, bundle_digest: String, replay_mode: &str, source_run_id: Option<String>, ) -> Self
Set replay provenance fields (E9c).
Sourcepub fn with_seeds(
self,
order_seed: Option<u64>,
judge_seed: Option<u64>,
) -> Self
pub fn with_seeds( self, order_seed: Option<u64>, judge_seed: Option<u64>, ) -> Self
Set seeds for replay determinism (E7.2). Keys always present in JSON (string or null).
Sourcepub fn with_judge_metrics(self, metrics: JudgeMetrics) -> Self
pub fn with_judge_metrics(self, metrics: JudgeMetrics) -> Self
Set judge reliability metrics (E7.3)
Sourcepub fn with_sarif_omitted(self, omitted: u64) -> Self
pub fn with_sarif_omitted(self, omitted: u64) -> Self
Set SARIF truncation info (E2.3). Call when omitted_count > 0.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Summary
impl<'de> Deserialize<'de> for Summary
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>,
Auto Trait Implementations§
impl Freeze for Summary
impl RefUnwindSafe for Summary
impl Send for Summary
impl Sync for Summary
impl Unpin for Summary
impl UnsafeUnpin for Summary
impl UnwindSafe for Summary
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more