pub struct CheckResult {
pub name: String,
pub passed: bool,
pub credentials_allowed: bool,
pub exit_code: Option<i64>,
pub output_tail: String,
pub duration_ms: u64,
pub timed_out: bool,
pub deadline_clamped: bool,
}Expand description
Result of evaluating one ContractCheck.
Fields§
§name: String§passed: bool§credentials_allowed: boolWhether this check ran under the contract’s credential opt-in.
Persisted with every result so a reviewer does not have to infer the effective policy from a mutable contract definition.
exit_code: Option<i64>None when the command could not run at all (spawn/policy failure).
output_tail: StringTail of combined stdout+stderr — enough for repair prompts and the UI.
duration_ms: u64§timed_out: boolThe command was killed at a timeout instead of exiting on its own.
Additive and serde(default), so results persisted before this field
existed still deserialize.
deadline_clamped: boolThe timeout it was killed at was the SESSION’s remaining budget, not the
check’s own effective ceiling — see [deadline_set_the_timeout], which
is where “effective” is load-bearing: the ceiling is
min(timeout_secs, max_check_timeout_secs), not the declared
timeout_secs.
Implementations§
Source§impl CheckResult
impl CheckResult
Sourcepub fn starved_by_deadline(&self) -> bool
pub fn starved_by_deadline(&self) -> bool
This result is not a verdict on the work: the check was killed by the session clock before it could reach one.
Anyone deciding what to book a red gate as has to ask this first. A
starved check says nothing about whether the change is correct — it says
the run was out of time — so scoring it as a task loss books a budget
decision against the model. Both bits are needed to tell them apart: a
check that blew its OWN timeout_secs is a genuine red (a hang is a
defect), and only one clamped down to the session’s leftover seconds is
starved.
Trait Implementations§
Source§impl Clone for CheckResult
impl Clone for CheckResult
Source§impl Debug for CheckResult
impl Debug for CheckResult
Source§impl<'de> Deserialize<'de> for CheckResult
impl<'de> Deserialize<'de> for CheckResult
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 CheckResult
impl PartialEq for CheckResult
Source§impl Serialize for CheckResult
impl Serialize for CheckResult
impl StructuralPartialEq for CheckResult
Auto Trait Implementations§
impl Freeze for CheckResult
impl RefUnwindSafe for CheckResult
impl Send for CheckResult
impl Sync for CheckResult
impl Unpin for CheckResult
impl UnsafeUnpin for CheckResult
impl UnwindSafe for CheckResult
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