Skip to main content

ErrorEvent

Enum ErrorEvent 

Source
pub enum ErrorEvent {
Show 26 variants ReviewInputsNotMaterialized { pass: u32, }, PlanningContinuationNotSupported, ReviewContinuationNotSupported, FixContinuationNotSupported, CommitContinuationNotSupported, FixPromptMissing, AgentChainExhausted { role: AgentRole, phase: PipelinePhase, cycle: u32, }, WorkspaceReadFailed { path: String, kind: WorkspaceIoErrorKind, }, WorkspaceWriteFailed { path: String, kind: WorkspaceIoErrorKind, }, WorkspaceCreateDirAllFailed { path: String, kind: WorkspaceIoErrorKind, }, WorkspaceRemoveFailed { path: String, kind: WorkspaceIoErrorKind, }, GitAddAllFailed { kind: WorkspaceIoErrorKind, }, AgentNotFound { agent: String, }, PlanningInputsNotMaterialized { iteration: u32, }, DevelopmentInputsNotMaterialized { iteration: u32, }, CommitInputsNotMaterialized { attempt: u32, }, PlanningPromptMissing { iteration: u32, }, DevelopmentPromptMissing { iteration: u32, }, ReviewPromptMissing { pass: u32, }, CommitPromptMissing { attempt: u32, }, CommitAgentNotInitialized { attempt: u32, }, ValidatedPlanningMarkdownMissing { iteration: u32, }, ValidatedDevelopmentOutcomeMissing { iteration: u32, }, ValidatedReviewOutcomeMissing { pass: u32, }, ValidatedFixOutcomeMissing { pass: u32, }, ValidatedCommitOutcomeMissing { attempt: u32, },
}
Expand description

Error events for failures requiring reducer handling.

Effect handlers communicate failures by returning Err() containing error events from this namespace. The event loop extracts these error events and feeds them to the reducer for processing, just like success events.

§Usage

Effect handlers return error events through Err():

return Err(ErrorEvent::ReviewInputsNotMaterialized { pass }.into());

The event loop extracts the error event and feeds it to the reducer.

§Principles

  1. Errors are events: All Err() returns from effect handlers MUST contain events from this namespace, NOT strings.
  2. Err() is a carrier: The Err() mechanism just carries error events to the event loop; it doesn’t bypass the reducer.
  3. Reducer owns recovery: The reducer processes error events identically to success events and decides recovery strategy.
  4. Typed, not strings: String errors prevent the reducer from handling different failure modes appropriately.

Variants§

§

ReviewInputsNotMaterialized

Review inputs not materialized before prepare_review_prompt.

This indicates an effect sequencing bug where prepare_review_prompt was called without first materializing the review inputs via materialize_review_inputs.

Fields

§pass: u32

The review pass number.

§

PlanningContinuationNotSupported

Planning does not support continuation prompts.

This is an invariant violation - continuation mode should not be passed to the planning phase.

§

ReviewContinuationNotSupported

Review does not support continuation prompts.

This is an invariant violation - continuation mode should not be passed to the review phase.

§

FixContinuationNotSupported

Fix does not support continuation prompts.

This is an invariant violation - continuation mode should not be passed to the fix flow.

§

CommitContinuationNotSupported

Commit message generation does not support continuation prompts.

This is an invariant violation - continuation mode should not be passed to the commit phase.

§

FixPromptMissing

Missing fix prompt file when invoking fix agent.

This indicates an effect sequencing bug where invoke_fix was called without first preparing the fix prompt file at .agent/tmp/fix_prompt.txt.

§

AgentChainExhausted

Agent chain exhausted for a phase.

This indicates that all retry attempts have been exhausted for an agent chain in a specific phase. The reducer decides whether to terminate the pipeline or attempt recovery based on whether progress has been made.

Fields

§role: AgentRole

The role of the agent chain that was exhausted.

§phase: PipelinePhase

The phase where exhaustion occurred.

§cycle: u32

The retry cycle number when exhaustion occurred.

§

WorkspaceReadFailed

Workspace read failure that must be handled by the reducer.

Fields

§path: String

Workspace-relative path.

§

WorkspaceWriteFailed

Workspace write failure that must be handled by the reducer.

Fields

§path: String

Workspace-relative path.

§

WorkspaceCreateDirAllFailed

Workspace directory creation failure that must be handled by the reducer.

Fields

§path: String

Workspace-relative path.

§

WorkspaceRemoveFailed

Workspace remove failure that must be handled by the reducer.

Fields

§path: String

Workspace-relative path.

§

GitAddAllFailed

Failed to stage changes before creating a commit.

Commit creation requires staging (equivalent to git add -A). When this fails, the error must flow through the reducer as a typed event so the reducer can decide whether to retry, fallback, or terminate.

§

AgentNotFound

Agent registry lookup failed (unknown agent).

Fields

§agent: String
§

PlanningInputsNotMaterialized

Planning inputs not materialized before preparing/invoking planning prompt.

Fields

§iteration: u32
§

DevelopmentInputsNotMaterialized

Development inputs not materialized before preparing/invoking development prompt.

Fields

§iteration: u32
§

CommitInputsNotMaterialized

Commit inputs not materialized before preparing commit prompt.

Fields

§attempt: u32
§

PlanningPromptMissing

Prepared planning prompt file missing/unreadable when invoking planning agent.

Fields

§iteration: u32
§

DevelopmentPromptMissing

Prepared development prompt file missing/unreadable when invoking development agent.

Fields

§iteration: u32
§

ReviewPromptMissing

Prepared review prompt file missing/unreadable when invoking review agent.

Fields

§pass: u32
§

CommitPromptMissing

Prepared commit prompt file missing/unreadable when invoking commit agent.

Fields

§attempt: u32
§

CommitAgentNotInitialized

Commit agent chain not initialized when invoking commit agent.

This is an invariant violation: InitializeAgentChain must run before invoking. Effect handlers must surface this as a typed error event (never panic) so the reducer can deterministically interrupt/checkpoint.

Fields

§attempt: u32
§

ValidatedPlanningMarkdownMissing

Missing validated planning markdown when writing .agent/PLAN.md.

Fields

§iteration: u32
§

ValidatedDevelopmentOutcomeMissing

Missing validated development outcome when applying/writing results.

Fields

§iteration: u32
§

ValidatedReviewOutcomeMissing

Missing validated review outcome when applying/writing results.

Fields

§pass: u32
§

ValidatedFixOutcomeMissing

Missing validated fix outcome when applying fixes.

Fields

§pass: u32
§

ValidatedCommitOutcomeMissing

Missing validated commit outcome when applying commit message outcome.

Fields

§attempt: u32

Trait Implementations§

Source§

impl Clone for ErrorEvent

Source§

fn clone(&self) -> ErrorEvent

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 ErrorEvent

Source§

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

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

impl<'de> Deserialize<'de> for ErrorEvent

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 Display for ErrorEvent

Source§

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

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

impl Error for ErrorEvent

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl Serialize for ErrorEvent

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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>,