pub struct RunMeta {Show 16 fields
pub run_id: String,
pub agent_id: String,
pub client_id: String,
pub active_client_id: String,
pub resume_predecessor_client_id: Option<String>,
pub intent: String,
pub outcome_description: Option<String>,
pub started_at: DateTime<Utc>,
pub termination: Option<RunTermination>,
pub ended_at: Option<DateTime<Utc>>,
pub turns: Vec<RunRecord>,
pub start_committed: bool,
pub pending_terminal: Option<RunEnded>,
pub cancellation_pending: Option<RunCancellationRequested>,
pub cancellation_receipt: Option<RunCancelResponse>,
pub trace_corruption: Option<String>,
/* private fields */
}Expand description
Daemon-side record of a single agent run (agent run tracing, U1).
Keyed by run_id in the process-wide ServerState::runs registry
so the record survives the WS connection that produced it — needed
both for the disconnect grace window (R5) and so the disk store (U3)
can flush a run even after its session is gone. U1 keeps this purely
in memory; persistence is U3.
Fields§
§run_id: String§agent_id: StringOwning agent. Set at runs.start from the resolved id; used by
the read RPCs’ ownership check (U5/KTD10) and the disk key (U3).
client_id: StringImmutable WS client_id that durably called runs.start. This remains
the provenance identity written to RunStarted, proposal receipts, and
RunEnded, even if an authenticated replacement socket resumes the
in-memory run.
active_client_id: StringThe one live socket currently authorized to continue the run. Equal to
client_id for a fresh run; changed only by authenticated orphan
reclaim after the previous owner has disappeared from sessions.
resume_predecessor_client_id: Option<String>Stable predecessor returned by an idempotent runs.resume retry on the
winning replacement socket.
intent: String§outcome_description: Option<String>§started_at: DateTime<Utc>§termination: Option<RunTermination>None while the run is in progress; Some once a terminal
record (a reported outcome or an Incomplete marker) is
written. The presence of this field is the “is this run still
open?” signal the grace window checks.
ended_at: Option<DateTime<Utc>>When the terminal record was written, if any.
turns: Vec<RunRecord>The ordered per-turn trace recorded for this run (agent run
tracing, U2). Each entry is a car_proto::RunRecord::Turn
produced by the recorder from a submitted proposal + its
ActionResults. U1 leaves this empty; the U2 recorder appends to
it via ServerState::record_run_turns. U3 flushes this buffer
to disk and U4 broadcasts it — both read it through
ServerState::run_turns. The turn.index field is monotonic
across the run’s proposals, so this Vec is the clean ordered
stream those units consume.
start_committed: boolTrue only after the exact RunStarted row reached flush+fsync and the authenticated run_started journal event received the same durability acknowledgement. A reserved-but-uncommitted run blocks all proposal writes and can only be resumed by its owning client.
pending_terminal: Option<RunEnded>Stable terminal transaction preimage retained across a failed RunStore or journal durability boundary. Retries must present the same RunTermination and finish this exact RunEnded; a conflicting terminal is rejected.
cancellation_pending: Option<RunCancellationRequested>Durable cancellation request. Presence quarantines new proposals and
runs.complete until CAR either confirms a Cancelled terminal or an
operator independently resolves the unconfirmed stop.
cancellation_receipt: Option<RunCancelResponse>Stable response for same-key idempotent retries.
trace_corruption: Option<String>Stable fail-closed error once the durable JSONL is known corrupt. A quarantined run accepts no more proposals/turns, cannot complete, and cannot install or retain live subscribers.
Implementations§
Source§impl RunMeta
impl RunMeta
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
True once a terminal record (outcome or Incomplete) is set.
pub fn accepts_proposals(&self) -> bool
Sourcepub fn live_status(&self) -> RunLiveStatus
pub fn live_status(&self) -> RunLiveStatus
The coarse live status of this run for the U4 subscribe snapshot /
runs.trace.event (agent run tracing). Mirrors RunStore’s
RunStatus but reads off the in-memory RunMeta so the live path
never touches disk.
Sourcepub fn turn_cursor(&self) -> usize
pub fn turn_cursor(&self) -> usize
Count of RunRecord::Turn entries in this run’s buffer — the live
turn cursor. Equals turns.len() because the buffer holds only
Turn records (Started/Ended are not buffered here).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RunMeta
impl RefUnwindSafe for RunMeta
impl Send for RunMeta
impl Sync for RunMeta
impl Unpin for RunMeta
impl UnsafeUnpin for RunMeta
impl UnwindSafe for RunMeta
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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