pub(super) enum ResumeEffect {
PersistImmediately(String),
FlushErrorLine(String),
FireRetry {
retry: RetryPayload,
held_error_line: Option<String>,
attempted_sid: String,
},
PublishDone,
EmitSessionOutcome {
outcome: SessionOutcome,
attempted_sid: String,
actual_sid: Option<String>,
},
}Expand description
What the caller must actually DO in response to an event — kept
separate from ResumeState so update() stays a pure function with
no I/O, fully exercisable in a unit test.
Variants§
PersistImmediately(String)
Persist line to the blockfile immediately — this was never a
resume-retry candidate (fresh spawn, or a generation that already
resolved), so today’s behavior (persist as soon as it arrives) is
unchanged.
FlushErrorLine(String)
No retry followed after all (never confirmed, or an explicit Stop overrode a confirmed one) — flush the held-back line now.
FireRetry
Fire the retry with this exact payload. held_error_line is
bundled here rather than pre-decided (dropped) by this module:
whether the line should actually be dropped depends on whether
the retry ITSELF successfully launches, which this pure function
has no way to know (that’s determined later, asynchronously, by
the caller’s own spawn attempt). The caller drops it on success
and flushes it on failure — see
persistent::PersistentSubprocessController::retry_after_resume_failure.
attempted_sid is the id that was just confirmed unreachable —
carried through so the caller can emit the eventual
EmitSessionOutcome itself once it knows whether recovery
succeeded (PR #2693 — this module can no longer decide that here).
PublishDone
Genuinely done, not retrying — publish the terminal status.
EmitSessionOutcome
A --resume <attempted_sid> attempt’s outcome just became
unambiguously known — surface it as a persisted transcript event
(not just a trace log line), so the pane’s scrollback can never
silently disagree with what the model actually has in context.
actual_sid is Some when the CLI reported a different session id
in the same breath that resolved this generation (the
SessionCaptured divergence case); None for the FireRetry path,
where no fresh sid is known yet — the retry hasn’t launched.
See SPEC_AGENT_PANE_HISTORY_ALIGNMENT_2026_08_05.md §2.1.
Trait Implementations§
Source§impl Clone for ResumeEffect
impl Clone for ResumeEffect
Source§fn clone(&self) -> ResumeEffect
fn clone(&self) -> ResumeEffect
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResumeEffect
impl Debug for ResumeEffect
Source§impl PartialEq for ResumeEffect
impl PartialEq for ResumeEffect
impl StructuralPartialEq for ResumeEffect
Auto Trait Implementations§
impl Freeze for ResumeEffect
impl RefUnwindSafe for ResumeEffect
impl Send for ResumeEffect
impl Sync for ResumeEffect
impl Unpin for ResumeEffect
impl UnsafeUnpin for ResumeEffect
impl UnwindSafe for ResumeEffect
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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