Skip to main content

Module checkpoint

Module checkpoint 

Source
Expand description

Pipeline checkpoint system for resume functionality.

This module provides checkpoint management for Ralph’s pipeline:

  • Save and load pipeline state
  • Resume interrupted pipelines
  • Track pipeline phase progress
  • Validate checkpoints before resuming
  • Restore configuration from checkpoints

§Example

use ralph::checkpoint::{
    CheckpointBuilder, PipelineCheckpoint, PipelinePhase,
    save_checkpoint, load_checkpoint,
};

// Create a checkpoint using the builder
let checkpoint = CheckpointBuilder::new()
    .phase(PipelinePhase::Development, 2, 5)
    .reviewer_pass(0, 2)
    .agents("claude", "codex")
    .capture_from_context(&config, &registry, "claude", "codex", &logger)
    .build()
    .expect("checkpoint should build");

save_checkpoint(&checkpoint)?;

// Load and resume
if let Some(checkpoint) = load_checkpoint()? {
    println!("Resuming from: {}", checkpoint.description());
}

Re-exports§

pub use builder::CheckpointBuilder;
pub use execution_history::ExecutionHistory;
pub use file_state::FileSystemState;
pub use restore::apply_checkpoint_to_config;
pub use run_context::RunContext;
pub use state::calculate_file_checksum_with_workspace;
pub use state::checkpoint_exists;
pub use state::checkpoint_exists_with_workspace;
pub use state::clear_checkpoint;
pub use state::clear_checkpoint_with_workspace;
pub use state::load_checkpoint;
pub use state::load_checkpoint_with_workspace;
pub use state::save_checkpoint;
pub use state::save_checkpoint_with_workspace;
pub use state::timestamp;
pub use state::PipelineCheckpoint;
pub use state::PipelinePhase;
pub use state::RebaseState;
pub use validation::validate_checkpoint;

Modules§

builder
Checkpoint builder for convenient checkpoint creation.
execution_history
Execution history tracking for checkpoint state.
file_state
File system state capture and validation for checkpoints.
recovery
Recovery strategy for checkpoint state.
restore
State restoration from checkpoints.
run_context
Run context for tracking pipeline execution lineage and state.
state
Pipeline checkpoint state and persistence.
validation
Checkpoint validation for resume functionality.