#[repr(i32)]pub enum ExitClass {
Generic = 1,
Retryable = 2,
DataIntegrity = 3,
SchemaDrift = 4,
}Expand description
Machine-actionable exit-code taxonomy.
A scheduler keys its retry / alert policy off the numeric exit code:
| code | class | scheduler action |
|---|---|---|
0 | success | — (handled separately, not in this enum) |
1 | Generic: config / usage / unclassified error | fix the config; do not retry blindly |
2 | Retryable: transient (connection reset, lock-wait timeout, capacity) | safe to retry the same command |
3 | DataIntegrity: quality gate / reconcile mismatch / validate verification failure / duplicate-guard / manifest inconsistency | STOP — data may be wrong, do not blindly retry |
4 | SchemaDrift: on_schema_drift: fail tripped | the source shape changed — needs human review |
§Overlap with clap’s usage exit (also 2)
clap exits 2 on an argument-parse error (bad flag, missing required arg).
That collides numerically with Retryable = 2, but
the two are distinguishable: clap’s exit happens pre-dispatch, before any
rivet work runs, so it prints only a clap usage block and no Error:
line. A retryable rivet failure always prints an Error: … line (or a JSON
object with "exit_class": 2). We deliberately do not fight clap by remapping
our retryable code — 2 = retryable matches the spec, and the usage overlap
is documented and detectable by the absence of a rivet error line.
Variants§
Generic = 1
1 — config / usage / unclassified error. Fix the input; retrying the
identical command will fail the same way.
Retryable = 2
2 — transient failure (connection reset, lock-wait timeout, capacity).
Safe to retry the same command after a backoff.
DataIntegrity = 3
3 — data-integrity failure (quality gate, reconcile mismatch, validate
verification failure, duplicate-guard, manifest inconsistency). The
exported data may be wrong; stop and investigate rather than retry.
SchemaDrift = 4
4 — schema-drift failure (on_schema_drift: fail tripped). The source
shape changed; a human must review before re-running.
Implementations§
Trait Implementations§
impl Copy for ExitClass
impl Eq for ExitClass
impl StructuralPartialEq for ExitClass
Auto Trait Implementations§
impl Freeze for ExitClass
impl RefUnwindSafe for ExitClass
impl Send for ExitClass
impl Sync for ExitClass
impl Unpin for ExitClass
impl UnsafeUnpin for ExitClass
impl UnwindSafe for ExitClass
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.