pub struct Evidence {Show 20 fields
pub id: Uuid,
pub kind: EvidenceKind,
pub producer: String,
pub summary: String,
pub input_hash: Option<String>,
pub output_hash: Option<String>,
pub exit_code: Option<i32>,
pub success: bool,
pub started_at: DateTime<Utc>,
pub completed_at: DateTime<Utc>,
pub artifacts: Vec<ArtifactRef>,
pub redacted: bool,
pub metadata: Value,
pub assurance_level: AssuranceLevel,
pub attempt_id: Option<Uuid>,
pub attempt_sequence: Option<u32>,
pub action_id: Option<String>,
pub workspace_generation: Option<u64>,
pub state_binding: Option<String>,
pub supersedes: Vec<Uuid>,
}Expand description
Runtime evidence that can support one or more criteria.
Fields§
§id: UuidStable evidence identifier.
kind: EvidenceKindEvidence category.
producer: StringTool or runtime producer.
summary: StringShort, reviewable statement of what was observed.
input_hash: Option<String>Hash of normalized inputs, when applicable.
output_hash: Option<String>Hash of the complete output.
exit_code: Option<i32>Process-style exit code, when applicable.
success: boolRuntime determination, never model prose.
started_at: DateTime<Utc>Start timestamp.
completed_at: DateTime<Utc>Completion timestamp.
artifacts: Vec<ArtifactRef>Content-addressed artifacts.
redacted: boolWhether sensitive content was removed before persistence.
metadata: ValueProducer-specific, public metadata.
assurance_level: AssuranceLevelAssurance boundary in which the observation was made.
attempt_id: Option<Uuid>Stable identifier shared by evidence from one logical attempt.
attempt_sequence: Option<u32>Monotonically increasing attempt sequence used to prove supersession order.
action_id: Option<String>Runtime-owned action identifier that caused this observation.
workspace_generation: Option<u64>Workspace generation observed by this evidence.
state_binding: Option<String>Digest or other canonical binding for the observed workspace state.
supersedes: Vec<Uuid>Earlier evidence explicitly replaced by this later attempt.
Implementations§
Source§impl Evidence
impl Evidence
Sourcepub fn observed(
kind: EvidenceKind,
producer: impl Into<String>,
summary: impl Into<String>,
input: Option<&Value>,
output: Option<&[u8]>,
exit_code: Option<i32>,
success: bool,
) -> Self
pub fn observed( kind: EvidenceKind, producer: impl Into<String>, summary: impl Into<String>, input: Option<&Value>, output: Option<&[u8]>, exit_code: Option<i32>, success: bool, ) -> Self
Creates runtime evidence and hashes its JSON input/output values.
Sourcepub fn with_attempt(self, attempt_id: Uuid, sequence: u32) -> Self
pub fn with_attempt(self, attempt_id: Uuid, sequence: u32) -> Self
Associates this observation with a logical, ordered attempt.
Sourcepub fn with_action(self, action_id: impl Into<String>) -> Self
pub fn with_action(self, action_id: impl Into<String>) -> Self
Associates this observation with a runtime-owned action identifier.
Sourcepub fn bound_to_workspace(
self,
generation: u64,
state_binding: Option<String>,
) -> Self
pub fn bound_to_workspace( self, generation: u64, state_binding: Option<String>, ) -> Self
Binds this observation to a workspace generation and optional state digest.
Sourcepub fn with_assurance(self, assurance_level: AssuranceLevel) -> Self
pub fn with_assurance(self, assurance_level: AssuranceLevel) -> Self
Records the observation’s execution assurance.
Sourcepub fn superseding(self, evidence_ids: impl IntoIterator<Item = Uuid>) -> Self
pub fn superseding(self, evidence_ids: impl IntoIterator<Item = Uuid>) -> Self
Explicitly replaces evidence from one or more earlier attempts.