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: u32Number of development iterations started.
Incremented on DevelopmentEvent::IterationStarted (not on continuations).
dev_iterations_completed: u32Number 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: u32Total number of developer agent invocations (includes continuations).
dev_continuation_attempt: u32Current continuation attempt within the current development iteration (0 = initial). Reset when starting a new iteration.
analysis_attempts_total: u32Total number of analysis agent invocations across all iterations.
analysis_attempts_in_current_iteration: u32Analysis attempts in the current development iteration (reset per iteration).
review_passes_started: u32Number of review passes started.
Incremented on ReviewEvent::PassStarted when pass != previous_pass.
review_passes_completed: u32Number 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: u32Total number of reviewer agent invocations.
fix_runs_total: u32Total number of fix agent invocations.
fix_continuations_total: u32Total number of fix continuation attempts.
fix_continuation_attempt: u32Current 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: u32Current review pass number (for X/Y display).
xsd_retry_attempts_total: u32Total XSD retry attempts across all phases.
xsd_retry_planning: u32XSD retry attempts in planning phase.
xsd_retry_development: u32XSD retry attempts in development/analysis phase.
xsd_retry_review: u32XSD retry attempts in review phase.
xsd_retry_fix: u32XSD retry attempts in fix phase.
xsd_retry_commit: u32XSD retry attempts in commit phase.
same_agent_retry_attempts_total: u32Total same-agent retry attempts (for transient failures like timeout).
agent_fallbacks_total: u32Total agent fallback events.
model_fallbacks_total: u32Total model fallback events.
retry_cycles_started_total: u32Total retry cycles started (agent chain exhaustion + restart).
commits_created_total: u32Total commits created during the run.
max_dev_iterations: u32Maximum development iterations (from config, for X/Y display).
max_review_passes: u32Maximum review passes (from config, for X/Y display).
max_xsd_retry_count: u32Maximum XSD retry count (from config, for X/max display).
max_dev_continuation_count: u32Maximum development continuation count (from config, for X/max display).
max_fix_continuation_count: u32Maximum fix continuation count (from config, for X/max display).
max_same_agent_retry_count: u32Maximum same-agent retry count (from config, for X/max display).
Implementations§
Source§impl RunMetrics
impl RunMetrics
Sourcepub fn new(
max_dev_iterations: u32,
max_review_passes: u32,
continuation: &ContinuationState,
) -> Self
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
impl Clone for RunMetrics
Source§fn clone(&self) -> RunMetrics
fn clone(&self) -> RunMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RunMetrics
impl Debug for RunMetrics
Source§impl Default for RunMetrics
impl Default for RunMetrics
Source§fn default() -> RunMetrics
fn default() -> RunMetrics
Source§impl<'de> Deserialize<'de> for RunMetrics
impl<'de> Deserialize<'de> for RunMetrics
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 RunMetrics
impl PartialEq for RunMetrics
Source§impl Serialize for RunMetrics
impl Serialize for RunMetrics
impl Eq for RunMetrics
impl StructuralPartialEq for RunMetrics
Auto Trait Implementations§
impl Freeze for RunMetrics
impl RefUnwindSafe for RunMetrics
impl Send for RunMetrics
impl Sync for RunMetrics
impl Unpin for RunMetrics
impl UnwindSafe for RunMetrics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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