pub(super) enum ResumeState {
NotTracking {
current_generation: u64,
},
AwaitingOutcome {
generation: u64,
attempted_sid: String,
retry: RetryPayload,
held_error_line: Option<String>,
stop_requested: bool,
},
ConfirmedRetry {
generation: u64,
attempted_sid: String,
retry: RetryPayload,
held_error_line: Option<String>,
stop_requested: bool,
},
}Expand description
One spawn attempt’s resume/error-line lifecycle.
Variants§
NotTracking
No --resume attempt is in flight for the current generation —
either this spawn never attached --resume, or a prior attempt
already resolved (session id captured, retry fired, or exited
with an unrelated error). current_generation is whichever
generation this resolved FROM (or 0 if no spawn has ever
happened — see Default below). reagentx P1 (round 5 on PR
#2373): without this, NotTracking couldn’t tell a legitimate
ProcessExited for the generation that just resolved apart from
a STALE one for an already-superseded older generation, letting
the older one incorrectly publish terminal status over a newer,
actively-running generation. See ProcessExited’s handling below.
AwaitingOutcome
--resume <attempted_sid> was attached at spawn; outcome not yet
known. held_error_line is Some once a terminal
result/is_error:true stdout line has arrived but its
persistence is still undecided. stop_requested records an
explicit user Stop that must override a retry even if one gets
confirmed later.
Fields
retry: RetryPayloadConfirmedRetry
The stderr reader confirmed attempted_sid unreachable under the
current config dir — the retry WILL fire the moment the process
actually exits, unless stop_requested overrides it.
reagentx P1 (round 9 on this PR, also flagged inline by codex):
attempted_sid is carried forward from AwaitingOutcome (not
dropped at promotion) so SessionCaptured can still tell an
ambiguous same-sid echo apart from unambiguous progress even
after confirmation — see that arm’s own doc comment for why
treating EVERY capture as unambiguous once confirmed was wrong:
resume_poisoned (persistent/mod.rs) is a single, non-generation-
scoped, permanent field, so a lagging stderr-reader task from an
OLDER, already-superseded generation can overwrite it to a
different sid while THIS generation is still ConfirmedRetry,
silently disabling try_capture_session_id’s poison guard for
this generation’s own attempted sid and letting a routine
same-sid echo reach this arm.
Implementations§
Source§impl ResumeState
impl ResumeState
Sourcepub(super) fn is_seeded_message(
&self,
generation: u64,
delivered_seq: u64,
) -> bool
pub(super) fn is_seeded_message( &self, generation: u64, delivered_seq: u64, ) -> bool
Read-only accessor for the drain: is delivered_seq the exact
message spawn_process originally seeded the retry batch with
(its first entry), for the given generation? Used to identify
the already-recorded seed before appending any LATER message the
drain delivers. Matched by queue identity (QueuedRetryEntry::seq),
neither by position (see
PersistentSubprocessController::drain_queue_after_successful_spawn’s
own doc comment for why the front of the queue isn’t necessarily
the seed) nor by content (issue #2365 — a later, genuinely
different delivery sharing identical text must not be mistaken
for the seed).
Trait Implementations§
Source§impl Clone for ResumeState
impl Clone for ResumeState
Source§fn clone(&self) -> ResumeState
fn clone(&self) -> ResumeState
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 ResumeState
impl Debug for ResumeState
Source§impl Default for ResumeState
impl Default for ResumeState
Source§impl PartialEq for ResumeState
impl PartialEq for ResumeState
impl StructuralPartialEq for ResumeState
Auto Trait Implementations§
impl Freeze for ResumeState
impl RefUnwindSafe for ResumeState
impl Send for ResumeState
impl Sync for ResumeState
impl Unpin for ResumeState
impl UnsafeUnpin for ResumeState
impl UnwindSafe for ResumeState
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