Skip to main content

ReviewEvent

Enum ReviewEvent 

Source
pub enum ReviewEvent {
Show 30 variants PhaseStarted, PassStarted { pass: u32, }, ContextPrepared { pass: u32, }, PromptPrepared { pass: u32, }, AgentInvoked { pass: u32, }, IssuesXmlExtracted { pass: u32, }, IssuesXmlMissing { pass: u32, attempt: u32, error_detail: Option<String>, }, IssuesXmlValidated { pass: u32, issues_found: bool, clean_no_issues: bool, issues: Vec<String>, no_issues_found: Option<String>, }, IssuesMarkdownWritten { pass: u32, }, IssueSnippetsExtracted { pass: u32, }, IssuesXmlArchived { pass: u32, }, IssuesXmlCleaned { pass: u32, }, FixPromptPrepared { pass: u32, }, FixAgentInvoked { pass: u32, }, FixResultXmlExtracted { pass: u32, }, FixResultXmlMissing { pass: u32, attempt: u32, error_detail: Option<String>, }, FixResultXmlValidated { pass: u32, status: FixStatus, summary: Option<String>, }, FixResultXmlCleaned { pass: u32, }, FixOutcomeApplied { pass: u32, }, FixResultXmlArchived { pass: u32, }, Completed { pass: u32, issues_found: bool, }, FixAttemptStarted { pass: u32, }, FixAttemptCompleted { pass: u32, changes_made: bool, }, PhaseCompleted { early_exit: bool, }, PassCompletedClean { pass: u32, }, OutputValidationFailed { pass: u32, attempt: u32, error_detail: Option<String>, }, FixContinuationTriggered { pass: u32, status: FixStatus, summary: Option<String>, }, FixContinuationSucceeded { pass: u32, total_attempts: u32, }, FixContinuationBudgetExhausted { pass: u32, total_attempts: u32, last_status: FixStatus, }, FixOutputValidationFailed { pass: u32, attempt: u32, error_detail: Option<String>, },
}
Expand description

Review phase events.

Events related to code review passes and fix attempts. The review phase runs reviewer agents to identify issues and (by default) the same reviewer agent chain to apply any required fixes.

§State Transitions

  • PhaseStarted: Sets phase to Review, resets pass counter
  • PassStarted: Resets agent chain for the pass
  • Completed(issues_found=false): Advances to next pass or CommitMessage
  • Completed(issues_found=true): Triggers fix attempt
  • FixAttemptCompleted: Transitions to CommitMessage
  • PhaseCompleted: Transitions to CommitMessage

Variants§

§

PhaseStarted

Review phase has started.

§

PassStarted

A review pass has started.

Fields

§pass: u32

The pass number starting.

§

ContextPrepared

Review context prepared for a pass.

Emitted after Effect::PrepareReviewContext completes.

Fields

§pass: u32

The pass number the context was prepared for.

§

PromptPrepared

Review prompt prepared for a pass.

Emitted after Effect::PrepareReviewPrompt completes.

Fields

§pass: u32
§

AgentInvoked

Reviewer agent was invoked for a pass.

Emitted after Effect::InvokeReviewAgent completes.

Fields

§pass: u32
§

IssuesXmlExtracted

Review issues XML exists and was read successfully for the pass.

Emitted after Effect::ExtractReviewIssuesXml completes.

Fields

§pass: u32
§

IssuesXmlMissing

Review issues XML missing for the pass.

Emitted after Effect::ExtractReviewIssuesXml when the XML was absent.

Fields

§pass: u32
§attempt: u32

The invalid output attempt count.

§error_detail: Option<String>

Error detail if file read failed for a reason other than NotFound.

§

IssuesXmlValidated

Review issues XML validated for a pass.

This event is an observation: the XML was valid and the handler determined whether issues were found and whether this was an explicit clean-no-issues output.

Fields

§pass: u32
§issues_found: bool
§clean_no_issues: bool
§issues: Vec<String>
§no_issues_found: Option<String>
§

IssuesMarkdownWritten

ISSUES.md was written for a pass.

Fields

§pass: u32
§

IssueSnippetsExtracted

Review issue snippets were extracted for a pass.

Fields

§pass: u32
§

IssuesXmlArchived

Review issues XML archived for a pass.

Fields

§pass: u32
§

IssuesXmlCleaned

Review issues XML cleaned before invoking the reviewer agent.

Fields

§pass: u32
§

FixPromptPrepared

Fix prompt prepared for a review pass.

Fields

§pass: u32
§

FixAgentInvoked

Fix agent was invoked for a review pass.

Fields

§pass: u32
§

FixResultXmlExtracted

Fix result XML exists and was read successfully for the pass.

Fields

§pass: u32
§

FixResultXmlMissing

Fix result XML missing for the pass.

Fields

§pass: u32
§attempt: u32

The invalid output attempt count.

§error_detail: Option<String>

Detailed error message from file read failure (if not NotFound).

This field is populated when the file exists but cannot be read (e.g., permission denied, I/O error). It’s None for simple NotFound.

§

FixResultXmlValidated

Fix result XML validated for a pass.

Fields

§pass: u32
§status: FixStatus
§summary: Option<String>
§

FixResultXmlCleaned

Fix result XML cleaned before invoking the fix agent.

Fields

§pass: u32
§

FixOutcomeApplied

Fix outcome applied for a pass.

Fields

§pass: u32
§

FixResultXmlArchived

Fields

§pass: u32
§

Completed

A review pass completed with results.

Fields

§pass: u32

The pass number that completed.

§issues_found: bool

Whether issues were found requiring fixes.

§

FixAttemptStarted

A fix attempt for issues has started.

Fields

§pass: u32

The pass number this fix is for.

§

FixAttemptCompleted

A fix attempt completed.

Fields

§pass: u32

The pass number this fix was for.

§changes_made: bool

Whether changes were made.

§

PhaseCompleted

Review phase completed, all passes done.

Fields

§early_exit: bool

Whether the phase exited early (before all passes).

§

PassCompletedClean

Review pass found no issues - clean exit.

Emitted when a review pass completes with no issues found. This is distinct from Completed { issues_found: false } in that it explicitly signals a clean pass for UI/logging purposes.

Fields

§pass: u32

The pass number that completed.

§

OutputValidationFailed

Review output validation failed (XSD/XML parsing error).

Emitted when review output cannot be parsed. Reducer decides whether to retry or switch agents.

The error_detail field contains the formatted validation error that will be shown to the agent in the XSD retry prompt. This error should be actionable and guide the agent toward producing valid XML.

Fields

§pass: u32

The pass number.

§attempt: u32

Current invalid output attempt number.

§error_detail: Option<String>

Detailed error message from XSD validation, formatted for AI retry.

This is the output of XsdValidationError::format_for_ai_retry() and includes:

  • Error type and location
  • What was expected vs. what was found
  • Actionable suggestions for fixing
  • Examples of correct format
§

FixContinuationTriggered

Fix attempt completed with incomplete status, needs continuation.

Emitted when fix output is valid XML but indicates work is not complete (status is “issues_remain”). Triggers a continuation with new session.

Fields

§pass: u32

The pass number this fix was for.

§status: FixStatus

Status from the agent (typically IssuesRemain).

§summary: Option<String>

Summary of what was accomplished.

§

FixContinuationSucceeded

Fix continuation succeeded after multiple attempts.

Emitted when a fix continuation finally reaches a complete state (all_issues_addressed or no_issues_found).

Fields

§pass: u32

The pass number this fix was for.

§total_attempts: u32

Total number of continuation attempts it took.

Note: This field is not used by the reducer for state transitions, but is kept for observability (event logs, checkpoint serialization, debugging).

§

FixContinuationBudgetExhausted

Fix continuation budget exhausted.

Emitted when fix continuations have been exhausted without reaching a complete state. Policy decides whether to proceed to commit or abort.

Fields

§pass: u32

The pass number this fix was for.

§total_attempts: u32

Total number of continuation attempts made.

§last_status: FixStatus

The last status received (typically IssuesRemain).

§

FixOutputValidationFailed

Fix output validation failed (XSD/XML parsing error).

Emitted when fix output cannot be parsed. Reducer decides whether to retry or switch agents.

Fields

§pass: u32

The pass number this fix was for.

§attempt: u32

Current invalid output attempt number.

§error_detail: Option<String>

Detailed error message from XSD validation, formatted for AI retry.

This is the output of XsdValidationError::format_for_ai_retry() and includes:

  • Error type and location
  • What was expected vs. what was found
  • Actionable suggestions for fixing
  • Examples of correct format

Trait Implementations§

Source§

impl Clone for ReviewEvent

Source§

fn clone(&self) -> ReviewEvent

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 ReviewEvent

Source§

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

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

impl<'de> Deserialize<'de> for ReviewEvent

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 Serialize for ReviewEvent

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

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> 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>,