Skip to main content

Run

Struct Run 

Source
pub struct Run {
Show 58 fields pub id: i64, pub project: String, pub task_key: String, pub text: String, pub gh: Option<i64>, pub quadrant: Option<String>, pub agent: String, pub repo: PathBuf, pub branch: String, pub worktree: PathBuf, pub default_branch: String, pub base: String, pub prompt: String, pub state: RunState, pub feedback: Option<String>, pub seconds: Option<i64>, pub cost_usd: Option<f64>, pub summary: Option<String>, pub commits: Option<i64>, pub diffstat: Option<String>, pub verify: Option<String>, pub verify_ok: Option<bool>, pub error: Option<String>, pub outcome: Option<String>, pub dispatched_at: Option<i64>, pub ready_at: Option<i64>, pub decided_at: Option<i64>, pub published_at: Option<i64>, pub review_seconds: Option<i64>, pub class: Option<Class>, pub scope: Vec<String>, pub tier: Option<u8>, pub description: Option<String>, pub agent_budget: Option<f64>, pub timeout_minutes: Option<i64>, pub verify_base_ok: Option<bool>, pub verify_base_seconds: Option<i64>, pub changed_paths: Option<Vec<String>>, pub scope_error: Option<String>, pub model: Option<String>, pub complexity: Option<i64>, pub features: Option<Features>, pub estimator: Option<String>, pub route_revision: Option<i64>, pub route: Option<String>, pub approval: Option<Approval>, pub approved_tree: Option<String>, pub approved_head: Option<String>, pub approved_by: Option<String>, pub workflow_instance: Option<i64>, pub node: Option<String>, pub unit: Option<String>, pub lap: i64, pub preset: Option<String>, pub extra_args: Vec<String>, pub git_snapshot: Option<String>, pub reviewed_tree: Option<String>, pub infra: bool,
}
Expand description

One task dispatched to an agent, from its worktree to publishing. Default is every field empty, which a workflow node fills differently from a dispatch: it has no branch to push and no item to tick.

Fields§

§id: i64§project: String§task_key: String

The item’s key, or a signal: ci or deps.

§text: String§gh: Option<i64>§quadrant: Option<String>

Quadrant at dispatch; None for an untiered project.

§agent: String§repo: PathBuf

The user’s clone the worktree belongs to.

§branch: String§worktree: PathBuf§default_branch: String§base: String

Commit the worktree started from.

§prompt: String§state: RunState§feedback: Option<String>

Reviewer feedback for the latest rework.

§seconds: Option<i64>

Agent and verify time, summed over reworks.

§cost_usd: Option<f64>

Summed over reworks; None when the agent reports no cost.

§summary: Option<String>§commits: Option<i64>

Commits the agent made beyond base; it was told to make none.

§diffstat: Option<String>§verify: Option<String>

The verify command, or None when there is none.

§verify_ok: Option<bool>§error: Option<String>§outcome: Option<String>

What publishing did: a pushed commit, or a pull request URL.

§dispatched_at: Option<i64>

When the run row was created. Never updated, so a per-day count and a digest window have a stable date. Per-attempt start times are in attempts.

§ready_at: Option<i64>

When the run last became ready. A rework moves it forward.

§decided_at: Option<i64>

The first approval or rejection. A pull request closed later does not replace the approval that published it.

§published_at: Option<i64>

When pma published: the push, or the pull request opening. A merge days later does not move it.

§review_seconds: Option<i64>

Review time the user reported with pma review --minutes, summed over reviews of this run.

§class: Option<Class>

The class predicted at dispatch. None for a run dispatched before classes existed.

§scope: Vec<String>

Globs the class allowed, resolved at dispatch. Empty means the class stated no bound; the privileged paths still apply.

§tier: Option<u8>

The project’s tier at dispatch. Tiers change, and routes match on them.

§description: Option<String>

The item’s description lines as dispatched.

§agent_budget: Option<f64>

agent_budget at dispatch, so an attempt’s cost can be read against the limit that applied to it.

§timeout_minutes: Option<i64>§verify_base_ok: Option<bool>

verify at the base commit, before the agent ran. None when there is no command, or when the run predates the check; Some(false) also covers a base run that timed out.

§verify_base_seconds: Option<i64>§changed_paths: Option<Vec<String>>

Every path the run changed against its base, both sides of a rename included. None when they could not be enumerated: an empty list would read as a clean run.

§scope_error: Option<String>

Why the paths could not be enumerated.

§model: Option<String>

The model chosen at dispatch, or None for the worker’s own default.

§complexity: Option<i64>

1 to 5, from the rule named in estimator.

§features: Option<Features>

What that rule read.

§estimator: Option<String>§route_revision: Option<i64>

The policy revision in effect at dispatch, and the route it matched. A later activation does not change either.

§route: Option<String>§approval: Option<Approval>§approved_tree: Option<String>

The tree the approver saw, as git write-tree names it. Publishing refuses to publish a worktree that no longer matches.

§approved_head: Option<String>

The commit the worktree was on. Each publish attempt starts again from it and approved_tree.

§approved_by: Option<String>§workflow_instance: Option<i64>

The workflow instance that dispatched this run, or None for a task dispatched on its own.

§node: Option<String>

The qualified node, which a route matches on and a report groups by.

§unit: Option<String>

The unit that drove it.

§lap: i64

Laps the unit had completed. 0 outside a workflow.

§preset: Option<String>

The preset this run was dispatched under, where one named it.

§extra_args: Vec<String>

Arguments the preset added, recorded so a replay reads back what ran.

§git_snapshot: Option<String>

dispatch::git_snapshot at dispatch. None for a run from before it was taken.

§reviewed_tree: Option<String>

The tree the reviewer was last shown: what the agent left, or what pma review <id> printed since. An approval must match it. None for a run from before it was recorded.

§infra: bool

Rejected for a fault of the check or the machine, not the agent.

Implementations§

Source§

impl Run

Source

pub fn enter(&mut self, state: RunState)

Moves the run to state and stamps the transition. Call it instead of assigning state, so no transition goes unrecorded.

Trait Implementations§

Source§

impl Clone for Run

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Run

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Run

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Run

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Run

Auto Trait Implementations§

§

impl Freeze for Run

§

impl RefUnwindSafe for Run

§

impl Send for Run

§

impl Sync for Run

§

impl Unpin for Run

§

impl UnsafeUnpin for Run

§

impl UnwindSafe for Run

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.