Skip to main content

CheckpointData

Enum CheckpointData 

Source
pub enum CheckpointData {
    SessionStart {
        at: String,
        version: u32,
        session: String,
        started_at: String,
        invocation: u32,
    },
    SessionEnd {
        at: String,
        outcome: String,
        error: Option<String>,
    },
    PhaseDeclared {
        at: String,
        identity: PhaseIdentity,
        skip_eligible: bool,
    },
    PhaseStarted {
        at: String,
        identity: PhaseIdentity,
    },
    PhaseProgress {
        at: String,
        identity: PhaseIdentity,
        op_counts: OpCounts,
        cursor_state: Option<Value>,
    },
    PhaseCompleted {
        at: String,
        identity: PhaseIdentity,
        duration_secs: f64,
        op_counts: OpCounts,
    },
    PhaseFailed {
        at: String,
        identity: PhaseIdentity,
        error: String,
        op_counts: Option<OpCounts>,
    },
    PhaseHash {
        at: String,
        identity: PhaseIdentity,
        hash_hex: String,
        params_consumed: Option<String>,
    },
    ScopeEnter {
        at: String,
        kind: String,
        coords: BTreeMap<String, Value>,
        path: Vec<BTreeMap<String, Value>>,
    },
    ScopeExit {
        at: String,
        kind: String,
        coords: BTreeMap<String, Value>,
        path: Vec<BTreeMap<String, Value>>,
        outcome: String,
    },
}
Expand description

One record in the JSONL event log. Tagged on type so the stream is forward-extensible: adding a new variant is a no-op for older readers (they ignore unknown types per SRD-44a §“Reader behaviour”).

Variants§

§

SessionStart

First line of every fresh invocation’s section. Resume increments invocation and writes a fresh session_start to continue the same JSONL — no separate file rotation.

Fields

§at: String

RFC 3339 UTC timestamp of when the event was written.

§version: u32

Format version. 1 until we ship a 2.

§session: String

Session id (matches logs/<session>/).

§started_at: String

RFC 3339 first-invocation start.

§invocation: u32

1-based invocation counter.

§

SessionEnd

Written when the workload completes. Optional — its absence means the invocation was interrupted, which the resume planner uses to distinguish clean exit from crash.

Fields

§outcome: String

"completed" / "errored" / "stopped".

§error: Option<String>

Top-level error message when outcome == "errored".

§

PhaseDeclared

One per phase per invocation, written during pre-map. Carries identity and eligibility flags so the reader can build the planned phase index without reading the workload YAML.

Fields

§identity: PhaseIdentity
§skip_eligible: bool
§

PhaseStarted

Mark a declared phase as Running.

Fields

§identity: PhaseIdentity
§

PhaseProgress

Periodic op-count + cursor-state update for a Running phase. Replaces the in-place mutation of PhaseEntry::op_counts and cursor_state from SRD-44. The reader keeps only the most recent progress record per (identity, current invocation) when folding.

Fields

§identity: PhaseIdentity
§op_counts: OpCounts
§cursor_state: Option<Value>

Tier-2 opaque snapshot from the active source factory.

§

PhaseCompleted

Phase reached the Completed state. Per SRD-44 §“Status Completed is load-bearing”, this is the call that makes the phase eligible to skip on a future resume.

Fields

§identity: PhaseIdentity
§duration_secs: f64
§op_counts: OpCounts
§

PhaseFailed

Phase failed terminally. The error message is preserved for resume diagnostics.

Fields

§identity: PhaseIdentity
§error: String
§op_counts: Option<OpCounts>
§

PhaseHash

Update on a previously-declared phase: bind the program-canonical hash. Called once per phase the first time it compiles. Folds into the existing entry’s identity so a future resume can detect program drift via PhaseIdentity::matches_full.

Fields

§identity: PhaseIdentity
§hash_hex: String

32-byte program hash, hex-encoded for human readability of the on-disk records. SRD-107: the BASE hash (chain below the session node + config digest); param values ride in params_consumed.

§params_consumed: Option<String>

SRD-107 — the consumed-params map as canonical JSON ({"name":"<value sha256 hex>",…}). Absent on records written before the field existed.

§

ScopeEnter

Reserved for SRD-44a Push 3. The reader already understands these variants so the writer can emit them in a future patch without a schema bump.

§

ScopeExit

Reserved for SRD-44a Push 3.

Fields

§kind: String
§outcome: String

Implementations§

Source§

impl CheckpointData

Source

pub fn at(&self) -> &str

RFC 3339 timestamp this event was tagged with. All variants carry one; the helper avoids a match in the fold loop.

Source

pub fn event_type(&self) -> Option<EventType>

The lifecycle kind-tag this durable record corresponds to, tying an on-disk CheckpointData record back to the in-memory crate::lifecycle::EventType that the readout binder fires on. None for records that have no lifecycle fire point — structural / metadata records (a pre-map PhaseDeclared declaration, a PhaseHash binding) are written to the log but never fire a readout slot, so they have no kind-tag.

Trait Implementations§

Source§

impl Clone for CheckpointData

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CheckpointData

Source§

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

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

impl<'de> Deserialize<'de> for CheckpointData

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for CheckpointData

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more