pub enum AwaitingDevFixEvent {
DevFixTriggered {
failed_phase: PipelinePhase,
failed_role: AgentRole,
},
DevFixSkipped {
reason: String,
},
DevFixCompleted {
success: bool,
summary: Option<String>,
},
DevFixAgentUnavailable {
failed_phase: PipelinePhase,
reason: String,
},
CompletionMarkerEmitted {
is_failure: bool,
},
CompletionMarkerWriteFailed {
is_failure: bool,
error: String,
},
RecoveryAttempted {
level: u32,
attempt_count: u32,
target_phase: PipelinePhase,
},
RecoveryEscalated {
from_level: u32,
to_level: u32,
reason: String,
},
RecoverySucceeded {
level: u32,
total_attempts: u32,
},
}Expand description
Events for AwaitingDevFix phase.
This phase handles pipeline failure remediation with escalating recovery strategies.
§When This Occurs
The AwaitingDevFix phase is entered when the pipeline encounters a terminal
failure condition (e.g., agent chain exhausted) in any phase. The pipeline
implements an aggressive recovery system with escalating strategies rather
than immediate termination.
§State Flow (Updated)
- Terminal failure detected (e.g.,
AgentChainExhausted) - Reducer transitions to
AwaitingDevFixphase DevFixTriggeredevent emitted- Development agent invoked with failure context
DevFixCompletedevent emitted (attempt count incremented, level set)RecoveryAttemptedevent transitions back to failed phase- Recovery attempt (retry same operation, or escalate to phase reset, etc.)
- If recovery fails, repeat steps 3-7 with escalating strategies:
- Level 1 (attempts 1-3): Retry same operation
- Level 2 (attempts 4-6): Reset to phase start
- Level 3 (attempts 7-9): Reset iteration counter
- Level 4 (attempts 10+): Reset to iteration 0
- Recovery is intentionally non-terminating for unattended operation. Completion markers / termination are reserved for explicit safety valve or catastrophic external paths (not attempt-count based escalation).
§Emitted By
- Dev-fix flow handlers in
handler/lifecycle.rs - Recovery handlers in
handler/context.rs - Completion marker handlers
Variants§
DevFixTriggered
Dev-fix flow was triggered.
Emitted when entering the dev-fix phase. Records which phase and agent failed, providing context for the development agent.
Fields
failed_phase: PipelinePhasePhase where the failure occurred.
DevFixSkipped
Dev-fix flow was skipped (not yet implemented or disabled).
DevFixCompleted
Dev-fix flow completed (may or may not have fixed the issue).
Emitted after the development agent finishes its fix attempt.
The success field indicates whether the agent believes it fixed
the issue, but does not guarantee the pipeline will succeed on retry.
Fields
Dev-fix agent is unavailable (quota/usage limit).
Emitted when the dev-fix agent cannot be invoked due to resource limits. The pipeline stays in the recovery loop without a fix attempt so unattended execution remains non-terminating by default.
CompletionMarkerEmitted
Completion marker was emitted to filesystem.
Emitted after writing the completion marker to .agent/tmp/completion_marker.
The reducer uses this event to transition from AwaitingDevFix to Interrupted,
enabling the pipeline to complete gracefully.
CompletionMarkerWriteFailed
Completion marker failed to write to filesystem.
This event is emitted when EmitCompletionMarkerAndTerminate attempts to write
.agent/tmp/completion_marker but the workspace write fails.
The reducer must NOT transition to Interrupted in this case so orchestration can retry marker emission deterministically.
Fields
RecoveryAttempted
Recovery attempt initiated at a specific escalation level.
Emitted when the dev-fix completes and the pipeline is ready to retry. The escalation level determines the recovery strategy.
Fields
target_phase: PipelinePhasePhase to resume work in after applying recovery policy.
This is carried from the effect parameters so the reducer does not
need to trust potentially-stale failed_phase_for_recovery when
applying the reset.
RecoveryEscalated
Recovery escalated to a higher level.
Emitted when a recovery attempt fails and we escalate to a more aggressive recovery strategy (e.g., from retry → phase reset).
Fields
RecoverySucceeded
Recovery succeeded - pipeline can resume normal operation.
Emitted when a recovery attempt successfully fixes the issue (e.g., the retry succeeds, or the reset phase completes).
Trait Implementations§
Source§impl Clone for AwaitingDevFixEvent
impl Clone for AwaitingDevFixEvent
Source§fn clone(&self) -> AwaitingDevFixEvent
fn clone(&self) -> AwaitingDevFixEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AwaitingDevFixEvent
impl Debug for AwaitingDevFixEvent
Source§impl<'de> Deserialize<'de> for AwaitingDevFixEvent
impl<'de> Deserialize<'de> for AwaitingDevFixEvent
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>,
Auto Trait Implementations§
impl Freeze for AwaitingDevFixEvent
impl RefUnwindSafe for AwaitingDevFixEvent
impl Send for AwaitingDevFixEvent
impl Sync for AwaitingDevFixEvent
impl Unpin for AwaitingDevFixEvent
impl UnsafeUnpin for AwaitingDevFixEvent
impl UnwindSafe for AwaitingDevFixEvent
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