pub struct ContractCheck {
pub name: String,
pub command: String,
pub expect_exit_zero: bool,
pub output_contains: Option<String>,
pub timeout_secs: u64,
pub baseline: bool,
pub differential: Option<DifferentialCheck>,
}Expand description
One acceptance check: a shell command run at the worktree root.
expect_exit_zero and
output_contains are the point-in-time assertion
vocabulary (including its reserved semantic JSON form). Before/after claims
use baseline + differential —
see the module docs for the model and its limits.
Fields§
§name: StringShort, unique label (“tests_pass”, “file_created”).
command: StringCommand run via the worktree shell tool.
expect_exit_zero: boolRequire exit code 0 (default true).
output_contains: Option<String>Additionally require this substring in the combined output. A value in
the reserved $json:<pointer>=<json> form is instead evaluated by the
runtime as a semantic assertion against the command’s JSON output.
timeout_secs: u64Per-check timeout (default 120s; the shell tool clamps further).
baseline: boolCapture-only check: run once at session start (during the baseline
pass) and its output kept as the before-value other checks may diff
against by name. At the gating evaluations it is NOT
re-run — re-capturing “before” after the work would destroy the
comparison — its capture-time result is carried into the results
instead, so a failed capture keeps the gate red rather than vanishing.
Additive and serde(default), so every existing contract parses
unchanged.
differential: Option<DifferentialCheck>Differential assertion: after this check’s command runs, compare its
output against the named baseline capture. Evaluated by the runtime —
exhaustively one of changed / unchanged / delta-within-bounds — in
ADDITION to expect_exit_zero / output_contains, never instead.
Trait Implementations§
Source§impl Clone for ContractCheck
impl Clone for ContractCheck
Source§impl Debug for ContractCheck
impl Debug for ContractCheck
Source§impl<'de> Deserialize<'de> for ContractCheck
impl<'de> Deserialize<'de> for ContractCheck
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 PartialEq for ContractCheck
impl PartialEq for ContractCheck
Source§impl Serialize for ContractCheck
impl Serialize for ContractCheck
impl StructuralPartialEq for ContractCheck
Auto Trait Implementations§
impl Freeze for ContractCheck
impl RefUnwindSafe for ContractCheck
impl Send for ContractCheck
impl Sync for ContractCheck
impl Unpin for ContractCheck
impl UnsafeUnpin for ContractCheck
impl UnwindSafe for ContractCheck
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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