ralph/execution_history.rs
1//! Execution history facade for ETA estimation and persistence.
2//!
3//! Responsibilities:
4//! - Re-export execution history data models, storage helpers, and averaging logic.
5//! - Keep persistence and weighted-estimation concerns split into focused companions.
6//!
7//! Not handled here:
8//! - Real-time progress tracking.
9//! - UI or CLI ETA presentation.
10//!
11//! Invariants/assumptions:
12//! - Public re-exports preserve the existing `crate::execution_history::*` API surface.
13//! - Persistence stays compatible with `.ralph/cache/execution_history.json`.
14
15mod analytics;
16mod model;
17mod storage;
18
19pub use analytics::{get_phase_averages, weighted_average_duration};
20pub use model::{ExecutionEntry, ExecutionHistory};
21pub use storage::{load_execution_history, record_execution, save_execution_history};
22
23#[cfg(test)]
24pub(crate) use analytics::parse_timestamp_to_secs;
25#[cfg(test)]
26pub(crate) use storage::prune_old_entries;
27
28#[cfg(test)]
29mod tests;