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).
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.
UnknownBlob(String)
UnknownBlobRef
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.
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.
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.
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.
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).
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.
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.
Trait Implementations§
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
Source§impl Error for StoreError
impl Error for StoreError
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()