Skip to main content

StoreError

Enum StoreError 

Source
pub enum StoreError {
Show 29 variants Io(Error), Serde(Error), CannotPublishImport, UnknownStage(String), UnknownSig(String), UnsatisfiablePair { sig_id: String, stage_id: String, filed_under: String, }, InvalidTransition(String), UnknownBranch(String), NonFastForward { branch: String, current: OpId, attempted: OpId, }, UnknownBlob(String), UnknownBlobRef { namespace: String, key: String, }, InvalidManifest(ManifestError), MissingBlobs(Vec<BlobId>), NotReplayable { op_id: OpId, why: NotReplayable, }, UnknownOp(OpId), ReplayTargetUnloadable { op_id: String, stage_id: String, reason: String, }, StageUnreadable { sig_id: String, stage_id: String, reason: String, }, TransformError(TransformError), Apply(ApplyError), TypeError(Vec<TypeError>), UnsupportedMultiModuleDependency, DependencyConflict { package: String, dst_version: String, src_version: String, }, AmbiguousManifest { op_id: OpId, }, IssueTarget(String), IssueRefinement(String), BranchAdvanceBlocked(BranchAdvanceBlocked), Contention { branch: String, attempts: u32, }, ProducerBlocked(ProducerBlocked), BudgetExceeded { session_id: String, cap: u64, spent_after: u64, },
}

Variants§

§

Io(Error)

§

Serde(Error)

§

CannotPublishImport

§

UnknownStage(String)

§

UnknownSig(String)

§

UnsatisfiablePair

A head names (sig_id, stage_id), but the AST at stage_id is filed under filed_under — the sig it actually hashes to — so no store can ever hold the pair (#992). Distinct from Self::UnknownStage: the content is present, it is just bound to the wrong identity. The shape a pre-#992 ChangeEffectSig left behind (old sig, new stage).

Fields

§sig_id: String
§stage_id: String
§filed_under: String
§

InvalidTransition(String)

§

UnknownBranch(String)

§

NonFastForward

A branch-head advance (e.g. the ref half of op push) was asked to move branch to attempted, but attempted is not a descendant of the branch’s current head — a non-fast-forward that would orphan history. Refused, git-style, so a disjoint or diverged push can’t silently clobber a shared branch. The op objects may already be present; only the ref is left unchanged.

Fields

§branch: String
§current: OpId
§attempted: OpId
§

UnknownBlob(String)

§

UnknownBlobRef

Fields

§namespace: String
§

InvalidManifest(ManifestError)

A files manifest (#1007) failed to decode or validate.

§

MissingBlobs(Vec<BlobId>)

A SetFiles (#1007) names blobs — its manifest or entries — this store does not hold. Nothing was written; the head is unchanged.

§

NotReplayable

The op exists but has nothing a regenerator could reproduce, by kind (#1007) — a typed refusal, not a replay miss.

Fields

§op_id: OpId
§

UnknownOp(OpId)

§

ReplayTargetUnloadable

replay_request was asked to replay an op whose own produced stage can’t be loaded (#868). Unloadable context in the parent program is skipped and reported instead (ReplayRequest::skipped), but the target is what a regeneration is compared against — without it there is nothing to replay.

Fields

§op_id: String
§stage_id: String
§reason: String
§

StageUnreadable

A head stage exists but could not be read — corrupt bytes, a permission error, any I/O or parse failure other than “absent”. Lenient reconstruction (#868) skips only absent stages; this is surfaced instead so store corruption is never hidden behind an “incomplete context” report.

Fields

§sig_id: String
§stage_id: String
§reason: String
§

TransformError(TransformError)

A typed AST transform (#280) — e.g. ReplaceMatchArm — was asked to operate on a node it couldn’t address (wrong kind, out-of-range arm index, unknown NodeId, etc.). Distinct from TypeError (which means the transform succeeded but its output didn’t typecheck) so callers can render the right error message.

§

Apply(ApplyError)

§

TypeError(Vec<TypeError>)

The candidate program — i.e. the source the caller is publishing — doesn’t typecheck. The branch head is unchanged and no op records are persisted. Issue #130’s “always-valid HEAD” invariant: the gate runs before any side effect, so a type-broken publish leaves no footprint.

§

UnsupportedMultiModuleDependency

A dependency being resolved for the write-time gate (#930) is a multi-module package. Per-module signature extraction (picking the imported module’s file out of the de-flattened tree) is not yet implemented; single-module (leaf) dependencies resolve today. A caller can treat this as “cannot resolve here” rather than a hard failure.

§

DependencyConflict

A merge was refused because its two parents pin the same dependency at different versions (#977). The merge commit records the union of both parents’ lock entries as its own lock; picking one of two conflicting pins silently would change what the merged code was tested against, so the merge is refused instead. Nothing moves — neither branch advances. Resolve by aligning the version on one branch (e.g. lex pkg update there, then push) and merging again.

Fields

§package: String
§dst_version: String
§src_version: String
§

AmbiguousManifest

A merge’s file-manifest diff (#1007 PR 7) was asked to 3-way-merge a side whose own manifest_at is already Ambiguous — a merge of merges where an earlier merge landed without the SetFiles it should have appended. There is no well-defined manifest on that side to diff against, so this merge is refused too rather than guessing. Resolve by appending a SetFiles on op_id first (the same fix check_head_files names for a plain head advance).

Fields

§op_id: OpId
§

IssueTarget(String)

A typed issue’s example targets a function that isn’t declared at the head being evaluated (#949) — the example cannot be attached, so the issue cannot be judged there.

§

IssueRefinement(String)

A proposed acceptance was refused for the issue it names (#956) — e.g. the issue is already typed, so it is not open to refinement.

§

BranchAdvanceBlocked(BranchAdvanceBlocked)

The op was persisted but a required_attestations rule in policy.json (#245) refused to advance the branch head past it. The op record is durable — re-running with the missing attestations recorded will succeed without re-persisting — but the branch is unchanged. Surfaced as a structured JSON envelope on the HTTP API.

§

Contention

All retry attempts of the CAS branch-head advance failed because another writer kept advancing the same branch (#262). The op record itself is durable in the op log (orphaned), so re-running with backoff would eventually land — return 503 Contention { retry_after } from the HTTP API and let the client back off.

Fields

§branch: String
§attempts: u32
§

ProducerBlocked(ProducerBlocked)

The op was persisted but its stage carries an attestation produced by a retroactively quarantined tool (#248). The branch head is unchanged. The op record stays in the log (audit trail intact); re-running with the producer unblocked, or with un-contaminated attestations, succeeds without re-persisting the op.

§

BudgetExceeded

The op would push its session’s monotonic budget over the cap configured in policy.session_budgets (#292 slice 3). The op is not persisted; the branch head is unchanged. The caller should either start a new session, raise the cap, or refactor to fit the budget. HTTP API maps to 503.

Fields

§session_id: String
§cap: u64
§spent_after: u64

Trait Implementations§

Source§

impl Debug for StoreError

Source§

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

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

impl Display for StoreError

Source§

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

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

impl Error for StoreError

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
Source§

impl From<ApplyError> for StoreError

Source§

fn from(source: ApplyError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for StoreError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for StoreError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.