lightspeed/ops/replay_diagnostics

Deterministic replay and time-travel diagnostics contracts for M42.

Types

Replay trace flow.

pub type Flow {
  RuntimeFlow
  SessionFlow
  PipelineFlow
}

Constructors

  • RuntimeFlow
  • SessionFlow
  • PipelineFlow

Investigation workflow integration.

pub type InvestigationWorkflow {
  FaultWorkflow
  EtlWorkflow
}

Constructors

  • FaultWorkflow
  • EtlWorkflow

Replay trace bundle.

pub type ReplayTrace {
  ReplayTrace(
    trace_id: String,
    flow: Flow,
    seed: String,
    events: List(TraceEvent),
  )
}

Constructors

  • ReplayTrace(
      trace_id: String,
      flow: Flow,
      seed: String,
      events: List(TraceEvent),
    )

Time-travel snapshot extracted from a trace.

pub type Snapshot {
  Snapshot(
    trace_id: String,
    flow: Flow,
    index: Int,
    at_ms: Int,
    label: String,
    state_signature: String,
  )
}

Constructors

  • Snapshot(
      trace_id: String,
      flow: Flow,
      index: Int,
      at_ms: Int,
      label: String,
      state_signature: String,
    )

One time-indexed replay event.

pub type TraceEvent {
  TraceEvent(
    index: Int,
    at_ms: Int,
    label: String,
    state_signature: String,
  )
}

Constructors

  • TraceEvent(
      index: Int,
      at_ms: Int,
      label: String,
      state_signature: String,
    )

Values

pub fn etl_investigation_ready(trace: ReplayTrace) -> Bool

ETL-investigation workflow readiness.

pub fn events(trace: ReplayTrace) -> List(TraceEvent)

Trace events accessor.

pub fn fault_investigation_ready(trace: ReplayTrace) -> Bool

Fault-investigation workflow readiness.

pub fn first_fault_snapshot(
  trace: ReplayTrace,
) -> option.Option(Snapshot)

First fault snapshot for triage.

pub fn flow(trace: ReplayTrace) -> Flow

Flow accessor.

pub fn flow_label(flow: Flow) -> String

Flow label.

pub fn investigation_signature(
  workflow: InvestigationWorkflow,
  trace: ReplayTrace,
) -> String

Investigation signature bound to one trace.

pub fn latest_snapshot(
  trace: ReplayTrace,
) -> option.Option(Snapshot)

Latest snapshot when present.

pub fn pipeline_etl_trace(seed: String) -> ReplayTrace

Deterministic pipeline replay/ETL trace.

pub fn runtime_fault_trace(seed: String) -> ReplayTrace

Deterministic runtime fault trace.

pub fn session_fault_trace(seed: String) -> ReplayTrace

Deterministic session fault/recovery trace.

pub fn snapshot_at(
  trace: ReplayTrace,
  index: Int,
) -> Result(Snapshot, String)

Extract one time-indexed snapshot.

pub fn snapshot_label(snapshot: Snapshot) -> String

Snapshot label.

pub fn timeline_signature(trace: ReplayTrace) -> String

Stable timeline signature.

pub fn trace_id(trace: ReplayTrace) -> String

Trace id accessor.

pub fn trace_signature(trace: ReplayTrace) -> String

Stable full trace signature.

Search Document