pub struct RunRecord {Show 19 fields
pub trigger: String,
pub slot: Option<DateTime<Utc>>,
pub started_at: DateTime<Utc>,
pub finished_at: Option<DateTime<Utc>>,
pub status: RunStatus,
pub session_id: Option<String>,
pub turns: u32,
pub cost_usd: Option<f64>,
pub blocked_sends: u32,
pub staged: u32,
pub taint: Taint,
pub tool_calls: u32,
pub tool_errors: u32,
pub ended_on_failed_call: bool,
pub stop_cause: Option<StopCause>,
pub summary: String,
pub error: Option<String>,
pub notify_error: Option<String>,
pub manual: bool,
}Expand description
One line of the ledger.
Fields§
§trigger: String§slot: Option<DateTime<Utc>>The scheduled slot this accounts for. None for a manual run — which
is why a manual run never advances the schedule.
started_at: DateTime<Utc>§finished_at: Option<DateTime<Utc>>§status: RunStatus§session_id: Option<String>The transcript, which is where the full answer lives. The ledger keeps a one-line summary and points here rather than storing a second copy.
turns: u32§cost_usd: Option<f64>§blocked_sends: u32§staged: u32Calls the outbox staged — the number to look at in the morning.
taint: Taint§tool_calls: u32Tool calls attempted, and how many the environment refused.
Recorded because an unattended run’s reliability is invisible
otherwise: the briefing still arrives, the ledger still says ok, and
a trigger quietly failing a third of its calls reads exactly like one
that works. It matters more than it looks — marginal per-step accuracy
compounds into how long a task a run can finish — and mecha doctor
is the reader.
tool_errors: u32§ended_on_failed_call: boolThe run decided it was done with its last call failed. See
crate::agent::RunOutcome::ended_on_failed_call — worth recording
here above all, because nobody is reading the answer that reported
success over it.
stop_cause: Option<StopCause>Why the loop stopped, when it was not the model deciding it was done —
a timeout, a budget, a shutdown. Without it a run cut short records as
plain ok and a trigger that has been quietly truncating its answer
every morning looks exactly like one that works.
summary: String§error: Option<String>§notify_error: Option<String>Why delivery failed, when the run itself did not.
Separate from error because they mean different things and want
different reactions: error is a run that produced no answer, this is
an answer that was produced and did not get where it was going. Recorded
for the same reason stop_cause is — a briefing that has quietly not
rendered for a week looks exactly like one that works.
manual: boolmecha trigger run <name>, not the clock.