pub trait RalphStateStore: Send + Sync {
// Required methods
fn create_run<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 RalphRunState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_status<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
status: RalphStatus,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_iteration<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
iteration: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn record_story_result<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
result: &'life2 StoryResultEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn append_progress<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
entry: &'life2 ProgressEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn update_prd<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
prd: &'life2 Prd,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn set_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn complete_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
status: RalphStatus,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RalphRunState>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_runs<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<RalphRunSummary>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Abstraction over Ralph run state persistence.
All methods are fire-and-forget from the caller’s perspective — implementations should log errors internally rather than failing the Ralph pipeline.
Required Methods§
Sourcefn create_run<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 RalphRunState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_run<'life0, 'life1, 'async_trait>(
&'life0 self,
state: &'life1 RalphRunState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new run record
Sourcefn update_status<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
status: RalphStatus,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_status<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
status: RalphStatus,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update the run status
Sourcefn update_iteration<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
iteration: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_iteration<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
iteration: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Record iteration progress
Sourcefn record_story_result<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
result: &'life2 StoryResultEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn record_story_result<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
result: &'life2 StoryResultEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Record a story result
Sourcefn append_progress<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
entry: &'life2 ProgressEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn append_progress<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
entry: &'life2 ProgressEntry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Append a progress log entry
Sourcefn update_prd<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
prd: &'life2 Prd,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_prd<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
prd: &'life2 Prd,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Update the PRD (e.g. after marking stories passed)
Sourcefn set_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn set_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
error: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Set error message
Sourcefn complete_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
status: RalphStatus,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn complete_run<'life0, 'life1, 'async_trait>(
&'life0 self,
run_id: &'life1 str,
status: RalphStatus,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Mark run as completed