Skip to main content

AdapterError

Enum AdapterError 

Source
pub enum AdapterError {
    Command {
        command: String,
        code: Option<i32>,
        stderr: String,
    },
    Io {
        command: String,
        source: String,
    },
    Filesystem {
        path: String,
        source: String,
    },
    Unsupported {
        adapter: Adapter,
        operation: &'static str,
    },
    IndexTimeout {
        package: String,
        version: String,
        waited_secs: u64,
    },
    RegistryUnavailable {
        package: String,
        version: String,
        source: String,
    },
    PublishNotVisible {
        package: String,
        version: String,
        waited_secs: u64,
    },
    DigestMismatch {
        package: String,
        version: String,
        local: String,
        remote: String,
    },
    UnsupportedRegistry {
        adapter: Adapter,
        registry: Registry,
    },
}
Expand description

Why an adapter step failed. Distinct from a verify discrepancy, which is a successful read modelled by VerifyOutcome rather than an error.

Variants§

§

Command

A command exited non-zero (or was signalled). Carries the rendered command, its exit code (None on signal), and captured stderr.

Fields

§command: String

The command that failed, rendered as a shell-style line.

§code: Option<i32>

The process exit code, or None if terminated by a signal.

§stderr: String

Captured standard error, for the operator-facing message.

§

Io

A command could not be spawned at all (the port returned an I/O error).

Fields

§command: String

The command whose spawn failed, rendered as a shell-style line.

§source: String

The underlying I/O error rendered as text.

§

Filesystem

A local filesystem write an adapter performs between commands failed — distinct from Self::Io (a process that could not be spawned). The homebrew first-formula create writes the generated .rb into the tap checkout between the clone and the commit; a failure there is this.

Fields

§path: String

The path the write targeted, for the operator-facing message.

§source: String

The underlying I/O error rendered as text.

§

Unsupported

The adapter has no real implementation of this operation from this host (e.g. a CI-only trusted-publisher publish). Named so the coordinator can surface a precise, honest message rather than a fabricated receipt.

Fields

§adapter: Adapter

The adapter identity.

§operation: &'static str

The operation that is unsupported ("publish", "build", …).

§

IndexTimeout

A just-published artifact did not become visible on its registry index within the wait ceiling, so a dependent artifact could not be published safely. Distinct from Self::Command: the publish itself succeeded — only the between-publishes index-wait timed out (the multi-crate cargo workspace path, where a dependent crate must not publish until its workspace dependency is index-visible; see cargo).

Fields

§package: String

The published package still absent from the index.

§version: String

The version being waited for.

§waited_secs: u64

How long the wait lasted before giving up, in seconds.

§

RegistryUnavailable

The registry could not be reached to determine a crate’s published state, so the publish path cannot make a safe decision and fails closed rather than guess. Raised in two places (see cargo): the pre-publish idempotency probe (cannot prove the crate has not already landed, so a duplicate irreversible upload is refused), and the dependency index-wait (every poll for a workspace dependency failed, so its visibility is unknown — surfaced honestly instead of a misleading Self::IndexTimeout). Mirrors the reconcile layer’s outage ⇒ VerifyOutcome::Unknown discipline: an unknown remote state is never read as “safe to (re)publish”.

Fields

§package: String

The package whose registry state could not be determined.

§version: String

The version being probed or waited for.

§source: String

The underlying registry lookup error, rendered as text.

§

PublishNotVisible

A target’s own cargo publish exited successfully, but the published {package}@{version} was not confirmable on the registry index within the wait ceiling — the registry answered but never showed the version. The upload may have landed (a slow index) or may have shipped nothing (a silent no-op: a registry-alias/credential/env difference, or an under-declared target). Either way the cut fails closed here rather than journal a PublishReceipt for a publish it cannot confirm (the cut-noop-self-visibility-check / issuectl 0.8.1 signature) — the operator resumes/verifies once the index catches up, or investigates a genuine no-op. Distinct from Self::IndexTimeout (a dependency a dependent was waiting on) and from Self::RegistryUnavailable (the registry was never reachable — an outage): this is the self-visibility confirm of the crate the adapter just published, the registry reachable but the version observed absent.

Fields

§package: String

The package whose own publish did not become index-visible.

§version: String

The version that was published but never appeared.

§waited_secs: u64

How long the confirm waited before giving up, in seconds.

§

DigestMismatch

The resume idempotency skip was refused: package@version is already on the registry, but the artifact this cut would upload is not byte-identical to the crate already published there — the registry holds a different artifact at this version than this cut intended.

The pre-fix skip trusted name + version existence alone and journaled a receipt without re-uploading (the last “receipt without a fresh upload” path, the same shape as the cut-noop-self-visibility-check no-op). This variant is the digest-authenticated refusal: the cut fails closed rather than skip and fabricate a receipt for a crate it did not put there. A benign cause is the version having been packaged by a different toolchain (a non-reproducible .crate); a malign one is a supply-chain substitution — either way the operator must investigate before the cut can proceed. Distinct from Self::RegistryUnavailable (the digest could not be read at all — an outage): here the registry answered with a concrete, conflicting digest.

Fields

§package: String

The already-published package whose registry artifact did not match.

§version: String

The version whose on-registry crate conflicts with the intended one.

§local: String

The sha256 (lowercase hex) of the .crate this cut would upload.

§remote: String

The registry-recorded checksum (crates.io sparse-index cksum).

§

UnsupportedRegistry

An adapter was handed a target whose declared registry it does not support, so it refuses the target before any external action rather than risk publishing to an unexpected destination. Raised by the cargo adapter for any rust target whose registry is not Registry::CratesIo (the only rust registry ossctl supports today): cargo honors ambient registry config, so an unpinned publish could land on the wrong registry while the engine probes crates.io and records a crates.io receipt. A typed error keeps this a fail-fast misconfiguration, distinct from a command failure (Self::Command).

Fields

§adapter: Adapter

The adapter identity that rejected the target.

§registry: Registry

The declared registry that this adapter does not support.

Trait Implementations§

Source§

impl Debug for AdapterError

Source§

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

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

impl Display for AdapterError

Source§

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

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

impl Error for AdapterError

1.30.0 · 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, 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> 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.