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,
},
DelegatedVersionAlreadyPublished {
package: String,
version: 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
Io
A command could not be spawned at all (the port returned an I/O error).
Fields
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
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
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
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”.
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
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
DelegatedVersionAlreadyPublished
A CI-delegated publish was planned for a version that is ALREADY on the registry, so the cut’s post-tag observation could not distinguish CI’s publish from the pre-existing one.
Raised by the cargo adapter’s cargo-publish-ci dry-run (pre-tag, before
any irreversible step). An engine-owned publish cannot hit this — its publish
path probes and digest-authenticates the registry before uploading — but a
delegated target is skipped in publish-all, so verify’s presence check is the
only gate, and presence is satisfied by an upload that predates the cut. Cutting
an already-published version would therefore end GREEN while CI’s cargo publish failed with “crate version already uploaded”: a silent false green,
which is the one outcome the verify barrier exists to prevent.
Fields
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 shipshape 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).
Trait Implementations§
Source§impl Debug for AdapterError
impl Debug for AdapterError
Source§impl Display for AdapterError
impl Display for AdapterError
Source§impl Error for AdapterError
impl Error for AdapterError
1.30.0 · 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()