Skip to main content

ReviewRepairLoop

Struct ReviewRepairLoop 

Source
pub struct ReviewRepairLoop {
    pub lane_id: String,
    pub bounds: ReviewRepairBounds,
    pub policy: ReviewRepairPolicy,
    pub pinned_input_digest: String,
    pub iterations: Vec<IterationReceipt>,
    pub elapsed_secs: u64,
    pub tool_calls_used: u32,
    pub stopped: Option<StopReason>,
}
Expand description

A bounded review→repair loop over one lane’s artifact.

Fields§

§lane_id: String§bounds: ReviewRepairBounds§policy: ReviewRepairPolicy§pinned_input_digest: String

Digest of the artifact this loop was authorized to work on.

§iterations: Vec<IterationReceipt>§elapsed_secs: u64§tool_calls_used: u32§stopped: Option<StopReason>

Implementations§

Source§

impl ReviewRepairLoop

Source

pub fn new( lane_id: impl Into<String>, pinned_input_digest: impl Into<String>, bounds: ReviewRepairBounds, policy: ReviewRepairPolicy, ) -> Self

Start a loop pinned to the digest of the artifact under review.

Source

pub fn stop_reason(&self) -> Option<&StopReason>

Whether the loop has stopped, and why.

Source

pub fn begin_iteration(&mut self) -> Result<u32, ReviewRepairError>

Claim the next iteration slot, or refuse.

Ceilings are checked here — before any model or tool spend — so a loop that has exhausted its budget cannot buy one more iteration to find out.

Source

pub fn record_iteration( &mut self, receipt: IterationReceipt, ) -> Result<Option<StopReason>, ReviewRepairError>

Record a completed iteration and decide whether the loop continues.

Returns Ok(None) when another iteration is warranted, Ok(Some(reason)) when the loop is done.

Source

pub fn ratify( &mut self, approved: bool, note: impl Into<String>, ) -> Result<&StopReason, ReviewRepairError>

Record the human decision a parked loop is waiting for.

Only a loop actually parked at StopReason::AwaitingRatification can be ratified: a loop that stopped at a ceiling, on stale input, or inconclusively cannot be waved through, because there is no clean result to approve.

Source

pub fn route_lines(&self) -> Vec<String>

Every route this loop ran, in order, for the Workflow row and receipts.

Source

pub fn budget_line(&self) -> String

One-line budget statement: what was used against what was allowed.

Trait Implementations§

Source§

impl Clone for ReviewRepairLoop

Source§

fn clone(&self) -> ReviewRepairLoop

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ReviewRepairLoop

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ReviewRepairLoop

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for ReviewRepairLoop

Source§

impl PartialEq for ReviewRepairLoop

Source§

fn eq(&self, other: &ReviewRepairLoop) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for ReviewRepairLoop

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ReviewRepairLoop

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.