Skip to main content

Module journal

Module journal 

Source
Expand description

Layer: Observability

RunJournal is the canonical in-memory record of everything that happened during a pipeline run. It accumulates typed, timestamped events and can answer the four observability questions from the Epic 10 DoD:

QuestionMethod
What was planned?plan_snapshot()
What happened?files(), retries(), chunk_events()
What degraded?quality_issues(), schema_changes(), warnings()
What was the outcome?final_outcome()

RunJournal is currently embedded in RunSummary so that all pipeline modules — which already hold &mut RunSummary — can record events without signature changes. A future epic will invert the relationship so that RunSummary is derived from RunJournal.

This module is the canonical home for journal types. It deliberately has no dependencies on plan, state, or pipeline so that storage (state) and orchestration (pipeline) can both depend on it without creating a cycle. The From<&ResolvedRunPlan> conversion lives in pipeline/summary.rs beside the call site that needs it.

Structs§

JournalEntry
A timestamped wrapper around a RunEvent.
PlanSnapshot
Owned, serialisable snapshot of the resolved execution plan, captured at the moment a run starts. Answers “what was planned?” without requiring the original ResolvedRunPlan to remain in scope.
RunJournal
Canonical in-memory record of a pipeline run.

Enums§

RunEvent
A single typed event emitted during a pipeline run.