pub enum FoldError {
RunIdMismatch {
seq: u64,
expected: String,
actual: String,
},
NonMonotonicSeq {
prev: u64,
seq: u64,
},
EventBeforeRunStarted {
seq: u64,
event_type: &'static str,
},
DuplicateRunStarted {
seq: u64,
},
EventOutsideStep {
seq: u64,
event_type: &'static str,
},
StepExitedWithoutEntry {
seq: u64,
},
VerdictWithoutTarget {
seq: u64,
},
PoppedRootFrame {
seq: u64,
},
NoActiveFrame {
seq: u64,
},
RebaseWithoutFrame {
seq: u64,
level: usize,
depth: usize,
},
UnpairedHumanResponse {
seq: u64,
request_id: String,
},
}Expand description
A structural violation detected while folding a RunLog into a
pointlock_ir::CheckpointView.
The fold is deliberately not lenient about impossible sequences
(M0 iron rule: events the fold does not understand or cannot anchor are
surfaced, never silently ignored) — a fold error inside
crate::Store::append_event rolls the whole append back, so a log that
cannot fold is never persisted.
Variants§
RunIdMismatch
An event in the fold input belongs to a different run.
Fields
NonMonotonicSeq
Event sequence numbers must be strictly increasing.
EventBeforeRunStarted
Any event other than runStarted arrived before runStarted.
Fields
DuplicateRunStarted
A second runStarted was appended (later segments start with
runResumed).
EventOutsideStep
A step-scoped event arrived with no in-flight step to anchor to.
Fields
StepExitedWithoutEntry
stepExited arrived without a matching stepEntered.
VerdictWithoutTarget
verdictRecorded targets neither the in-flight step nor any
completed record at its run path.
PoppedRootFrame
callFramePopped would pop the root flow frame (or an empty stack).
NoActiveFrame
stepExited with no active call frame to advance (structurally
impossible after a well-formed runStarted).
RebaseWithoutFrame
A callFramePushed marked rebase names a stack level that is not
open (07 §5.2: a rebase re-enters an already-open frame; it never
creates one).
Fields
UnpairedHumanResponse
humanResponded pairs no pending request.
Trait Implementations§
impl Eq for FoldError
Source§impl Error for FoldError
impl Error for FoldError
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()