pub enum EngineError {
MapOverNotAList {
node: String,
over: String,
},
UnsupportedMapBody {
node: String,
detail: String,
},
NoBranchCaseMatched {
node: String,
},
BranchDecisionUnmatched {
node: String,
reply: String,
cases: Vec<String>,
},
UnsupportedNode {
node: String,
kind: &'static str,
},
UnknownAgent {
node: String,
agent_hash: String,
},
UnknownTool {
node: String,
tool: String,
},
MalformedGraph {
detail: String,
},
ToolFailed {
node: String,
message: String,
},
GraphEncode(Error),
Runtime(RuntimeError),
}Expand description
Why a graph drive could not continue.
Variants§
MapOverNotAList
A map node’s over reference did not resolve to a JSON array against the
routed value (it was missing, or resolved to a non-array value). A map can
only fan out over a list, so the engine refuses deterministically rather
than guessing. Returned before the map’s NodeEntered is recorded, so
nothing lands in the log past the refusal, and it reproduces on replay: the
same recorded routed value re-resolves to the same non-list.
Fields
UnsupportedMapBody
A map node’s body is a form that is not executable: an embedded
subgraph (per-item sub-walks need their own
log per iteration to keep node ids unambiguous, which is not implemented
yet), or a node body that
names a node whose kind cannot be a per-item worker (only agent and
tool bodies run). Returned before the map’s NodeEntered is recorded,
so nothing lands in the log past the refusal. The document layer still
validates these as legal graphs; only the engine declines to run them.
NoBranchCaseMatched
An expression branch reached with no case whose condition evaluated
true. The author declared the cases exhaustively or the graph cannot
proceed; the engine refuses deterministically rather than guessing a
route. Returned before the branch’s NodeEntered is recorded, so nothing
lands in the log past the refusal, and the refusal reproduces on replay
(the same routed value re-evaluates to the same no-match).
BranchDecisionUnmatched
A model-decision branch’s agent produced a reply that is not one of the
branch’s case names. Unlike the other refusals this arrives after the
branch’s NodeEntered and the decision agent’s own events are recorded
(the model had to run to produce the reply); it still reproduces on
replay, because the reply is decoded from the recorded model completion.
Fields
UnsupportedNode
A node whose kind the engine does not execute was reached on the
walk. Today the sole such kind is fold: its execution semantics are
not implemented, so the engine refuses it with this typed error rather
than guessing a loop. Returned before the node’s NodeEntered
is recorded, so nothing lands in the log past the refusal, and it
reproduces on replay (the same document re-walks to the same refusal). The
document layer still validates a fold as a legal graph; only the engine
declines to run it.
Fields
UnknownAgent
An agent node referenced an agent hash the resolver could not supply.
Fields
UnknownTool
A tool node named a tool the resolver could not supply.
MalformedGraph
The graph’s edges do not form a well-formed DAG (a cycle, or an edge referencing a node that is not in the document). The document validator rejects both at submit; the engine re-checks defensively so a walk is never attempted over a malformed topology.
ToolFailed
A tool node’s call failed after exhausting its retry policy. The full
failure is already recorded in the log’s ToolCallCompleted; this
carries the message so the caller sees why the graph stopped.
Fields
GraphEncode(Error)
The graph document could not be serialized to compute its hash. A graph
is plain data, so this does not arise in practice; it exists to keep the
hashing edge honest rather than panicking on a serde_json error.
Runtime(RuntimeError)
A RunCtx operation surfaced a runtime error (replay divergence, a
dangling write needing reconciliation, a live provider failure, a store
failure). Passed through unchanged.
Trait Implementations§
Source§impl Debug for EngineError
impl Debug for EngineError
Source§impl Display for EngineError
impl Display for EngineError
Source§impl Error for EngineError
impl Error for EngineError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()