Skip to main content

PipelineCheckpoint

Struct PipelineCheckpoint 

Source
pub struct PipelineCheckpoint {
Show 28 fields pub version: u32, pub phase: PipelinePhase, pub iteration: u32, pub total_iterations: u32, pub reviewer_pass: u32, pub total_reviewer_passes: u32, pub timestamp: String, pub developer_agent: String, pub reviewer_agent: String, pub cli_args: CliArgsSnapshot, pub developer_agent_config: AgentConfigSnapshot, pub reviewer_agent_config: AgentConfigSnapshot, pub rebase_state: RebaseState, pub config_path: Option<String>, pub config_checksum: Option<String>, pub working_dir: String, pub prompt_md_checksum: Option<String>, pub git_user_name: Option<String>, pub git_user_email: Option<String>, pub run_id: String, pub parent_run_id: Option<String>, pub resume_count: u32, pub actual_developer_runs: u32, pub actual_reviewer_runs: u32, pub execution_history: Option<ExecutionHistory>, pub file_system_state: Option<FileSystemState>, pub prompt_history: Option<HashMap<String, String>>, pub env_snapshot: Option<EnvironmentSnapshot>,
}
Expand description

Enhanced pipeline checkpoint for resume functionality.

Contains comprehensive state needed to resume an interrupted pipeline exactly where it left off, including CLI arguments, agent configurations, rebase state, and file checksums for validation.

This is inspired by video game save states - capturing the complete execution context to enable seamless recovery.

Fields§

§version: u32

Checkpoint format version (for future compatibility)

§phase: PipelinePhase

Current pipeline phase

§iteration: u32

Current iteration number (for developer iterations)

§total_iterations: u32

Total iterations configured

§reviewer_pass: u32

Current reviewer pass number

§total_reviewer_passes: u32

Total reviewer passes configured

§timestamp: String

Timestamp when checkpoint was saved

§developer_agent: String

Developer agent display name

§reviewer_agent: String

Reviewer agent display name

§cli_args: CliArgsSnapshot

CLI argument snapshot

§developer_agent_config: AgentConfigSnapshot

Developer agent configuration snapshot

§reviewer_agent_config: AgentConfigSnapshot

Reviewer agent configuration snapshot

§rebase_state: RebaseState

Rebase state tracking

§config_path: Option<String>

Path to config file used for this run (if any)

§config_checksum: Option<String>

Checksum of config file (for validation on resume)

§working_dir: String

Working directory when checkpoint was created

§prompt_md_checksum: Option<String>

Checksum of PROMPT.md (for validation on resume)

§git_user_name: Option<String>

Git user name for commits (if overridden)

§git_user_email: Option<String>

Git user email for commits (if overridden)

§run_id: String

Unique identifier for this run (UUID v4)

§parent_run_id: Option<String>

Parent run ID if this is a resumed session

§resume_count: u32

Number of times this session has been resumed

§actual_developer_runs: u32

Actual number of developer iterations that completed

§actual_reviewer_runs: u32

Actual number of reviewer passes that completed

§execution_history: Option<ExecutionHistory>

Execution history tracking for idempotent recovery

§file_system_state: Option<FileSystemState>

File system state for validation on resume

§prompt_history: Option<HashMap<String, String>>

Stored prompts used during this run

§env_snapshot: Option<EnvironmentSnapshot>

Environment snapshot for idempotent recovery

Implementations§

Source§

impl PipelineCheckpoint

Source

pub fn resume_context(&self) -> ResumeContext

Extract rich resume context from this checkpoint.

This method creates a ResumeContext containing all the information needed to generate informative prompts for agents when resuming.

Source§

impl PipelineCheckpoint

Source

pub fn from_params(params: CheckpointParams<'_>) -> Self

Create a new checkpoint with comprehensive state capture.

This is the main constructor for creating checkpoints during pipeline execution. It captures all necessary state to enable exact restoration of the pipeline.

§Arguments
  • params - All checkpoint parameters bundled in a struct
Source

pub fn description(&self) -> String

Get a human-readable description of the checkpoint.

Returns a string describing the current phase and progress, suitable for display to the user when resuming.

Source

pub fn with_config(self, path: Option<PathBuf>) -> Self

Set the config path and calculate its checksum.

Trait Implementations§

Source§

impl Clone for PipelineCheckpoint

Source§

fn clone(&self) -> PipelineCheckpoint

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for PipelineCheckpoint

Source§

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

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

impl<'de> Deserialize<'de> for PipelineCheckpoint

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 From<PipelineCheckpoint> for PipelineState

Convert v3 checkpoint to reducer PipelineState.

Migrates existing checkpoint structure to new state format, ensuring backward compatibility with saved checkpoints.

Source§

fn from(checkpoint: PipelineCheckpoint) -> Self

Converts to this type from the input type.
Source§

impl Serialize for PipelineCheckpoint

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<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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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 = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,