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: StringDigest 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
impl ReviewRepairLoop
Sourcepub fn new(
lane_id: impl Into<String>,
pinned_input_digest: impl Into<String>,
bounds: ReviewRepairBounds,
policy: ReviewRepairPolicy,
) -> Self
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.
Sourcepub fn stop_reason(&self) -> Option<&StopReason>
pub fn stop_reason(&self) -> Option<&StopReason>
Whether the loop has stopped, and why.
Sourcepub fn begin_iteration(&mut self) -> Result<u32, ReviewRepairError>
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.
Sourcepub fn record_iteration(
&mut self,
receipt: IterationReceipt,
) -> Result<Option<StopReason>, ReviewRepairError>
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.
Sourcepub fn ratify(
&mut self,
approved: bool,
note: impl Into<String>,
) -> Result<&StopReason, ReviewRepairError>
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.
Sourcepub fn route_lines(&self) -> Vec<String>
pub fn route_lines(&self) -> Vec<String>
Every route this loop ran, in order, for the Workflow row and receipts.
Sourcepub fn budget_line(&self) -> String
pub fn budget_line(&self) -> String
One-line budget statement: what was used against what was allowed.
Trait Implementations§
Source§impl Clone for ReviewRepairLoop
impl Clone for ReviewRepairLoop
Source§fn clone(&self) -> ReviewRepairLoop
fn clone(&self) -> ReviewRepairLoop
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more