pub struct ActiveSeat {
pub node: String,
pub started_at: Timestamp,
pub timeout_secs: u64,
pub attempt: usize,
}Expand description
A seat currently mid-answer: a prompt was sent and no reply has landed yet.
This is not the whole story of “is it alive” — a daemon killed mid-wave
leaves its last wave’s entries here forever, since nothing ran to clear
them. A reader must cross-check a live daemon’s heartbeat
(daemon::is_working_on) before trusting one of these as “still running”
rather than “abandoned”. RunState::clear_active is what keeps that
leftover from surviving into the next attempt at this run: execute calls
it before doing anything else, so a resumed run never carries a stale
entry into its own report before the next wave repopulates it.
Deliberately carries no agent id: an implementer’s agent is no secret, but
a judge or reviewer seat is blind (SeatState::key is keyed by seat, never
agent, for exactly this reason), and this struct has no way to tell which
kind of seat it describes. The seat key alone — already in the map this
lives under — is what every caller needs to say which seat is running.
Fields§
§node: StringNode the seat is answering for, e.g. implement, judge, review.
started_at: TimestampWhen this attempt was sent.
timeout_secs: u64The CLI’s wall-clock budget for this attempt.
attempt: usize0 for the first ask, N for the Nth nudge or resume.
Implementations§
Source§impl ActiveSeat
impl ActiveSeat
Sourcepub fn elapsed_secs(&self, now: Timestamp) -> i64
pub fn elapsed_secs(&self, now: Timestamp) -> i64
Seconds since this attempt was sent.
Sourcepub fn remaining_secs(&self, now: Timestamp) -> i64
pub fn remaining_secs(&self, now: Timestamp) -> i64
Seconds left before this attempt’s own timeout fires, floored at zero rather than going negative once the CLI has overrun its budget.
Trait Implementations§
Source§impl Clone for ActiveSeat
impl Clone for ActiveSeat
Source§fn clone(&self) -> ActiveSeat
fn clone(&self) -> ActiveSeat
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 ActiveSeat
impl Debug for ActiveSeat
Source§impl<'de> Deserialize<'de> for ActiveSeat
impl<'de> Deserialize<'de> for ActiveSeat
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 ActiveSeat
impl RefUnwindSafe for ActiveSeat
impl Send for ActiveSeat
impl Sync for ActiveSeat
impl Unpin for ActiveSeat
impl UnsafeUnpin for ActiveSeat
impl UnwindSafe for ActiveSeat
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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