Skip to main content

Node

Struct Node 

Source
pub struct Node {
Show 21 fields pub schema_version: u32, pub node_id: NodeId, pub run_id: RunId, pub parent_node_id: Option<NodeId>, pub kind: Kind, pub status: Status, pub task: Option<String>, pub worktree_path: Option<String>, pub branch: Option<String>, pub base_sha: Option<String>, pub tmux_window: Option<String>, pub tmux_identity: Option<TmuxIdentity>, pub agent_pid: Option<i32>, pub agent_pid_start_time: Option<DateTime<Utc>>, pub supervisor_pid: Option<i32>, pub children: Vec<ChildRef>, pub started_at: Option<DateTime<Utc>>, pub updated_at: DateTime<Utc>, pub last_report: Option<Value>, pub last_processed_report_seq_by_child: Map<String, Value>, pub retry_attempts: u32,
}
Expand description

nodes/<node-id>.json (design.md §1.3).

Fields§

§schema_version: u32

State-schema version this file was written with.

§node_id: NodeId

Unique node identifier within its run (e.g. n-0001). Validated on read; this is the projection’s filename key, so it can never name a path outside nodes/.

§run_id: RunId

Run this node belongs to. Validated on read.

§parent_node_id: Option<NodeId>

Parent node within the same run, if this is a sub-node.

§kind: Kind

Kind of work this node performs.

§status: Status

Current node status.

§task: Option<String>

Task description / prompt driving the node, if recorded.

§worktree_path: Option<String>

Filesystem path of the node’s git worktree, if created.

§branch: Option<String>

Git branch the node works on, if any.

§base_sha: Option<String>

The commit SHA the node’s branch/worktree was forked from at spawn (the branch tip the moment create.sh materialized the worktree). It is the fixed reference point that lets the supervisor tell “this branch produced work that merged into source” from “this branch never diverged from its fork point”: a branch still at base_sha is trivially an ancestor of its source branch but has merged nothing, so it must NOT be reconciled to success or torn down (that would drop a live agent’s uncommitted work). Only a branch whose tip has moved past base_sha and is now an ancestor of the run’s source_branch is a confirmed merge (issues false-failed-after-merge / supervisor-stuck-pending-after-self-merge). #[serde(default)] keeps a node written before this field existed readable (None → the git-reconcile fallback simply does not fire for it).

§tmux_window: Option<String>

tmux window hosting the node’s agent, if interactive. This is the human-readable window name — not unique across sessions and blind to non-default sockets. Kept for display and as the legacy liveness key; prefer Node::tmux_identity when present.

§tmux_identity: Option<TmuxIdentity>

Fully-qualified tmux identity (session:window_id + socket path) captured at spawn time. None for nodes registered before create.sh emitted the qualified fields — those fall back to bare-name matching on Node::tmux_window. New spawns always populate this when create.sh returns it.

§agent_pid: Option<i32>

PID of the running agent process, if live.

§agent_pid_start_time: Option<DateTime<Utc>>

Start time of the agent process, used to detect PID reuse.

§supervisor_pid: Option<i32>

PID of the supervisor watching this node, if live.

§children: Vec<ChildRef>

Children this node has spawned.

§started_at: Option<DateTime<Utc>>

When the node started executing, if it has.

§updated_at: DateTime<Utc>

When the node file was last modified.

§last_report: Option<Value>

The node.report payload that drove this node to its terminal status. Set only by the report that actually transitions the node (Done / Failed / Cancelled). Once the node is terminal it is frozen: a late report against an already-settled node is dropped without overwriting this field (see reducer::apply_node_report). So for a node cancelled by run cancel, this holds the synthesized cancel report, not a later-arriving agent report — that payload remains only in events.jsonl.

§last_processed_report_seq_by_child: Map<String, Value>

Highest report seq consumed per child run id, for idempotent report processing across supervisor restarts.

§retry_attempts: u32

Number of times the supervisor has auto-retried this node after an empty-handed agent-died (issue autoretry-agent-died-worker). The DURABLE, restart-safe bound on the bounded-retry loop: each node.retry event increments it, and the watchdog terminalizes the run failed once it reaches RETRY_MAX_ATTEMPTS. #[serde(default)] keeps a node written before this field existed readable (0 — never retried).

Trait Implementations§

Source§

impl Clone for Node

Source§

fn clone(&self) -> Node

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 Node

Source§

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

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

impl<'de> Deserialize<'de> for Node

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Node

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Node

§

impl RefUnwindSafe for Node

§

impl Send for Node

§

impl Sync for Node

§

impl Unpin for Node

§

impl UnsafeUnpin for Node

§

impl UnwindSafe for Node

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more