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
- Errors are events: All
Err()returns from effect handlers MUST contain events from this namespace, NOT strings. - Err() is a carrier: The
Err()mechanism just carries error events to the event loop; it doesn’t bypass the reducer. - Reducer owns recovery: The reducer processes error events identically to success events and decides recovery strategy.
- 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.
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
phase: PipelinePhaseThe phase where exhaustion occurred.
WorkspaceReadFailed
Workspace read failure that must be handled by the reducer.
WorkspaceWriteFailed
Workspace write failure that must be handled by the reducer.
WorkspaceCreateDirAllFailed
Workspace directory creation failure that must be handled by the reducer.
WorkspaceRemoveFailed
Workspace remove failure that must be handled by the reducer.
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.
Fields
kind: WorkspaceIoErrorKindAgentNotFound
Agent registry lookup failed (unknown agent).
PlanningInputsNotMaterialized
Planning inputs not materialized before preparing/invoking planning prompt.
DevelopmentInputsNotMaterialized
Development inputs not materialized before preparing/invoking development prompt.
CommitInputsNotMaterialized
Commit inputs not materialized before preparing commit prompt.
PlanningPromptMissing
Prepared planning prompt file missing/unreadable when invoking planning agent.
DevelopmentPromptMissing
Prepared development prompt file missing/unreadable when invoking development agent.
ReviewPromptMissing
Prepared review prompt file missing/unreadable when invoking review agent.
CommitPromptMissing
Prepared commit prompt file missing/unreadable when invoking commit agent.
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.
ValidatedPlanningMarkdownMissing
Missing validated planning markdown when writing .agent/PLAN.md.
ValidatedDevelopmentOutcomeMissing
Missing validated development outcome when applying/writing results.
ValidatedReviewOutcomeMissing
Missing validated review outcome when applying/writing results.
ValidatedFixOutcomeMissing
Missing validated fix outcome when applying fixes.
ValidatedCommitOutcomeMissing
Missing validated commit outcome when applying commit message outcome.
Trait Implementations§
Source§impl Clone for ErrorEvent
impl Clone for ErrorEvent
Source§fn clone(&self) -> ErrorEvent
fn clone(&self) -> ErrorEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ErrorEvent
impl Debug for ErrorEvent
Source§impl<'de> Deserialize<'de> for ErrorEvent
impl<'de> Deserialize<'de> for ErrorEvent
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 Display for ErrorEvent
impl Display for ErrorEvent
Source§impl Error for ErrorEvent
impl Error for ErrorEvent
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Auto Trait Implementations§
impl Freeze for ErrorEvent
impl RefUnwindSafe for ErrorEvent
impl Send for ErrorEvent
impl Sync for ErrorEvent
impl Unpin for ErrorEvent
impl UnwindSafe for ErrorEvent
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<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