neurocore.persistence.base.RunStore

class neurocore.persistence.base.RunStore

Bases: abc.ABC

Abstract durable store for run history.

Implementations: SQLiteRunStore (default) and InMemoryRunStore (tests).

abstractmethod save_run(run: RunRecord) str

Insert or update a run by run_id. Returns the run_id.

abstractmethod save_step(step: StepRecord) None

Insert or update a step by (run_id, step_index).

abstractmethod load_run(run_id: str) RunRecord | None

Load a run by id, or None if not found.

abstractmethod load_steps(run_id: str) list[StepRecord]

Load a run’s steps, ordered by step_index.

abstractmethod list_runs(*, status: RunStatus | None = None, blueprint: str | None = None, limit: int = 50) list[RunRecord]

List runs newest-first, optionally filtered by status/blueprint.

abstractmethod delete_run(run_id: str) None

Delete a run and its steps.

close() None

Release any underlying resources (no-op by default).