pub struct SqliteTaskRepository { /* private fields */ }Expand description
Synchronous SQLite-backed implementation of TaskRepository.
Implementations§
Trait Implementations§
Source§impl TaskRepository for SqliteTaskRepository
impl TaskRepository for SqliteTaskRepository
Source§fn resolve_task_id(&self, task_id_or_prefix: &str) -> Result<String>
fn resolve_task_id(&self, task_id_or_prefix: &str) -> Result<String>
Resolves a full task identifier from an exact ID or prefix.
Source§fn load_task_summary(&self, task_id: &str) -> Result<TaskSummary>
fn load_task_summary(&self, task_id: &str) -> Result<TaskSummary>
Loads the summary row for a task.
Source§fn load_task_detail_rows(&self, task_id: &str) -> Result<TaskDetailRows>
fn load_task_detail_rows(&self, task_id: &str) -> Result<TaskDetailRows>
Loads the full detail row bundle for a task.
Source§fn load_task_item_counts(&self, task_id: &str) -> Result<(i64, i64, i64)>
fn load_task_item_counts(&self, task_id: &str) -> Result<(i64, i64, i64)>
Loads
(total, resolved, unresolved) item counts for a task.Source§fn list_task_ids_ordered_by_created_desc(&self) -> Result<Vec<String>>
fn list_task_ids_ordered_by_created_desc(&self) -> Result<Vec<String>>
Lists task identifiers ordered from newest to oldest.
Source§fn find_latest_resumable_task_id(
&self,
include_pending: bool,
) -> Result<Option<String>>
fn find_latest_resumable_task_id( &self, include_pending: bool, ) -> Result<Option<String>>
Returns the latest resumable task, optionally including pending tasks.
Source§fn load_task_runtime_row(&self, task_id: &str) -> Result<TaskRuntimeRow>
fn load_task_runtime_row(&self, task_id: &str) -> Result<TaskRuntimeRow>
Loads execution state needed to resume a task.
Source§fn first_task_item_id(&self, task_id: &str) -> Result<Option<String>>
fn first_task_item_id(&self, task_id: &str) -> Result<Option<String>>
Returns the first task-item identifier for a task, if any.
Source§fn count_unresolved_items(&self, task_id: &str) -> Result<i64>
fn count_unresolved_items(&self, task_id: &str) -> Result<i64>
Counts unresolved items for the task.
Source§fn list_task_items_for_cycle(&self, task_id: &str) -> Result<Vec<TaskItemRow>>
fn list_task_items_for_cycle(&self, task_id: &str) -> Result<Vec<TaskItemRow>>
Lists task items participating in the current cycle.
Source§fn load_task_status(&self, task_id: &str) -> Result<Option<String>>
fn load_task_status(&self, task_id: &str) -> Result<Option<String>>
Loads the current task status string.
Source§fn set_task_status(
&self,
task_id: &str,
status: &str,
set_completed: bool,
) -> Result<()>
fn set_task_status( &self, task_id: &str, status: &str, set_completed: bool, ) -> Result<()>
Updates the task status and optionally stamps completion metadata.
Source§fn prepare_task_for_start_batch(&self, task_id: &str) -> Result<()>
fn prepare_task_for_start_batch(&self, task_id: &str) -> Result<()>
Prepares a task for a fresh start by resetting batch-execution state.
Source§fn update_task_cycle_state(
&self,
task_id: &str,
current_cycle: u32,
init_done: bool,
) -> Result<()>
fn update_task_cycle_state( &self, task_id: &str, current_cycle: u32, init_done: bool, ) -> Result<()>
Persists cycle counters and
init_once completion state for a task.Source§fn mark_task_item_running(&self, task_item_id: &str) -> Result<()>
fn mark_task_item_running(&self, task_item_id: &str) -> Result<()>
Marks a task item as currently running.
Source§fn set_task_item_terminal_status(
&self,
task_item_id: &str,
status: &str,
) -> Result<()>
fn set_task_item_terminal_status( &self, task_item_id: &str, status: &str, ) -> Result<()>
Sets a terminal status for a task item.
Source§fn update_task_item_status(
&self,
task_item_id: &str,
status: &str,
) -> Result<()>
fn update_task_item_status( &self, task_item_id: &str, status: &str, ) -> Result<()>
Updates a task item to an arbitrary status value.
Source§fn update_task_item_pipeline_vars(
&self,
task_item_id: &str,
pipeline_vars_json: &str,
) -> Result<()>
fn update_task_item_pipeline_vars( &self, task_item_id: &str, pipeline_vars_json: &str, ) -> Result<()>
Persists accumulated pipeline variables back to the task item’s dynamic_vars column.
Source§fn load_task_name(&self, task_id: &str) -> Result<Option<String>>
fn load_task_name(&self, task_id: &str) -> Result<Option<String>>
Loads the human-readable name of a task.
Source§fn list_task_log_runs(
&self,
task_id: &str,
limit: usize,
) -> Result<Vec<TaskLogRunRow>>
fn list_task_log_runs( &self, task_id: &str, limit: usize, ) -> Result<Vec<TaskLogRunRow>>
Lists recent command runs for log streaming or inspection.
Source§fn insert_task_graph_run(&self, run: &NewTaskGraphRun) -> Result<()>
fn insert_task_graph_run(&self, run: &NewTaskGraphRun) -> Result<()>
Inserts a new task-graph planning run record.
Source§fn update_task_graph_run_status(
&self,
graph_run_id: &str,
status: &str,
) -> Result<()>
fn update_task_graph_run_status( &self, graph_run_id: &str, status: &str, ) -> Result<()>
Updates the status of an existing task-graph run.
Source§fn insert_task_graph_snapshot(
&self,
snapshot: &NewTaskGraphSnapshot,
) -> Result<()>
fn insert_task_graph_snapshot( &self, snapshot: &NewTaskGraphSnapshot, ) -> Result<()>
Persists one task-graph snapshot.
Source§fn load_task_graph_debug_bundles(
&self,
task_id: &str,
) -> Result<Vec<TaskGraphDebugBundle>>
fn load_task_graph_debug_bundles( &self, task_id: &str, ) -> Result<Vec<TaskGraphDebugBundle>>
Loads debug bundles for graph-planning diagnostics.
Source§fn delete_task_and_collect_log_paths(
&self,
task_id: &str,
) -> Result<Vec<String>>
fn delete_task_and_collect_log_paths( &self, task_id: &str, ) -> Result<Vec<String>>
Deletes a task and returns log paths that should be cleaned up afterward.
Source§fn insert_command_run(&self, run: &NewCommandRun) -> Result<()>
fn insert_command_run(&self, run: &NewCommandRun) -> Result<()>
Inserts a command-run record.
Source§fn insert_event(&self, event: &DbEventRecord) -> Result<()>
fn insert_event(&self, event: &DbEventRecord) -> Result<()>
Inserts an event record.
Source§fn update_command_run(&self, run: &NewCommandRun) -> Result<()>
fn update_command_run(&self, run: &NewCommandRun) -> Result<()>
Updates an existing command-run record.
Source§fn update_command_run_with_events(
&self,
run: &NewCommandRun,
events: &[DbEventRecord],
) -> Result<()>
fn update_command_run_with_events( &self, run: &NewCommandRun, events: &[DbEventRecord], ) -> Result<()>
Updates a command run and appends events in a single repository call.
Source§fn persist_phase_result_with_events(
&self,
run: &NewCommandRun,
events: &[DbEventRecord],
) -> Result<()>
fn persist_phase_result_with_events( &self, run: &NewCommandRun, events: &[DbEventRecord], ) -> Result<()>
Persists a completed phase result together with its emitted events.
Source§fn update_command_run_pid(&self, run_id: &str, pid: i64) -> Result<()>
fn update_command_run_pid(&self, run_id: &str, pid: i64) -> Result<()>
Updates the operating-system PID associated with a running command.
Source§fn find_active_child_pids(&self, task_id: &str) -> Result<Vec<i64>>
fn find_active_child_pids(&self, task_id: &str) -> Result<Vec<i64>>
Returns active child PIDs for a task.
Source§fn find_inflight_command_runs_for_task(
&self,
task_id: &str,
) -> Result<Vec<InflightRunRecord>>
fn find_inflight_command_runs_for_task( &self, task_id: &str, ) -> Result<Vec<InflightRunRecord>>
Returns in-flight command runs for a task (FR-038).
Source§fn find_completed_runs_for_pending_items(
&self,
task_id: &str,
) -> Result<Vec<CompletedRunRecord>>
fn find_completed_runs_for_pending_items( &self, task_id: &str, ) -> Result<Vec<CompletedRunRecord>>
Returns completed runs whose parent items are still
pending (FR-038).Source§fn count_stale_pending_items(&self, task_id: &str) -> Result<i64>
fn count_stale_pending_items(&self, task_id: &str) -> Result<i64>
Counts stale pending items (FR-038).
Source§fn count_recent_heartbeats_for_items(
&self,
task_id: &str,
item_ids: &[String],
cutoff_ts: &str,
) -> Result<i64>
fn count_recent_heartbeats_for_items( &self, task_id: &str, item_ids: &[String], cutoff_ts: &str, ) -> Result<i64>
Counts recent heartbeat events for specified item IDs since cutoff (FR-052).
Auto Trait Implementations§
impl Freeze for SqliteTaskRepository
impl RefUnwindSafe for SqliteTaskRepository
impl Send for SqliteTaskRepository
impl Sync for SqliteTaskRepository
impl Unpin for SqliteTaskRepository
impl UnsafeUnpin for SqliteTaskRepository
impl UnwindSafe for SqliteTaskRepository
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
Attempts to downcast this to
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
Attempts to downcast this to
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
Attempts to downcast this to
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
Attempts to downcast this to
T behind Arc pointerSource§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
impl<T, X> CoerceTo<T> for Xwhere
T: CoerceFrom<X> + ?Sized,
fn coerce_rc_to(self: Rc<X>) -> Rc<T>
fn coerce_box_to(self: Box<X>) -> Box<T>
fn coerce_ref_to(&self) -> &T
fn coerce_mut_to(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request