pub struct ContextSnapshot {
pub schema_version: u32,
pub workflow_id: String,
pub phase: u8,
pub objective: String,
pub contract_hash: String,
pub worktree_fingerprint: String,
pub evidence: Vec<EvidenceRef>,
}Expand description
Context identity and bounded evidence catalog for one workflow phase.
Fields§
§schema_version: u32Input schema version.
workflow_id: StringActive workflow ID.
phase: u8Current phase from the contract.
objective: StringReviewed, bounded task objective.
contract_hash: StringSHA-256 of the contract file.
worktree_fingerprint: StringSHA-256 fingerprint of HEAD and working tree status.
evidence: Vec<EvidenceRef>Source references; the original files remain untouched.
Implementations§
Source§impl ContextSnapshot
impl ContextSnapshot
Sourcepub fn validate(&self) -> Result<(), ContextError>
pub fn validate(&self) -> Result<(), ContextError>
Validate all external fields before any model request or manifest write.
§Errors
Rejects out-of-range sizes, invalid paths, unsafe summaries, and duplicate IDs.
Sourcepub fn candidates(&self) -> Result<Vec<&EvidenceRef>, ContextError>
pub fn candidates(&self) -> Result<Vec<&EvidenceRef>, ContextError>
Return old, noncritical evidence eligible for optional model scoring.
§Errors
Rejects an invalid snapshot.
Trait Implementations§
Source§impl Clone for ContextSnapshot
impl Clone for ContextSnapshot
Source§impl Debug for ContextSnapshot
impl Debug for ContextSnapshot
Source§impl<'de> Deserialize<'de> for ContextSnapshot
impl<'de> Deserialize<'de> for ContextSnapshot
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
Auto Trait Implementations§
impl Forget for ContextSnapshot
impl Freeze for ContextSnapshot
impl Move for ContextSnapshot
impl RefUnwindSafe for ContextSnapshot
impl Send for ContextSnapshot
impl Sync for ContextSnapshot
impl Unpin for ContextSnapshot
impl UnsafeUnpin for ContextSnapshot
impl UnwindSafe for ContextSnapshot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
Converts
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> ⓘ
Converts
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