Skip to main content

RunMetrics

Struct RunMetrics 

Source
pub struct RunMetrics {
Show 30 fields pub dev_iterations_started: u32, pub dev_iterations_completed: u32, pub dev_attempts_total: u32, pub dev_continuation_attempt: u32, pub analysis_attempts_total: u32, pub analysis_attempts_in_current_iteration: u32, pub review_passes_started: u32, pub review_passes_completed: u32, pub review_runs_total: u32, pub fix_runs_total: u32, pub fix_continuations_total: u32, pub fix_continuation_attempt: u32, pub current_review_pass: u32, pub xsd_retry_attempts_total: u32, pub xsd_retry_planning: u32, pub xsd_retry_development: u32, pub xsd_retry_review: u32, pub xsd_retry_fix: u32, pub xsd_retry_commit: u32, pub same_agent_retry_attempts_total: u32, pub agent_fallbacks_total: u32, pub model_fallbacks_total: u32, pub retry_cycles_started_total: u32, pub commits_created_total: u32, pub max_dev_iterations: u32, pub max_review_passes: u32, pub max_xsd_retry_count: u32, pub max_dev_continuation_count: u32, pub max_fix_continuation_count: u32, pub max_same_agent_retry_count: u32,
}
Expand description

Run-level execution metrics tracked by the reducer.

This struct provides a complete picture of pipeline execution progress, including iteration counts, attempt counts, retry counts, and fallback events. All fields are monotonic counters that only increment during a run.

§Checkpoint Compatibility

All fields have #[serde(default)] to ensure backward compatibility when loading checkpoints created before metrics were added or when new fields are introduced in future versions.

§Single Source of Truth

The reducer is the only code that mutates these metrics. They are updated deterministically based on events, ensuring:

  • Metrics survive checkpoint/resume
  • No drift between runtime state and actual progress
  • Final summary is always consistent with reducer state

Fields§

§dev_iterations_started: u32

Number of development iterations started. Incremented on DevelopmentEvent::IterationStarted (not on continuations).

§dev_iterations_completed: u32

Number of development iterations completed (advanced to commit phase). A dev iteration is “completed” when the reducer transitions to PipelinePhase::CommitMessage after dev output is valid, regardless of whether an actual git commit is created. Incremented on DevelopmentEvent::IterationCompleted { output_valid: true } and DevelopmentEvent::ContinuationSucceeded.

§dev_attempts_total: u32

Total number of developer agent invocations (includes continuations).

§dev_continuation_attempt: u32

Current continuation attempt within the current development iteration (0 = initial). Reset when starting a new iteration.

§analysis_attempts_total: u32

Total number of analysis agent invocations across all iterations.

§analysis_attempts_in_current_iteration: u32

Analysis attempts in the current development iteration (reset per iteration).

§review_passes_started: u32

Number of review passes started. Incremented on ReviewEvent::PassStarted when pass != previous_pass.

§review_passes_completed: u32

Number of review passes completed (advanced past without issues or after fixes). A review pass is “completed” when it advances to the next pass or to commit phase, either because no issues were found or because fixes were successfully applied. Incremented on ReviewEvent::Completed { issues_found: false }, ReviewEvent::PassCompletedClean, and ReviewEvent::FixAttemptCompleted.

§review_runs_total: u32

Total number of reviewer agent invocations.

§fix_runs_total: u32

Total number of fix agent invocations.

§fix_continuations_total: u32

Total number of fix continuation attempts.

§fix_continuation_attempt: u32

Current fix continuation attempt within the current review pass (0 = initial).

Reset when starting a new review pass. Note: fix-attempt boundaries do not reset this counter; it is scoped to the review pass.

§current_review_pass: u32

Current review pass number (for X/Y display).

§xsd_retry_attempts_total: u32

Total XSD retry attempts across all phases.

§xsd_retry_planning: u32

XSD retry attempts in planning phase.

§xsd_retry_development: u32

XSD retry attempts in development/analysis phase.

§xsd_retry_review: u32

XSD retry attempts in review phase.

§xsd_retry_fix: u32

XSD retry attempts in fix phase.

§xsd_retry_commit: u32

XSD retry attempts in commit phase.

§same_agent_retry_attempts_total: u32

Total same-agent retry attempts (for transient failures like timeout).

§agent_fallbacks_total: u32

Total agent fallback events.

§model_fallbacks_total: u32

Total model fallback events.

§retry_cycles_started_total: u32

Total retry cycles started (agent chain exhaustion + restart).

§commits_created_total: u32

Total commits created during the run.

§max_dev_iterations: u32

Maximum development iterations (from config, for X/Y display).

§max_review_passes: u32

Maximum review passes (from config, for X/Y display).

§max_xsd_retry_count: u32

Maximum XSD retry count (from config, for X/max display).

§max_dev_continuation_count: u32

Maximum development continuation count (from config, for X/max display).

§max_fix_continuation_count: u32

Maximum fix continuation count (from config, for X/max display).

§max_same_agent_retry_count: u32

Maximum same-agent retry count (from config, for X/max display).

Implementations§

Source§

impl RunMetrics

Source

pub fn new( max_dev_iterations: u32, max_review_passes: u32, continuation: &ContinuationState, ) -> Self

Create metrics with config-derived display fields.

Trait Implementations§

Source§

impl Clone for RunMetrics

Source§

fn clone(&self) -> RunMetrics

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for RunMetrics

Source§

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

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

impl Default for RunMetrics

Source§

fn default() -> RunMetrics

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for RunMetrics

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 PartialEq for RunMetrics

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for RunMetrics

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 Eq for RunMetrics

Source§

impl StructuralPartialEq for RunMetrics

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<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
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.
Source§

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