Skip to main content

RuntimeError

Enum RuntimeError 

Source
pub enum RuntimeError {
Show 36 variants ArtifactNotFound { name: String, version: String, }, ArtifactIntegrityFailed { name: String, version: String, }, LockMissingEntry { name: String, }, LockVersionMismatch { name: String, requested: String, pinned: String, }, ArtifactArchive { name: String, version: String, message: String, }, ToolComponentCompile { name: String, version: String, message: String, }, CapsuleCompile(String), CreateWorkdir { path: String, source: Error, }, WriteToolManifest { path: String, source: Error, }, SystemPromptFileRead { path: String, source: Error, }, CompactionSystemPromptFileRead { path: String, source: Error, }, SystemPromptArtifactRead { name: String, source: Error, }, SkillSourceNotFound { path: String, }, SkillSourceMissingSkillMd { path: String, }, SkillSourceRead { path: String, source: Error, }, InvalidNetworkAllowEntry { entry: String, message: String, }, InvalidFilesystemScope { scope: String, message: String, }, ContainmentFloorUnmet { declared: ContainmentClass, achieved: ContainmentClass, reason: String, }, StagedRuntimeRequiresSealed { binaries: Vec<String>, declared: ContainmentClass, }, ShellBinaryPackageUnreachable { entries: Vec<UnreachableEntrypoint>, }, SealedRootConstructionFailed { detail: String, }, EgressNamespaceUnavailable { blocker: EgressNamespaceBlocker, reason: String, }, CapsuleExportMissing, ToolExportMissing { name: String, }, CapsuleTrap(String), CapsuleDeadlineExceeded { seconds: u64, }, CapsuleResourceLimit { message: String, }, ShellResourceLimitExceeded { binary: String, limit: String, detail: String, }, CgroupDelegationUnavailable { reason: String, }, WorkdirSizeExceeded { max_bytes: u64, observed_bytes: u64, }, WasiInit { path: String, message: String, }, DriverNotConfigured, DriverNotInstalled(String), AgentLoopFailed(String), PortInUse { port: u16, }, Runtime(String),
}

Variants§

§

ArtifactNotFound

Fields

§name: String
§version: String
§

ArtifactIntegrityFailed

Fields

§name: String
§version: String
§

LockMissingEntry

Fields

§name: String
§

LockVersionMismatch

Fields

§name: String
§requested: String
§pinned: String
§

ArtifactArchive

Fields

§name: String
§version: String
§message: String
§

ToolComponentCompile

Fields

§name: String
§version: String
§message: String
§

CapsuleCompile(String)

§

CreateWorkdir

Fields

§path: String
§source: Error
§

WriteToolManifest

Fields

§path: String
§source: Error
§

SystemPromptFileRead

Fields

§path: String
§source: Error
§

CompactionSystemPromptFileRead

Fields

§path: String
§source: Error
§

SystemPromptArtifactRead

Fields

§name: String
§source: Error
§

SkillSourceNotFound

Fields

§path: String
§

SkillSourceMissingSkillMd

Fields

§path: String
§

SkillSourceRead

Fields

§path: String
§source: Error
§

InvalidNetworkAllowEntry

Fields

§entry: String
§message: String
§

InvalidFilesystemScope

Fields

§scope: String
§message: String
§

ContainmentFloorUnmet

The declared containment floor is stronger than what this host’s kernel can back. Raised in the stage/launch seam, before any registry pull, component compile or workdir creation — achieved always comes from a live host probe, never from the manifest.

Fields

§reason: String
§

StagedRuntimeRequiresSealed

A capsule declares capabilities.shell.staged_runtime without an effective sealed containment floor.

Deliberately distinct from Self::ContainmentFloorUnmet: that one compares the declared floor against what the host can back, and its remedy is to lower the floor or move hosts. This one is decided against the declared floor alone and never looks at the host at all, so it fires identically on a machine that could deliver sealed — a staged runtime has no composed root to be staged into unless the capsule asked for one, and quietly launching it without the mount would leave the interpreter simply absent. Its remedy is to raise the declared floor (or drop the grant), which is the opposite advice.

binaries names every offending staged_runtime binary so the operator does not have to re-run to find the second one.

Fields

§binaries: Vec<String>
§

ShellBinaryPackageUnreachable

A sealed capsule allowlists a script whose interpreter’s package tree nothing declared could make reachable inside the composed root.

Deliberately distinct from Self::StagedRuntimeRequiresSealed, which it sits next to in stage_session: that one fires when a grant was declared at too low a floor, this one fires when no grant was declared at all and the floor is already sealed. Their remedies point in opposite directions — raise the floor there, add a grant here.

entries names every offending allowlist entry so an operator fixing this does not have to re-run to discover the second script, following the same precedent.

§

SealedRootConstructionFailed

A sealed session’s composed root could not be built in the forked child, after the pre-launch probe reported the mechanism available.

Deliberately distinct from Self::ContainmentFloorUnmet: that one is a refusal decided before anything is staged, on a host that never claimed to offer sealed. This one is a host that claimed it and then failed to deliver — a race, a mount table that changed under the runtime, or an edge case the cheap probe cannot catch. Conflating the two would tell an operator to lower their declared floor when the real answer is that something moved.

detail is the message the child wrote to the pre_exec diagnostic pipe, which names the exact step (unshare, a specific bind mount, pivot_root) and its errno.

Fields

§detail: String
§

EgressNamespaceUnavailable

This host cannot give a capsule’s native subprocess tree its own network namespace, so the egress boundary that mediates capabilities.network.allow cannot be built.

Raised before any registry pull, component compile or workdir creation, and raised for every Linux capsule that can spawn a subprocess — including one whose capabilities.network.allow is empty. That breadth is the point: with the namespace missing, an empty allowlist would mean unrestricted egress rather than none, because the seccomp connect/sendto interception that used to back it was deleted as unsound rather than kept as a fallback. There is deliberately no path that continues at reduced enforcement.

Deliberately distinct from Self::ContainmentFloorUnmet, which this would otherwise look like: that one compares a declared containment class against what the host can back, and its remedy is to lower the declared floor. A network namespace is not part of the containment ladder — every class needs it equally — so lowering the floor fixes nothing here, and offering that advice would be actively misleading.

Fields

§reason: String
§

CapsuleExportMissing

§

ToolExportMissing

Fields

§name: String
§

CapsuleTrap(String)

§

CapsuleDeadlineExceeded

Fields

§seconds: u64
§

CapsuleResourceLimit

Fields

§message: String
§

ShellResourceLimitExceeded

Fields

§binary: String
§limit: String
§detail: String
§

CgroupDelegationUnavailable

Fields

§reason: String
§

WorkdirSizeExceeded

Fields

§max_bytes: u64
§observed_bytes: u64
§

WasiInit

Fields

§path: String
§message: String
§

DriverNotConfigured

§

DriverNotInstalled(String)

§

AgentLoopFailed(String)

§

PortInUse

Fields

§port: u16
§

Runtime(String)

Implementations§

Source§

impl RuntimeError

Source

pub fn artifact_not_found( name: impl Into<String>, version: impl Into<String>, ) -> Self

Source

pub fn artifact_integrity_failed( name: impl Into<String>, version: impl Into<String>, ) -> Self

Source

pub fn wasi(path: PathBuf, message: impl Into<String>) -> Self

Trait Implementations§

Source§

impl Debug for RuntimeError

Source§

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

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

impl Display for RuntimeError

Source§

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

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

impl Error for RuntimeError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

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<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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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<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