pub enum WaitReason {
ToolApproval,
UserPrompt,
TaintGate,
InteractionPoint,
FanOutWorkers {
outstanding: usize,
},
Children {
outstanding: usize,
},
NeedsSetup {
blocker: SetupBlocker,
remedy: String,
},
}Expand description
Why a run’s status is RunStatus::WaitingInput.
WaitingInput alone is several unrelated situations wearing one word, and
they call for opposite responses: a fan-out parent whose workers are
churning is healthy and needs nothing, while a run parked on a
tool-approval prompt is stopped dead until a person answers it. Issue #184
is what happens when the two are indistinguishable - an operator reading
waiting across a factory concluded it had stalled and started killing
healthy runs. Issue #431 is the same conflation reaching every client that
reads meta.json.
Derived on demand from markers the engine already sets, by
wait_reason_from; nothing tracks it separately, so it cannot fall out of
sync with the status it explains. It lives here rather than in the runtime
because it is both reported live over the control socket and written to
meta.json, and one vocabulary across those two is the whole point.
Deliberately not new RunStatus variants: the status is matched
exhaustively across the codebase and serialized two ways on the wire, so
splitting it would break every consumer to express something that is not a
new state. The run really is waiting; this says on what.
Variants§
ToolApproval
Blocked on a tool-approval prompt. Needs a person (or --yolo).
UserPrompt
Blocked on a question the agent itself asked (ask_user_*,
present_for_review). Needs a person.
TaintGate
Blocked on a taint-gate clearance prompt. Needs a person.
InteractionPoint
Blocked on a blueprint stage-boundary checkpoint. Needs a person.
FanOutWorkers
Parked while fan-out workers run. Healthy; resolves on its own.
Children
Parked while spawned sub-agents run (requires_children). Healthy;
resolves on its own.
NeedsSetup
Parked because something on the machine has to change before this run can go on: a provider it needs is not configured, a key was rejected, an account is out of credits.
These used to end the run. They are all deterministic and all outside
the run’s control, so ending it threw away everything it had done to
punish a person for a typo in config.toml. The run holds its place
instead, and lev resume picks it up once the machine is fixed.
The distinction that matters is not “is there a fix” but “does the fix let this run continue”: a broken blueprint is equally deterministic and equally fixable, and still cannot be resumed into, because the blueprint was read at spawn.
Fields
blocker: SetupBlockerWhich kind of problem, so a client can offer the right thing to do rather than parse the sentence below.
Implementations§
Source§impl WaitReason
impl WaitReason
Sourcepub fn needs_a_person(&self) -> bool
pub fn needs_a_person(&self) -> bool
Whether clearing this needs a person. false means the run is parked on
other work and will move on by itself.
Trait Implementations§
Source§impl Clone for WaitReason
impl Clone for WaitReason
Source§fn clone(&self) -> WaitReason
fn clone(&self) -> WaitReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WaitReason
impl Debug for WaitReason
Source§impl<'de> Deserialize<'de> for WaitReason
impl<'de> Deserialize<'de> for WaitReason
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for WaitReason
impl Display for WaitReason
impl Eq for WaitReason
Source§impl Hash for WaitReason
impl Hash for WaitReason
Source§impl PartialEq for WaitReason
impl PartialEq for WaitReason
Source§impl Serialize for WaitReason
impl Serialize for WaitReason
impl StructuralPartialEq for WaitReason
Auto Trait Implementations§
impl Freeze for WaitReason
impl RefUnwindSafe for WaitReason
impl Send for WaitReason
impl Sync for WaitReason
impl Unpin for WaitReason
impl UnsafeUnpin for WaitReason
impl UnwindSafe for WaitReason
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.