pub enum StoreError {
Show 17 variants
Io(Error),
Serde(Error),
CannotPublishImport,
UnknownStage(String),
UnknownSig(String),
InvalidTransition(String),
UnknownBranch(String),
UnknownBlob(String),
UnknownBlobRef {
namespace: String,
key: String,
},
UnknownOp(OpId),
TransformError(TransformError),
Apply(ApplyError),
TypeError(Vec<TypeError>),
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)
InvalidTransition(String)
UnknownBranch(String)
UnknownBlob(String)
UnknownBlobRef
UnknownOp(OpId)
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.
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()