Skip to main content

AwaitingDevFixEvent

Enum AwaitingDevFixEvent 

Source
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)

  1. Terminal failure detected (e.g., AgentChainExhausted)
  2. Reducer transitions to AwaitingDevFix phase
  3. DevFixTriggered event emitted
  4. Development agent invoked with failure context
  5. DevFixCompleted event emitted (attempt count incremented, level set)
  6. RecoveryAttempted event transitions back to failed phase
  7. Recovery attempt (retry same operation, or escalate to phase reset, etc.)
  8. 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
  9. 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: PipelinePhase

Phase where the failure occurred.

§failed_role: AgentRole

Agent role that failed.

§

DevFixSkipped

Dev-fix flow was skipped (not yet implemented or disabled).

Fields

§reason: String

Reason for skipping.

§

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

§success: bool

Whether the fix attempt succeeded.

§summary: Option<String>

Optional summary of what was fixed.

§

DevFixAgentUnavailable

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.

Fields

§failed_phase: PipelinePhase

Phase where the failure occurred.

§reason: String

Reason for unavailability.

§

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.

Fields

§is_failure: bool

Whether this is a failure completion (true) or success (false).

§

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

§is_failure: bool

Whether this is a failure completion (true) or success (false).

§error: String

Error message from the underlying workspace write.

§

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

§level: u32

The recovery escalation level being attempted (1-4).

§attempt_count: u32

Number of recovery attempts so far for this failure.

§target_phase: PipelinePhase

Phase 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

§from_level: u32

Previous escalation level.

§to_level: u32

New escalation level.

§reason: String

Reason for escalation.

§

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).

Fields

§level: u32

The escalation level that succeeded.

§total_attempts: u32

Total attempts before success.

Trait Implementations§

Source§

impl Clone for AwaitingDevFixEvent

Source§

fn clone(&self) -> AwaitingDevFixEvent

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 AwaitingDevFixEvent

Source§

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

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

impl<'de> Deserialize<'de> for AwaitingDevFixEvent

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 AwaitingDevFixEvent

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